login
A275989
a(n) = prime(prime(n)+1) - prime(n).
1
3, 4, 8, 12, 26, 30, 44, 52, 66, 84, 100, 126, 140, 150, 176, 198, 222, 232, 270, 288, 300, 330, 350, 374, 424, 456, 466, 486, 492, 506, 592, 612, 650, 670, 714, 730, 772, 808, 830, 860, 890, 910, 972, 988, 1016, 1024, 1090, 1200, 1212, 1222, 1248, 1272, 1290, 1350, 1370, 1430, 1464
OFFSET
1,1
FORMULA
a(n) = A000040(A008864(n)) - A000040(n) = A072677(n) - A000040(n).
EXAMPLE
For n=3, prime(prime(3)+1) = 13, and prime(3) = 5, therefore a(3) = 13 - 5 = 8.
MATHEMATICA
Table[Prime[Prime[n]+1] - Prime[n], {n, 1, 100}]
PROG
(PARI) a(n) = prime(prime(n)+1) - prime(n); \\ Michel Marcus, Aug 18 2016
CROSSREFS
KEYWORD
nonn
AUTHOR
Terry D. Grant, Aug 15 2016
STATUS
approved