A275991 a(n) = prime(composite(n)) - prime(n).
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
Examples
For n=3, prime(composite(3)) = 19, and prime(3) = 5, therefore a(3) = 19 - 5 = 14.
Links
- Harvey P. Dale, Table of n, a(n) for n = 1..1000
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 *)
Extensions
Previous Mathematica program replaced by Harvey P. Dale, Sep 02 2025