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.

A275991 a(n) = prime(composite(n)) - prime(n).

Original entry on oeis.org

5, 10, 14, 16, 18, 24, 26, 28, 30, 32, 40, 36, 38, 46, 50, 48, 44, 46, 46, 60, 64, 60, 66, 62, 66, 66, 70, 74, 84, 84, 72, 92, 90, 90, 84, 88, 94, 94, 96, 96, 92, 100, 102, 114, 114, 114, 106, 114, 120, 120, 126, 134, 138, 132, 132, 134, 140, 148, 144, 152, 156, 150
Offset: 1

Views

Author

Terry D. Grant, Aug 15 2016

Keywords

Examples

			For n=3, prime(composite(3)) = 19, and prime(3) = 5, therefore a(3) = 19 - 5 = 14.
		

Crossrefs

Cf. A088982.

Programs

  • Mathematica
    Module[{nn=100,cmps},cmps=Select[Range[nn],CompositeQ];Prime[cmps]-Prime[Range[Length[cmps]]]] (* Harvey P. Dale, Sep 02 2025 *)

Formula

a(n) = A000040(A002808(n)) - A000040(n) = A088982(n) - A000040(n).

Extensions

Previous Mathematica program replaced by Harvey P. Dale, Sep 02 2025