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.

A234318 Squares t^2 = (p+q+r+s)/4 which are the arithmetic mean of four consecutive primes such that p < t^2 < q < r < s.

Original entry on oeis.org

15876, 35721, 59049, 65025, 488601, 828100, 1144900, 3857296, 4822416, 4901796, 5107600, 5322249, 5856400, 6100900, 6760000, 10536516, 11716929, 12503296, 13468900, 14197824, 14638276, 15163236, 18748900, 21455424, 22127616, 22638564, 24049216, 24098281, 24108100
Offset: 1

Views

Author

K. D. Bajpai, Dec 23 2013

Keywords

Examples

			15876 is in the sequence because 15876 = 126^2 = (15859+15877+15881+15887)/4, the arithmetic mean of four consecutive primes.
35721 is in the sequence because 35721 = 189^2 = (35677+35729+35731+35747)/4, the arithmetic mean of four consecutive primes.
		

Crossrefs

Cf. A000290 (squares: a(n) = n^2).
Cf. A062703 (squares: sum of two consecutive primes).
Cf. A069495 (squares: arithmetic mean of two consecutive primes).
Cf. A234240 (cubes: arithmetic mean of three consecutive primes).
Cf. A234297 (squares: arithmetic mean of three consecutive primes).

Programs

  • Maple
    KD := proc() local a,b,d,e,f,g; a:=n^2;b:=prevprime(a); d:=nextprime(a); e:=nextprime(d); f:=nextprime(e); g:=(b+d+e+f)/4; if a=g then RETURN (a); fi; end: seq(KD(), n=2..10000);
  • Mathematica
    fcpQ[{a_,b_,c_,d_}]:=Module[{m=Mean[{a,b,c,d}]},IntegerQ[ Sqrt[ m]] && a< m< b]; Mean/@Select[Partition[Prime[Range[1600000]],4,1],fcpQ] (* Harvey P. Dale, Apr 24 2017 *)
  • PARI
    list(lim)=my(v=List(), p=2, q=3, r=5, t); forprime(s=7, nextprime(nextprime(lim+1)+1), t=(p+q+r+s)/4; if(denominator(t)==1 && issquare(t) && t < q, listput(v, t)); p=q; q=r; r=s); Vec(v) \\ Charles R Greathouse IV, Jan 03 2014

Extensions

Definition corrected by Michel Marcus and Charles R Greathouse IV, Jan 03 2014