mersenneforum.org  

Go Back   mersenneforum.org > Fun Stuff > Puzzles

Reply
 
Thread Tools
Old 2010-03-29, 16:46   #12
bsquared
 
bsquared's Avatar
 
"Ben"
Feb 2007

2·5·7·47 Posts
Default

update...

Code:
found primes in range 30000000000 to 31000000000 in elapsed time = 5.4245
sum of squares complete in elapsed time = 7.1620, sum is 416903941002774697723222981803

found primes in range 31000000000 to 32000000000 in elapsed time = 5.5802
**** 31252968359 is 0 mod 1000000000 ****
sum of squares complete in elapsed time = 7.1759, sum is 457955303775896882861615585442

found primes in range 32000000000 to 33000000000 in elapsed time = 5.5252
sum of squares complete in elapsed time = 7.1461, sum is 501598601070515778427418232428
and another update:
Code:
found primes in range 47000000000 to 48000000000 in elapsed time = 5.5268
sum of squares complete in elapsed time = 7.0336, sum is 1519756369296424391708040649758

found primes in range 48000000000 to 49000000000 in elapsed time = 5.4239
sum of squares complete in elapsed time = 7.0347, sum is 1615357580573805620690452754303

found primes in range 49000000000 to 50000000000 in elapsed time = 5.4835
**** 49460594569 is 0 mod 1410065408 ****
sum of squares complete in elapsed time = 6.8852, sum is 1714863031171407826702942323341

found primes in range 50000000000 to 51000000000 in elapsed time = 5.4299
I'm stupidly using %u to print the modulus, but it is stored internally as a 64 bit integer... so it is only a printing error.

Last fiddled with by bsquared on 2010-03-29 at 16:51 Reason: another update
bsquared is offline   Reply With Quote
Old 2010-03-29, 22:57   #13
bsquared
 
bsquared's Avatar
 
"Ben"
Feb 2007

CDA16 Posts
Default Right on cue

we have this result:

Code:
found primes in range 1915000000000 to 1916000000000 in elapsed time = 5.0965
**** 1915014433303 is 0 mod 1215752192 ****
sum of squares complete in elapsed time = 5.0550, sum is 83903230112675776937166385335972895
So the sum of primes squared up to 1915014433303 is zero mod 100e9. I'm processing about 1 billion numbers per second, so assuming the trend of this sequence holds, to go to the next value at around 20 trillion would take a couple days.
bsquared is offline   Reply With Quote
Old 2010-03-30, 02:35   #14
bsquared
 
bsquared's Avatar
 
"Ben"
Feb 2007

2×5×7×47 Posts
Default

Quote:
Originally Posted by bsquared View Post
...I'm processing about 1 billion numbers per second...
That should have been 1e9 every 10 sec, but the time estimate is still about right. It's probably silly, but a run to 20 trillion is ongoing...

Here was the sum of all prime squares up to 1915014433303:
83775363722237720731978600000000000

I'm keeping a file with the sums every 1e9, in case anyone wants to extend the sequence after I get tired of it or for double checks.

Last fiddled with by bsquared on 2010-03-30 at 02:38 Reason: whoops...
bsquared is offline   Reply With Quote
Old 2010-03-30, 12:57   #15
bsquared
 
bsquared's Avatar
 
"Ben"
Feb 2007

1100110110102 Posts
Default

I see that the death knell of this thread has been sounded

Maybe the 12th member of the sequence is still of interest...

\Sigma_{p = 2}^{4076200167673} p^2 = 786646994677132840800629000000000000
bsquared is offline   Reply With Quote
Old 2010-03-30, 15:07   #16
CRGreathouse
 
CRGreathouse's Avatar
 
Aug 2006

3×52×79 Posts
Default

Quote:
Originally Posted by bsquared View Post
I see that the death knell of this thread has been sounded

Maybe the 12th member of the sequence is still of interest...

\Sigma_{p = 2}^{4076200167673} p^2 = 786646994677132840800629000000000000
Are you going to submit this to the OEIS?
CRGreathouse is offline   Reply With Quote
Old 2010-03-30, 15:40   #17
bsquared
 
bsquared's Avatar
 
"Ben"
Feb 2007

2·5·7·47 Posts
Default

I have no problem doing so... but I'm not the "discoverer" of this sequence. I'll defer to you or davar55 if you would rather take the credit.

Last fiddled with by bsquared on 2010-03-30 at 15:40
bsquared is offline   Reply With Quote
Old 2010-03-30, 15:44   #18
CRGreathouse
 
CRGreathouse's Avatar
 
Aug 2006

3·52·79 Posts
Default

I PM'd davar55.
CRGreathouse is offline   Reply With Quote
Old 2010-03-30, 15:52   #19
bsquared
 
bsquared's Avatar
 
"Ben"
Feb 2007

329010 Posts
Default

Also, this sequence could now be greatly extended.
bsquared is offline   Reply With Quote
Old 2010-03-30, 16:12   #20
CRGreathouse
 
CRGreathouse's Avatar
 
Aug 2006

3×52×79 Posts
Default

Quote:
Originally Posted by bsquared View Post
Also, this sequence could now be greatly extended.
Sure. It's quite easy to extend, but tradition limits b-files to 10,000 entries. If you'd like you can extend it to that (or I can), but I wouldn't go beyond. The current b-file has 5000.

As it happens I never computed that sequence for these calculations -- I used pure modular arithmetic. (If I used BCD I could have avoided this while keeping speed high...)

Last fiddled with by CRGreathouse on 2010-03-30 at 16:14
CRGreathouse is offline   Reply With Quote
Old 2010-03-30, 17:01   #21
bsquared
 
bsquared's Avatar
 
"Ben"
Feb 2007

63328 Posts
Default

Quote:
Originally Posted by CRGreathouse View Post
Sure. It's quite easy to extend, but tradition limits b-files to 10,000 entries. If you'd like you can extend it to that (or I can), but I wouldn't go beyond. The current b-file has 5000.
I guess I was thinking of a link to tables, or something. But that would require me to generate and host those tables. I'll save that for some day when I'm bored ;)

Quote:
Originally Posted by CRGreathouse View Post
As it happens I never computed that sequence for these calculations -- I used pure modular arithmetic. (If I used BCD I could have avoided this while keeping speed high...)
Yeah, that's definitely faster, but using pure modular arithmetic would require you to start the sum over for each new modulus, right?
bsquared is offline   Reply With Quote
Old 2010-03-30, 17:17   #22
CRGreathouse
 
CRGreathouse's Avatar
 
Aug 2006

592510 Posts
Default

Quote:
Originally Posted by bsquared View Post
Yeah, that's definitely faster, but using pure modular arithmetic would require you to start the sum over for each new modulus, right?
Right. You could do two modili at a time without much penalty, though, with appropriate lookup tables and bit operations. Note that you only need to compare (and hence reduce) every 8 primes, each term (other than the first) has index = 5 (mod 8).

Last fiddled with by CRGreathouse on 2010-03-30 at 17:23
CRGreathouse is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Regarding Squares a1call Miscellaneous Math 42 2017-02-03 01:29
Basic Number Theory 12: sums of two squares Nick Number Theory Discussion Group 0 2016-12-11 11:30
Integers = sums of 2s and 3s. 3.14159 Miscellaneous Math 12 2010-07-21 11:47
Sums of three squares CRGreathouse Math 6 2009-11-06 19:20
squares or not squares m_f_h Puzzles 45 2007-06-15 17:46

All times are UTC. The time now is 20:54.

Sun Sep 27 20:54:03 UTC 2020 up 17 days, 18:05, 0 users, load averages: 1.27, 1.42, 1.55

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.