A210640 a(n) = least integer m > 1 such that 2S_k^2 (k=1,...,n) are pairwise distinct modulo m, where S_k is the sum of the first k primes.
2, 4, 9, 13, 17, 28, 37, 37, 37, 37, 37, 61, 61, 61, 151, 151, 151, 151, 151, 151, 151, 227, 227, 227, 227, 227, 307, 307, 307, 337, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 509, 509, 509, 509, 509, 643, 727, 727, 761, 761, 761, 971, 971, 971
Offset: 1
Keywords
Examples
We have a(3)=9, because 2*2^2=8, 2*(2+3)^2=50, 2(2+3+5)^2=200 are pairwise distinct modulo m=9 but not pairwise distinct modulo any of 2, 3, 4, 5, 6, 7, 8.
Links
- Zhi-Wei Sun, Table of n, a(n) for n = 1..5258
- Zhi-Wei Sun, On functions taking only prime values, J. Number Theory 133(2013), no.8, 2794-2812.
- Zhi-Wei Sun, On sums of consecutive primes, a message to Number Theory List, March 23, 2012.
Programs
-
Mathematica
s[n_] := s[n] = Sum[Prime[k], {k,1,n}]; f[n_] := f[n] = 2*s[n]^2; R[n_,m_] := Union[Table[Mod[f[k],m], {k,1,n}]]; Do[Do[If[Length[R[n,m]] == n, Print[n," ",m]; Goto[aa]], {m,2,Max[2,n^2]}]; Print[n]; Label[aa]; Continue, {n,1,5000}]
Comments