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.

A107987 Odd composite numbers of the form p+2 where p is prime.

Original entry on oeis.org

9, 15, 21, 25, 33, 39, 45, 49, 55, 63, 69, 75, 81, 85, 91, 99, 105, 111, 115, 129, 133, 141, 153, 159, 165, 169, 175, 183, 195, 201, 213, 225, 231, 235, 243, 253, 259, 265, 273, 279, 285, 295, 309, 315, 319, 333, 339, 351, 355, 361, 369, 375, 381, 385, 391, 399
Offset: 1

Views

Author

Cino Hilliard, Jun 13 2005

Keywords

Crossrefs

Programs

  • Mathematica
    DeleteCases[Prime[Range[2,80]]+2,?PrimeQ] (* _Harvey P. Dale, Aug 15 2013 *)
  • PARI
    sum2pr(n) = \\ Composite numbers of form p+2.
    { c=0; cp=0; forprime(x=3, n, cp++; y=x+2; if(isprime(y)==0, c++; print1(y",") ) ); print(); print(c/cp+.) }

Formula

a(n) = A049591(n) + 2 = A067774(n+1) + 2. - Amiram Eldar, Jul 05 2024