A382226 Smallest prime in a sequence of n consecutive primes which add to a perfect cube.
3, 439, 4812191, 41051, 1753, 75869, 24359, 1674289, 17509, 6221, 771653, 29863, 6899, 35353, 1073239, 4001, 18959, 1613741, 1033, 12077759, 172433, 1548149, 364079, 199, 4580399, 373, 3847, 411396253, 41863, 1371031, 11491, 135911, 45707, 308149, 364909, 176537, 2089, 32569961, 13619, 625861
Offset: 2
Keywords
Examples
a(2)=3 : 3 + 5 = 8 = 2^3 = A382227(2). a(3)=439 : 439 + 443 + 449 = 1331 = 11^3 = A382227(3) = A210205(1). a(4)=4812191 : 4812191 + 4812193 + 4812209 + 4812239 = 19248832 = 268^3 = A382227(4) = A248587(1).
Links
- David Dewan, Table of n, a(n) for n = 2..200
Programs
-
Maple
A382226 := proc(n) local i,ps,fp,lp ; fp := 2; ps := add(ithprime(j),j=1..n) ; lp := ithprime(n); for i from 1 do if isA000578(ps) then #code in A000578 return fp; end if; lp := nextprime(lp) ; ps := ps-fp+lp ; fp := nextprime(fp) ; end do: end proc: for n from 2 do print(n,A382226(n)) ; end do: # R. J. Mathar, Mar 25 2025
-
Mathematica
a[n_]:=Do[mid=PrimePi[k^3/n]; toTest=Prime[Range[Max[mid-n, 1], mid+n]]; t=Total/@Partition[toTest, n, 1];pos=Position[t, k^3];If[pos!={}, Return[First[toTest[[First[pos]]]]]], {k, 2 , Infinity} ];a/@Range[2, 10]
Formula
a(n) = { min prime(k): [ sum(j=k..k+n-1) prime(j)] in A000578 }.
Comments