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, 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.
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}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Zhi-Wei Sun, Mar 26 2012
STATUS
approved