mersenneforum.org Sums of all Squares
 Register FAQ Search Today's Posts Mark Forums Read

2010-04-07, 00:34   #34
bsquared

"Ben"
Feb 2007

13·257 Posts

Quote:
 Originally Posted by petrw1 Cool....my first 5 answers match. Crap...I missed the next 2: Bug alert!
What program are you using? It's entirely possible the bug is in my code.

2010-04-07, 00:48   #35
axn

Jun 2003

17×281 Posts

Quote:
 Originally Posted by bsquared What program are you using? It's entirely possible the bug is in my code.
Pari concurs with your first seven

Code:
p=2;s=0;ten=10;for(i=2,10000000,s=s+p;if(Mod(s,ten)==0, ten=ten*10;print(i,":",p, ":",s)); p=nextprime(p+1))

4:5:10
10:23:100
3796:35677:63731000
10184:106853:515530000
51532:632501:15570900000
1926966:31190879:29057028000000
3471032:58369153:98078160000000

 2010-04-07, 01:01 #36 axn     Jun 2003 477710 Posts While we're at it, some results for the cubes: Code: 3:5:160 51:233:143309500 1095:8783:167992435025000 2739:24763:9495929161130000 401785:5828099:18803849605481106073200000 616801:9229931:114943299218925309364000000 14335805:262707241:62239590622437034770047320000000
2010-04-07, 03:40   #37
petrw1
1976 Toyota Corona years forever!

"Wayne"
Nov 2006

2·23·97 Posts

Quote:
 Originally Posted by bsquared What program are you using? It's entirely possible the bug is in my code.
Plain, ordinary, BASIC.

My guess is I lost precision when the sum got too high.

2010-04-07, 04:46   #38
bsquared

"Ben"
Feb 2007

13×257 Posts

Quote:
 Originally Posted by axn While we're at it, some results for the cubes: Code: 3:5:160 51:233:143309500 1095:8783:167992435025000 2739:24763:9495929161130000 401785:5828099:18803849605481106073200000 616801:9229931:114943299218925309364000000 14335805:262707241:62239590622437034770047320000000
Doublecheck plus a few more:
Code:
**** 10 divides prime cube sum up to 5, sum = 160 ****
**** 100 divides prime cube sum up to 233, sum = 143309500 ****
**** 1000 divides prime cube sum up to 8783, sum = 167992435025000 ****
**** 10000 divides prime cube sum up to 24763, sum = 9495929161130000 ****
**** 100000 divides prime cube sum up to 5828099, sum = 18803849605481106073200000 ****
**** 1000000 divides prime cube sum up to 9229931, sum = 114943299218925309364000000 ****
**** 10000000 divides prime cube sum up to 262707241, sum = 62239590622437034770047320000000 ****
**** 100000000 divides prime cube sum up to 7717488553, sum is 39389391603365585735745579849700000000 ****
**** 1000000000 divides prime cube sum up to 34529828929, sum = 14800565770732540706707662233175000000000 ****
**** 10000000000 divides prime cube sum up to 311995561321, sum = 90365528187658782254536155073531290000000000 ****
By morning the search should be at (all primes below) 10 trillion.

2010-04-07, 14:08   #39
bsquared

"Ben"
Feb 2007

13×257 Posts

Quote:
 Originally Posted by bsquared By morning the search should be at (all primes below) 10 trillion.
Done. Here's the 11th term:

Code:
**** 100000000000 divides prime cube sum up to 549120448879, sum is 848814744633978332442418792098769600000000000 ****
I updated my webpage too.

2010-04-07, 14:17   #40
bsquared

"Ben"
Feb 2007

13×257 Posts

Quote:
 Originally Posted by petrw1 Plain, ordinary, BASIC. My guess is I lost precision when the sum got too high. I need to try QuadIntegers
Yes, that could be the issue. I'm using 3 64 bit words to hold the sum, which may not even be big enough for the cube sum problem eventually. 192 bits can hold a 58 digit number without loss of precision and the cube sum up to 10 trillion is already at 49 digits.

A single 64 bit integer runs out of precision at about 1.8e19, which is enough for the prime sum up to about 9 billion. Since you found the point at (632501 15570900000), you must be using more than 32 bits... but with 64 bits you should be fine for a few more points of the sequence. So maybe its an issue with your prime generation as well. A useful double check is to see if the count of primes you've summed agrees with known prime counts. For instance here.

Last fiddled with by bsquared on 2010-04-07 at 14:18

2010-04-07, 17:34   #41
petrw1
1976 Toyota Corona years forever!

"Wayne"
Nov 2006

2×23×97 Posts
YUP- precision.

Quote:
 Originally Posted by petrw1 Plain, ordinary, BASIC. My guess is I lost precision when the sum got too high. I need to try QuadIntegers
I can match the first 7 now.

 2010-04-08, 14:28 #42 davar55     May 2004 New York City 2×2,099 Posts Another way to extend this problem is to use a base other than ten. I think binary. 2^2 + 3^2 + 5^2 + ... + p^2 = 2mK What is the smallest prime p such that the sum of squares of all primes up to p is a multiple of 2 (or 4 or 8 or 16 or ...). This question can also be asked of first powers or cubes of primes. Since we basically compute in decimal or binary, if there's an interesting number theoretic fact here we may find it in one of these two related sequences of sequences.
2010-04-08, 14:55   #43

"Richard B. Woods"
Aug 2002
Wisconsin USA

22·3·599 Posts

Quote:
 Originally Posted by cheesehead Oh, wow ... bases 2-16 or so, powers to, say, ninth ==> 135 sequences.
...

2010-04-10, 01:35   #44
alexhiggins732

Mar 2010
Brick, NJ

67 Posts

Quote:
 Originally Posted by bsquared Done. Here's the 11th term: Code: **** 100000000000 divides prime cube sum up to 549120448879, sum is 848814744633978332442418792098769600000000000 **** I updated my webpage too.
n Pmax Sum(P^2) from 2 to Pmax; a multiple of 10^n
1 907 37464550
2
977 46403000
3
977 46403000

You have duplicated 2 and 3 on your site. I also noted that the OEIS sequence didn't have example code. Perhaps you could submit the expression you have entered into YAFU.

Last fiddled with by alexhiggins732 on 2010-04-10 at 01:35 Reason: Table HTML was stripped...

 Similar Threads Thread Thread Starter Forum Replies Last Post a1call Miscellaneous Math 42 2017-02-03 01:29 Nick Number Theory Discussion Group 0 2016-12-11 11:30 3.14159 Miscellaneous Math 12 2010-07-21 11:47 CRGreathouse Math 6 2009-11-06 19:20 m_f_h Puzzles 45 2007-06-15 17:46

All times are UTC. The time now is 21:33.

Wed Nov 25 21:33:39 UTC 2020 up 76 days, 18:44, 3 users, load averages: 1.54, 1.59, 1.53