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-4 of 4 results.

A132957 a(n) = sqrt(A132956(n)).

Original entry on oeis.org

6, 7, 6, 31, 60, 13, 38, 10, 372, 107, 48, 95, 22, 245, 84, 189, 94, 293, 160, 83, 200, 31, 34, 241, 84, 37, 180, 653, 246, 43, 86, 123, 278, 73, 140, 57, 198, 311, 180, 891, 704, 93, 558, 65, 1150, 233, 88, 429, 352, 329, 238, 485, 358, 307, 214, 163, 346, 709, 728
Offset: 2

Views

Author

Enoch Haga, Sep 06 2007

Keywords

Examples

			a(2)= sqrt(36)=6. a(3)=sqrt(49)=7.
		

Crossrefs

Programs

  • PARI
    a(n) = {ip = 1; while (! issquare(v=sum(i=ip, ip+n-1, prime(i))), ip++); sqrtint(v);} \\ Michel Marcus, Jun 08 2014

Extensions

Definition simplified, offset set to 2 by R. J. Mathar, Oct 30 2009

A132955 Smallest prime in a sequence of n consecutive primes which add to a perfect square.

Original entry on oeis.org

17, 13, 5, 181, 587, 13, 163, 2, 13789, 1013, 163, 653, 11, 3931, 397, 2039, 439, 4447, 1217, 269, 1733, 3, 5, 2239, 197, 3, 1061, 14563, 1901, 3, 149, 359, 2137, 67, 433, 11, 907, 2339, 673, 19181, 11593, 89, 6883, 3, 28571, 997, 43, 3559, 2287, 1931, 911
Offset: 2

Views

Author

Enoch Haga, Sep 06 2007

Keywords

Comments

Essentially the same as A073887.

Examples

			a(2)=17, because it is the smallest prime in a sequence of n=2 consecutive primes, which add to a perfect square, namely 17+19=36=6^2. The sums of earlier pairs, 2+3, 3+5, 5+7, 7+11 etc. fail to produces sums which are any perfect square.
		

Crossrefs

Programs

  • Mathematica
    Module[{prs=Prime[Range[3200]]},Table[First[SelectFirst[Partition[ prs, n,1],IntegerQ[ Sqrt[Total[#]]]&]],{n,2,52}]] (* The program uses the SelectFirst function from Mathematica version 10 *) (* Harvey P. Dale, Sep 06 2015 *)
  • PARI
    a(n) = {ip = 1; while (! issquare(sum(i=ip, ip+n-1, prime(i))), ip++); prime(ip);} \\ Michel Marcus, Jun 08 2014

Formula

a(n)={ min prime(k): [ sum(j=k..k+n-1) prime(j)] in A000290}. - R. J. Mathar, Nov 27 2007

Extensions

Edited by R. J. Mathar, Nov 27 2007

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.

A230327 Index of smallest prime such that the sum of n consecutive primes starting with this specific prime is a square.

Original entry on oeis.org

7, 6, 3, 42, 107, 6, 38, 1, 1631, 170, 38, 119, 5, 546, 78, 309, 85, 604, 199, 57, 270, 2, 3, 333, 45, 2, 178, 1708, 291, 2, 35, 72, 322, 19, 84, 5, 155, 346, 122, 2175, 1395, 24, 886, 2, 3108, 168, 14, 499, 340, 294, 156, 578, 325, 240, 115, 61, 283, 1035
Offset: 2

Views

Author

Michel Marcus, Oct 16 2013

Keywords

Examples

			a(2)=7 because 17+19 (2 terms) = 36 is a square, 17 being the 7th prime.
a(3)=6 because 13+17+19 (3 terms) =49 is a square, 13 being the 6th prime.
		

Crossrefs

Cf. A064397 (2 primes), A076305 (3 primes), A072849 (4 primes), A166255 (70 primes), A166261 (120 primes).
Cf. A132955 (primes themselves), A132956 (squares=sums), A132957 (square roots of sums).

Programs

  • PARI
    a(n, lim=10^5) = {n --; pr = primes(lim); for (i = 1, lim-n, s = sum(k=i, i+n, pr[k]); if (issquare(s), return (i));); return (0);} \\ Michel Marcus, Oct 16 2013
Showing 1-4 of 4 results.