cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A382226 Smallest prime in a sequence of n consecutive primes which add to a perfect cube.

This page as a plain text file.
%I A382226 #16 Mar 25 2025 10:16:30
%S A382226 3,439,4812191,41051,1753,75869,24359,1674289,17509,6221,771653,29863,
%T A382226 6899,35353,1073239,4001,18959,1613741,1033,12077759,172433,1548149,
%U A382226 364079,199,4580399,373,3847,411396253,41863,1371031,11491,135911,45707,308149,364909,176537,2089,32569961,13619,625861
%N A382226 Smallest prime in a sequence of n consecutive primes which add to a perfect cube.
%C A382226 a(1) does not exist because no single prime is a perfect cube.
%H A382226 David Dewan, <a href="/A382226/b382226.txt">Table of n, a(n) for n = 2..200</a>
%F A382226 a(n) = { min prime(k): [ sum(j=k..k+n-1) prime(j)] in A000578 }.
%e A382226 a(2)=3  :       3 + 5 = 8 = 2^3 = A382227(2).
%e A382226 a(3)=439 :      439 + 443 + 449 = 1331 = 11^3 = A382227(3) = A210205(1).
%e A382226 a(4)=4812191 :   4812191 + 4812193 + 4812209 + 4812239 = 19248832 = 268^3 = A382227(4) = A248587(1).
%p A382226 A382226 := proc(n)
%p A382226         local i,ps,fp,lp ;
%p A382226         fp := 2;
%p A382226         ps := add(ithprime(j),j=1..n) ;
%p A382226         lp := ithprime(n);
%p A382226         for i from 1 do
%p A382226                 if isA000578(ps) then #code in A000578
%p A382226                         return fp;
%p A382226                 end if;
%p A382226                 lp := nextprime(lp) ;
%p A382226                 ps := ps-fp+lp ;
%p A382226                 fp := nextprime(fp) ;
%p A382226         end do:
%p A382226 end proc:
%p A382226 for n from 2 do
%p A382226         print(n,A382226(n)) ;
%p A382226 end do:  # _R. J. Mathar_, Mar 25 2025
%t A382226 a[n_]:=Do[mid=PrimePi[k^3/n]; toTest=Prime[Range[Max[mid-n, 1], mid+n]];
%t A382226 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]
%Y A382226 Cf. A382227, A382228, A132955.
%K A382226 nonn
%O A382226 2,1
%A A382226 _David Dewan_, Mar 19 2025