login
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.
4
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,1
COMMENTS
If a(n) is an odd prime p_k then a(n)|2(S_k^2-S_{k-1}^2) and hence k>n. Zhi-Wei Sun conjectured that a(n) is a prime smaller than n^2 unless n divides 6.
LINKS
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.
EXAMPLE
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.
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}]
KEYWORD
nonn
AUTHOR
Zhi-Wei Sun, Mar 26 2012
STATUS
approved