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.

A061351 Between p and the next prime either there are no numbers or there is a single squarefree number.

Original entry on oeis.org

2, 5, 29, 41, 101, 137, 281, 461, 569, 617, 641, 821, 857, 1229, 1289, 1301, 1481, 1697, 1721, 1877, 2081, 2129, 2237, 2309, 2381, 2657, 2729, 2801, 3389, 3461, 3557, 3917, 3929, 4001, 4217, 4241, 4421, 4637, 4721, 5009, 5441, 5477, 5501, 5657, 6089
Offset: 0

Views

Author

Labos Elemer, Jun 07 2001

Keywords

Comments

Apart from the initial 2, the lesser of twin primes {p, p+2} such that the middle term p+1 is squarefree: intersection[{A014574(n)},{A005117(n)}].

Examples

			Between 29 and 31 the only composite is 30, a squarefree number. If next(p)-p>2, a nonsquarefree integer always arises between them.
		

Crossrefs

Programs

  • Mathematica
    Join[{2},Select[Partition[Prime[Range[800]],2,1],#[[2]]-#[[1]]==2&&SquareFreeQ[#[[1]]+1]&][[;;,1]]] (* Harvey P. Dale, Jan 26 2025 *)
  • PARI
    { n=0; p=3; f="b061351.txt"; write(f, "0 2"); forprime (q=5, 355723, if (q-p == 2, if (issquarefree(p+1), write(f, n++, " ", p))); p=q ) } \\ Harry J. Smith, Jul 21 2009