![]() |
![]() |
#1 |
May 2004
New York City
10000100010002 Posts |
![]()
2^2 + 3^2 + 5^2 + ... + p^2 = 10mK
What is the smallest prime p such that the sum of squares of all primes up to p is a multiple of 10 (or 100 or 1000). |
![]() |
![]() |
![]() |
#2 |
Jun 2003
23·607 Posts |
![]()
s=0;forprime(p=2,1000,s=s+p^2;if(Mod(s,10)==0, print(p, ":",s)))
907:37464550 967:44505630 977:46403000 991:48351370 |
![]() |
![]() |
![]() |
#3 |
May 2004
New York City
23×232 Posts |
![]()
Nice and simple and quick reply -- thanks.
I won't ask about extending the list to 10000, etc. ..... |
![]() |
![]() |
![]() |
#4 |
Aug 2006
22×1,493 Posts |
![]()
907, 977, 977, 36643, 1067749, 17777197, 71622461, 2389799983, ...
The next term (if one exists) is more than 4 trillion. Last fiddled with by CRGreathouse on 2010-03-18 at 17:20 |
![]() |
![]() |
![]() |
#5 | |
"Richard B. Woods"
Aug 2002
Wisconsin USA
22×3×641 Posts |
![]()
Not yet in the OEIS.
http://www.research.att.com/~njas/sequences/ Quote:
I'd be glad to submit it, but I think it should be one of you guys. How about generalizing to other bases? Last fiddled with by cheesehead on 2010-03-18 at 18:34 |
|
![]() |
![]() |
![]() |
#6 |
Jun 2003
23×607 Posts |
![]()
I think CRG's sequence is more "worthy". It is also the solution of OP.
I can think of two ways to generalize: to other bases and other powers (other than squares). |
![]() |
![]() |
![]() |
#7 | |
"Richard B. Woods"
Aug 2002
Wisconsin USA
22·3·641 Posts |
![]()
Even with the omitted and repeated (just a typo) terms? :smile:
What I had in mind was a submission with the best of both your contributions. Quote:
Last fiddled with by cheesehead on 2010-03-18 at 19:56 |
|
![]() |
![]() |
![]() |
#8 |
Jun 2003
23·607 Posts |
![]()
That sequence is the first occurrence of 10^n. 977 repeats (not a typo!) because it ends in 000 and comes before any other 00. So it stands at positions 2 & 3.
EDIT:- Mine is merely the first four occurrences of 10 Last fiddled with by axn on 2010-03-18 at 20:02 |
![]() |
![]() |
![]() |
#9 | |
"Richard B. Woods"
Aug 2002
Wisconsin USA
22·3·641 Posts |
![]() Quote:
![]() (Sorry, CRG) But that doubles the potential number of sequences. 270. Last fiddled with by cheesehead on 2010-03-18 at 20:04 |
|
![]() |
![]() |
![]() |
#10 |
Aug 2006
22·1,493 Posts |
![]() ![]() 907, 977, 977, 36643, 1067749, 17777197, 71622461, 2389799983, 31252968359, 49460594569, ... The nth term is very roughly n * log 10 * 10^n, so I was pretty lucky getting that last term. The next one will probably need over 2 trillion. Anyone up to the task? I don't actually have a good segmented sieve coded at the moment... |
![]() |
![]() |
![]() |
#11 | |
"Ben"
Feb 2007
3,371 Posts |
![]() Quote:
![]() I have recently spent some time with my sieve, so decided to give this a shot. I just started a run to 2 trillion. Here is the output so far: Code:
found primes in range 0 to 1000000000 in elapsed time = 7.0227 **** 907 is 0 mod 10 **** **** 977 is 0 mod 100 **** **** 977 is 0 mod 1000 **** **** 36643 is 0 mod 10000 **** **** 1067749 is 0 mod 100000 **** **** 17777197 is 0 mod 1000000 **** **** 71622461 is 0 mod 10000000 **** sum of squares complete in elapsed time = 8.5178, sum is 16352255694497179054764665 found primes in range 1000000000 to 2000000000 in elapsed time = 5.9418 sum of squares complete in elapsed time = 7.9423, sum is 126512354351558021982865866 found primes in range 2000000000 to 3000000000 in elapsed time = 5.9503 **** 2389799983 is 0 mod 100000000 **** sum of squares complete in elapsed time = 7.7389, sum is 418923904898718760122282892 found primes in range 3000000000 to 4000000000 in elapsed time = 5.8990 sum of squares complete in elapsed time = 7.6150, sum is 979895993641271252685833855 found primes in range 4000000000 to 5000000000 in elapsed time = 5.8293 sum of squares complete in elapsed time = 7.4966, sum is 1894402266333772221759233898 - ben. |
|
![]() |
![]() |
![]() |
Thread Tools | |
![]() |
||||
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 |