ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Sat, 23 Mar 2013 16:44:58 +0100Table of primeshttps://ask.sagemath.org/question/9939/table-of-primes/Hello,
I'm trying to create a table (or matrix, what comes first) with the first rank is the primes_range from 2 to 29 and the first column with primes_range from 2 to 29 too.
Then, I want to add i[0] + j[0] = element 4 using the values above.
The reason for that is that I want to create a table of even elements based on Goldbach conjecture that says that an even is the sum of two equal (or different) primes:
4 = 2 + 2
6 = 3 + 3
8 = 3 + 5
The problem is that an even number can be written in several ways, example:
24 = 5 + 19
24 = 7 + 17
24 = 11 + 13 and so on..
The number 200 = 3 + 197 . So, my problem is to 'remember' in a for/loop the number 3. When I'm close to the even 200 the number variable that holds the first prime is far away from 3.
So, I think the solution maybe can be a combination or a value table or a matrix.
Thank you in advance.
P.S.: This is not a homework.Luiz Roberto MeierSat, 23 Mar 2013 16:44:58 +0100https://ask.sagemath.org/question/9939/