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

A064397 Numbers k such that prime(k) + prime(k+1) is a square.

Original entry on oeis.org

7, 15, 20, 61, 152, 190, 293, 377, 492, 558, 789, 919, 942, 1768, 2343, 2429, 2693, 2952, 3136, 3720, 4837, 5421, 5722, 6870, 7347, 8126, 8193, 9465, 9857, 9927, 10410, 10483, 10653, 12685, 13763, 13955, 16033, 16342, 17859, 18367, 18474
Offset: 1

Views

Author

Jason Earls, Sep 29 2001

Keywords

Examples

			For k=15: prime(15) = 47 and prime(16) = 53, 47 + 53 = 100 = 10^2.
		

Crossrefs

Cf. A061275 (the primes), A062703 (squares), A074924 (square root of sum), A000720.
Cf. A076305 (3 primes), A072849 (4 primes), A166255 (70 primes), A166261 (120 primes).

Programs

  • Magma
    [n: n in [0..50000]| IsSquare(NthPrime(n) +NthPrime(n+1))]; // Vincenzo Librandi, Apr 06 2011
  • Mathematica
    lst={};Do[p1=Prime[n];p2=Prime[n+1];q=(p1+p2)^0.5;If[q==IntegerPart[q], AppendTo[lst, n]], {n, 1, 9!}];lst (* Vladimir Joseph Stephan Orlovsky, Sep 02 2008 *)
  • PARI
    j=[]; for(n=1,30000,x=prime(n)+prime(n+1); if(issquare(x),j=concat(j,n))); j
    
  • PARI
    { n=0; default(primelimit, 8500000); for (m=1, 10^9, if (issquare(prime(m) + prime(m + 1)), write("b064397.txt", n++, " ", m); if (n==175, break)) ) } \\ Harry J. Smith, Sep 13 2009
    

Formula

a(n) = A000720(A061275(n)). - Amiram Eldar, Jun 28 2024
a(n) >> n^2/log^2 n. - Charles R Greathouse IV, Mar 08 2025

A051395 Numbers whose square is a sum of 4 consecutive primes.

Original entry on oeis.org

6, 18, 24, 42, 48, 70, 144, 252, 258, 358, 378, 388, 396, 428, 486, 506, 510, 558, 608, 644, 864, 886, 960, 974, 1022, 1046, 1326, 1362, 1392, 1398, 1422, 1434, 1442, 1468, 1476, 1592, 1604, 1676, 1820, 1950, 2016, 2068, 2140, 2288, 2430, 2460
Offset: 1

Views

Author

Zak Seidov, Jun 21 2003

Keywords

Comments

First of four consecutive primes in A206280.

Examples

			6 is a term because 6*6 = 5 + 7 + 11 + 13;
18 is a term because 18*18 = 324 = 73 + 79 + 83 + 89.
		

Crossrefs

Programs

  • PARI
    lista(nn) =  {pr = primes(nn); for (i = 1, nn - 3, s = pr[i] + pr[i+1] + pr[i+2] + pr[i+3]; if (issquare(s), print1(sqrtint(s), ", ")););} \\ Michel Marcus, Oct 02 2013
    
  • PARI
    is(n)=n*=n; my(p=precprime(n\4),q=nextprime(n\4+1),r,s); if(n < 3*q+p+8, r=precprime(p-1); s=n-p-q-r; ispseudoprime(s) && (s == precprime(r-1) || s == nextprime(q+1)), r=nextprime(q+1); s=n-p-q-r; ispseudoprime(s) && (s == precprime(p-1) || s == nextprime(r+1))) \\ Charles R Greathouse IV, Oct 02 2013

Formula

Numbers m such that m^2 = Sum_{i=k..k+3} prime(i) for some k.

Extensions

Corrected and extended by Don Reble, Nov 20 2006

A076305 Numbers k such that prime(k) + prime(k+1) + prime(k+2) is a square.

Original entry on oeis.org

6, 12, 59, 65, 112, 965, 1029, 1455, 1706, 1830, 1890, 2573, 3457, 4490, 4664, 5609, 7927, 9130, 10078, 10143, 12597, 18248, 19727, 20086, 20887, 21708, 22739, 25041, 26536, 28511, 29346, 29664, 29774, 33387, 39945, 40677, 46136, 49869, 58135
Offset: 1

Views

Author

Zak Seidov, Oct 05 2002

Keywords

Comments

See A076304 for the square roots of the sums of the three primes.

Examples

			6 is a term because prime(6) + prime(7) + prime(8) = 13 + 17 + 19 = 49 = 7^2.
		

Crossrefs

Cf. A076304 (square roots of sums), A080665 (squares = sums), A206279 (lesser of the primes).
Cf. A064397 (same for 2 primes), A072849 (4 primes), A166255 (70 primes), A166261 (120 primes).

Programs

Formula

a(n) = A000720(A206279(n)). - M. F. Hasler, Jan 03 2020

Extensions

Corrected by Ray Chandler, Sep 26 2006

A206280 Smallest of four consecutive primes whose sum is a square.

Original entry on oeis.org

5, 73, 137, 433, 569, 1217, 5171, 15859, 16631, 32027, 35677, 37619, 39191, 45767, 59029, 63997, 65011, 77813, 92401, 103669, 186601, 196201, 230387, 237161, 261089, 273517, 439559, 463747, 484397, 488573, 505511, 514079, 519803, 538739, 544627, 633599
Offset: 1

Views

Author

Harvey P. Dale, Feb 05 2012

Keywords

Examples

			a(4) = 433. The next three primes are 439, 443, and 449, and the sum of those four primes = 1764 = 42^2.
		

Crossrefs

Programs

  • Mathematica
    Transpose[Select[Partition[Prime[Range[80000]],4,1],IntegerQ[Sqrt[ Total[#]]]&]][[1]]

Formula

a(n) = A000040(A072849(n)). - Amiram Eldar, Jun 28 2024

A166255 Numbers k with property that the sum of 70 successive primes starting with prime(k) is a square.

Original entry on oeis.org

71, 201, 1024, 1594, 10915, 36934, 51050, 60054, 60914, 71822, 80331, 85230, 92916, 96352, 103271, 114667, 151019, 158591, 183484, 184348, 193979, 196078, 223587, 277476, 295890, 309502, 317601, 334181, 338139, 369101, 485330, 494188, 530832
Offset: 1

Views

Author

Zak Seidov, Oct 10 2009

Keywords

Comments

Sum_{i=k..k+69} prime(i) = s^2; and the values of s are A166256.

Examples

			prime(71)+...+prime(71+69) = 200^2 = A166256(1)^2,
prime(201)+...+prime(201+69) = 322^2 = A166256(2)^2,
prime(1024)+...+prime(1024+69) = 770^2 = A166256(3)^2.
		

Crossrefs

Cf. A166256.
Cf. A064397 (2 primes), A076305 (3 primes), A072849 (4 primes), A166261 (120 primes).

Programs

  • Mathematica
    PrimePi[First[#]]&/@Select[Partition[Prime[Range[1000000]],70,1], IntegerQ[ Sqrt[ Total[#]]]&] (* Harvey P. Dale, Jun 13 2011 *)

A166261 Numbers k with property that the sum of 120 successive primes starting with prime(k) is a square.

Original entry on oeis.org

10917, 11527, 50923, 73894, 111468, 118436, 128662, 139123, 195234, 249281, 332863, 435489, 438080, 482557, 538373, 542299, 650254, 679958, 722145, 803501, 810871, 820409, 962582, 970711, 1003544, 1027732, 1030010, 1190134, 1204929, 1305603, 1636065, 1689410
Offset: 1

Views

Author

Zak Seidov, Oct 10 2009

Keywords

Comments

Corresponding values of s = sqrt(Sum_{i=k..k+119} prime(i)) are A166262.

Examples

			a(1) = 10917: Sum_{i=0..119} prime(10917+i) = 3734^2 = A166262(1)^2,
a(2) = 11527: Sum_{i=0..119} prime(11527+i) = 3846^2 = A166262(2)^2.
		

Crossrefs

Cf. A166262.
Cf. A064397 (2 primes), A076305 (3 primes), A072849 (4 primes), A166255 (70 primes).

Programs

  • Mathematica
    PrimePi/@Select[Partition[Prime[Range[169*10^4]],120,1],IntegerQ[ Sqrt[ Total[ #]]]&][[All,1]] (* Harvey P. Dale, Jan 22 2019 *)
  • PARI
    lista(nn) = {pr = primes(nn); for (i=1, nn-119, s = sum(k=i, i+119, pr[k]); if (issquare(s), print1(i, ", ")););} \\ Michel Marcus, Oct 15 2013
    
  • PARI
    S=vecsum(primes(119)); p=0; q=prime(120); for(n=1,oo, issquare(S+=q-p) && print1(n","); q=nextprime(q+1); p=nextprime(p+1)) \\ It is about 25% faster to avoid "nextprime(p)" at expense of keeping the last 120 primes used in a vector p, using {my(i=Mod(0,120)); ...p[lift(i)+1]... i++}. - M. F. Hasler, Jan 04 2020

Extensions

a(30)-a(32) from Michel Marcus, Oct 15 2013
Edited by M. F. Hasler, Jan 04 2020

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

A358156 a(n) is the smallest number k such that the sum of k consecutive prime numbers starting with the n-th prime is a square.

Original entry on oeis.org

9, 23, 4, 1862, 14, 3, 2, 211, 331, 163, 366, 3, 124, 48, 2, 449, 8403, 121, 35, 2, 4, 105, 77, 43, 190769, 1726, 234, 248, 200, 295, 293, 73, 4, 873, 32, 64, 2456139382, 8, 4519, 14, 123, 5, 9395, 296, 26, 5, 3479, 810, 9, 7091, 1669, 157, 1189, 12559, 269, 4930, 21, 376, 3
Offset: 1

Views

Author

Todor Szimeonov, Nov 01 2022

Keywords

Comments

a(60) > 10^10 and a(68) > 10^13. - Martin Ehrenstein, Nov 09 2022

Examples

			For n=7, prime(7) = 17 and starting there 2 primes 17 + 19 = 36 which is square, so that a(7)=2.
		

Crossrefs

Cf. A000040, A000290, A105720, A230327 (exchanges the roles of n, k), A287027 (squares reached).
Indices of terms: A064397 (2's), A076305 (3's), A072849 (4's), A166255 (70's), A166261 (120's).

Programs

  • Maple
    f:= proc(n) local p,s,k;
      p:= ithprime(n); s:= p;
      for k from 2 do
        p:= nextprime(p);
        s:= s+p;
        if issqr(s) then return k fi
      od
    end proc:
    map(f, [$1..36]); # Robert Israel, Nov 08 2022
  • Mathematica
    a[n_] := Module[{p = s = Prime[n], k = 1}, While[! IntegerQ[Sqrt[s]], p = NextPrime[p]; s += p; k++]; k]; Array[a, 36] (* Amiram Eldar, Nov 08 2022 *)

Extensions

a(25)-a(36) from Robert Israel, Nov 08 2022
a(37)-a(59) from Martin Ehrenstein, Nov 09 2022
Showing 1-8 of 8 results.