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

A133450 Difference between 4*n^2 and the average of the two prime numbers which bracket this number.

Original entry on oeis.org

0, 1, 2, 0, 1, 0, 1, 2, 0, 1, 1, 2, 1, 4, 3, -2, -2, 2, 1, 1, -4, -5, -5, 1, 10, 1, 3, 7, -2, 0, 4, 0, 3, -5, 4, 0, 2, 12, 0, -9, -2, 6, -6, -3, 3, 0, 2, 1, -3, 10, -9, 1, 10, -3, 1, 0, 4, 2, -2, 5, 1, 1, 8, -12, 5, -1, 8, -2, 0, 0, -3, -1, 1, 2, 8, -4, 12, 3, 4, 5, 1, -2, -10, 0, 10
Offset: 1

Views

Author

Keywords

Examples

			a(1)=0 because 4 - (3 + 5)/2 = 0
a(2)=1 because 16 - (13 + 17)/2 = 1
a(3)=2 because 36 - (31 + 37)/2 = 2
a(4)=0 because 64 - (61 + 67)/2 = 0
a(5)=1 because 100 - (97 + 101)/2 = 1
		

Crossrefs

Programs

  • Mathematica
    Table[n^2-(Prime[PrimePi[n^2]]+Prime[PrimePi[n^2]+1])/2,{n,2,200,2}] (* Zak Seidov *)
    diff4[n_]:=Module[{x=4n^2},x-(NextPrime[x]+NextPrime[x,-1])/2]; Array[ diff4,90] (* Harvey P. Dale, Aug 31 2017 *)
  • PARI
    A133450(n)=4*n^2-(precprime(4*n^2)+nextprime(4*n^2))/2 \\ M. F. Hasler, Dec 26 2007

Formula

a(n) = A056929(2n). - M. F. Hasler, Dec 26 2007

Extensions

Corrected and extended by Zak Seidov, Dec 23 2007
Edited by N. J. A. Sloane, Dec 23 2007
Showing 1-1 of 1 results.