A287027 Least sum s of consecutive prime numbers starting with prime(n) such that s is a perfect square.
100, 961, 36, 14017536, 484, 49, 36, 134689, 354025, 80089, 443556, 121, 47524, 7744, 100, 700569, 344956329, 48841, 5329, 144, 324, 39601, 22801, 8649, 239438955625, 12250000, 197136, 222784, 147456, 319225, 316969, 24649, 576, 2975625, 7396, 21316, 70036245333532859364
Offset: 1
Keywords
Examples
Sum of set {2,3,5,7,11,13,17,19,23} is 100 = 10^2, sum of set {3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83} is 961=31^2, sum of set {5,7,11,13}=36=6^2.
Crossrefs
Programs
-
Maple
f:= proc(n) local p, s; p:= ithprime(n); s:= p; while not issqr(s) do p:= nextprime(p); s:= s+p od: s end proc: map(f, [$1..36]); # Robert Israel, May 18 2017
-
Mathematica
Table[Set[{k, s}, {n, 0}]; While[! IntegerQ@ Sqrt[AddTo[s, Prime@ k]], k++]; s, {n, 36}] (* Michael De Vlieger, May 20 2017 *)
-
PARI
a(n) = my(s=0); forprime(p=prime(n), , s=s+p; if(issquare(s), return(s))) \\ Felix Fröhlich, May 25 2017
Extensions
Missing a(25) and a(37) from Giovanni Resta, May 18 2017
Comments