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.

A080356 Number of twin primes between n and 2n: a(n) = number of j in range n <= j <= 2*n such that j and j+2 are primes.

Original entry on oeis.org

0, 1, 2, 1, 1, 1, 1, 1, 2, 2, 2, 1, 1, 1, 2, 2, 2, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 6, 6, 6, 7, 7, 7, 6, 6, 6, 6
Offset: 1

Views

Author

Labos Elemer, Feb 19 2003

Keywords

Examples

			n=36: between 36 and 72 the primes p such that (p,p+2) is a pair of twin primes are {41,59,71}, so a(36)=3.
		

Crossrefs

Programs

  • Mathematica
    Table[Count[Table[PrimeQ[j]&&PrimeQ[j+2], {j, n, 2*n}], True], {n, 1, 1000}]

Extensions

Definition clarified by N. J. A. Sloane, Aug 22 2021