A085450 a(n) is the smallest m > 1 such that m divides Sum_{k=1..m} prime(k)^n.
23, 19, 25, 2951, 25, 4357, 25, 43, 281525, 269, 25, 37, 23, 295, 17, 3131, 395191, 37, 25, 19, 139, 1981, 23, 37, 25, 455, 25, 41, 124403, 61, 17, 511, 193, 535, 23, 5209, 1951, 19, 25, 301, 891, 9805, 25, 527, 23, 83, 17, 37, 131, 43, 25, 193, 53, 37, 25, 19
Offset: 1
Keywords
Examples
a(3) = 25 because 2^3+3^3+5^3...+prime(25)^3 == 0 (mod 25) and for 1 < n < 25 2^3+3^3+...+prime(n)^3 is not congruent to zero (mod n).
Links
- Alexander Adamchuk and Robert Price, Table of n, a(n) for n = 1..655 (first 323 terms from Alexander Adamchuk)
Crossrefs
Programs
-
Mathematica
a[n_] := Block[{m = 2, s = 2^n}, While[s = s + Prime[m]^n; Mod[s, m] != 0, m++ ]; m]; Table[ a[n], {n, 1, 56}] a[n_] := Block[{m = 2, s = 2^n}, While[s = s + Prime[m]^n; Mod[s, m] != 0&& m<10000000, m++ ]; m]; Table[ a[n], {n, 1, 1000}] (* Alexander Adamchuk, Jul 20 2008 *)
-
PARI
a(n)=my(s=2^n,m=1); forprime(p=3,, if((s+=p^n)%m++==0, return(m))) \\ Charles R Greathouse IV, Feb 06 2015
Formula
For[m=2, Mod[Sum[Prime[k]^n, {k, m}], m]!=0, m++ ]; m
Extensions
Edited and extended by Robert G. Wilson v, Aug 14 2003
Comments