login
A275990
a(n) = prime(prime(n)-1) - prime(n).
1
0, 0, 2, 6, 18, 24, 36, 42, 56, 78, 82, 114, 132, 138, 152, 186, 212, 220, 250, 278, 286, 318, 338, 368, 406, 440, 454, 470, 484, 500, 574, 602, 632, 648, 708, 712, 754, 790, 816, 848, 882, 888, 960, 970, 996, 1014, 1080, 1176, 1202, 1210, 1226, 1254, 1270, 1332, 1362, 1404
OFFSET
1,3
FORMULA
a(n) = A000040(A006093(n)) - A000040(n) = A055003(n) - A000040(n).
EXAMPLE
For n=3, prime(prime(3)-1) = 7, and prime(3) = 5, therefore a(3) = 7 - 5 = 2.
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