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.

A090120 Numbers k such that nextprime(k^2) - prevprime(k^2) = 4.

Original entry on oeis.org

3, 4, 9, 10, 14, 15, 20, 21, 26, 33, 40, 110, 117, 124, 146, 206, 237, 250, 273, 303, 309, 326, 340, 350, 387, 429, 436, 440, 441, 447, 470, 513, 561, 573, 609, 634, 686, 704, 807, 897, 920, 1004, 1035, 1054, 1060, 1071, 1113, 1124, 1143, 1156, 1233, 1239
Offset: 1

Views

Author

Labos Elemer, Jan 09 2004

Keywords

Comments

Note that the gap = 4 is partitioned either as 2+2 or as 3+1; 1+3 never occurs since n^2-1 is composite if n>2.

Examples

			k = 3 is a term since, k^2 = 9 is surrounded by the closest primes: {7,[9],11}.
k = 10 is a term since k^2 = 100 is surrounded by {97,[100],101}.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[3,1500], NextPrime[#^2] == NextPrime[#^2, -1] + 4 &] (* Giovanni Resta, May 26 2018 *)
  • PARI
    isok(n) = nextprime(n^2) - precprime(n^2) == 4; \\ Michel Marcus, May 26 2018

Formula

Solutions to {x; A007918(x^2)-A007917(x^2) = 4}.