A233862 Prime(k), where k is such that (1 + Sum_{i=1..k} prime(i)^2) / k is an integer.
2, 3, 5, 7, 13, 23, 37, 41, 101, 107, 197, 317, 1033, 2029, 2357, 2473, 2879, 5987, 6173, 35437, 56369, 81769, 195691, 199457, 793187, 850027, 1062931, 1840453, 2998421, 4217771, 6200923, 9914351, 10153807, 13563889, 18878099, 60767923, 118825361, 170244929
Offset: 1
Keywords
Examples
a(5) = 13, because 13 is the 6th prime and the sum of the first 6 primes^2+1 = 378 when divided by 6 equals 63 which is an integer.
Links
- Bruce Garner, Table of n, a(n) for n = 1..66 (first 50 terms from Robert Price)
- OEIS Wiki, Sums of powers of primes divisibility sequences
Crossrefs
Programs
-
Mathematica
t = {}; sm = 1; Do[sm = sm + Prime[n]^2; If[Mod[sm, n] == 0, AppendTo[t, Prime[n]]], {n, 100000}]; t (* Derived from A217599 *) Module[{nn=9600000},Prime[#]&/@Transpose[Select[Thread[{Range[nn], 1+ Accumulate[ Prime[Range[nn]]^2]}],IntegerQ[Last[#]/First[#]]&]][[1]]] (* Harvey P. Dale, Sep 09 2014 *)
-
PARI
is(n)=if(!isprime(n),return(0)); my(t=primepi(n),s); forprime(p=2,n,s+=Mod(p,t)^2); s==0 \\ Charles R Greathouse IV, Nov 30 2013
Comments