mersenneforum.org (https://www.mersenneforum.org/index.php)
-   Puzzles (https://www.mersenneforum.org/forumdisplay.php?f=18)
-   -   Sums of all Squares (https://www.mersenneforum.org/showthread.php?t=13181)

 bsquared 2010-03-29 16:46

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
[/CODE]

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
[/CODE]

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.

 bsquared 2010-03-29 22:57

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
[/CODE]

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 2010-03-30 02:35

[quote=bsquared;210004]...I'm processing about 1 billion numbers per second...[/quote]

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.

 bsquared 2010-03-30 12:57

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

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

[tex]\Sigma_{p = 2}^{4076200167673} p^2 = 786646994677132840800629000000000000[/tex]

 CRGreathouse 2010-03-30 15:07

[QUOTE=bsquared;210051]I see that the death knell of this thread has been sounded :smile:

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

[tex]\Sigma_{p = 2}^{4076200167673} p^2 = 786646994677132840800629000000000000[/tex][/QUOTE]

Are you going to submit this to the OEIS?

 bsquared 2010-03-30 15:40

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.

 CRGreathouse 2010-03-30 15:44

I PM'd davar55.

 bsquared 2010-03-30 15:52

Also, [url=http://www.research.att.com/~njas/sequences/A024450]this sequence[/url] could now be greatly extended.

 CRGreathouse 2010-03-30 16:12

[QUOTE=bsquared;210069]Also, [url=http://www.research.att.com/~njas/sequences/A024450]this sequence[/url] could now be greatly extended.[/QUOTE]

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...)

 bsquared 2010-03-30 17:01

[QUOTE=CRGreathouse;210070] 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.
[/QUOTE]
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=CRGreathouse;210070]
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...) [/QUOTE]

Yeah, that's definitely faster, but using pure modular arithmetic would require you to start the sum over for each new modulus, right?

 CRGreathouse 2010-03-30 17:17

[QUOTE=bsquared;210073]Yeah, that's definitely faster, but using pure modular arithmetic would require you to start the sum over for each new modulus, right?[/QUOTE]

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).

All times are UTC. The time now is 04:52.