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.

Showing 1-2 of 2 results.

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

Original entry on oeis.org

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

Views

Author

David Dewan, Mar 19 2025

Keywords

Comments

a(1) does not exist because no single prime is a perfect cube.

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).
		

Crossrefs

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 }.

A382227 The smallest perfect cube which is a sum of n consecutive primes.

Original entry on oeis.org

8, 1331, 19248832, 205379, 10648, 531441, 195112, 15069223, 175616, 68921, 9261000, 389017, 97336, 531441, 17173512, 68921, 343000, 30664297, 21952, 253636137, 3796416, 35611289, 8741816, 6859, 119095488, 12167, 110592, 11930499125, 1259712, 42508549, 373248, 4492125, 1560896, 10793861
Offset: 2

Views

Author

David Dewan, Mar 19 2025

Keywords

Comments

a(1) does not exist because no single prime is a perfect cube.

Examples

			a(2)=8        = 3 + 5.
a(3)=1331     = 439 + 443 + 449.
a(4)=19248832 = 4812191 + 4812193 + 4812209 + 4812239.
		

Crossrefs

Programs

  • Mathematica
    a[n_]:=Do[mid=PrimePi[k^3/n]; toTest=Prime[Range[Max[mid-n,1],mid+n]]; t=Total/@Partition[toTest,n,1]; If[MemberQ[t,k^3],Return[k^3]],{k,2,Infinity}]; a/@Range[2, 10]

Formula

a(n) = A382228(n)^3.
Showing 1-2 of 2 results.