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.

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