login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A378027
a(n) = prime(prime(prime(n))) - prime(prime(n)).
0
2, 6, 20, 42, 96, 138, 218, 264, 348, 490, 582, 762, 884, 962, 1086, 1282, 1510, 1564, 1890, 2028, 2110, 2348, 2570, 2798, 3128, 3396, 3528, 3686, 3798, 3932, 4672, 4884, 5096, 5316, 5802, 5946, 6274, 6640, 6850, 7190, 7464, 7632, 8166, 8290, 8538, 8642, 9334, 10334, 10520, 10650, 10830, 11048, 11240, 11872, 12088, 12508
OFFSET
1,1
FORMULA
a(n) = A168152(prime(n)) = A014689(prime(prime(n))).
a(n) = A038580(n) - A006450(n).
a(n) ~ n*(log(n))^3.
a(n) == 0 (mod 2).
EXAMPLE
For n=5, A038580(5)=127 and A006450(5)=31 so a(5) = 127 - 31 = 96.
MAPLE
a:= ithprime@@3-ithprime@@2:
seq(a(n), n=1..56); # Alois P. Heinz, Nov 18 2024
MATHEMATICA
Nest[Prime, Range[100], 3] - PrimePi /@ Nest[Prime, Range[100], 3]
PROG
(PARI) a(n) = my(q=prime(prime(n))); prime(q) - q; \\ Michel Marcus, Nov 18 2024
CROSSREFS
KEYWORD
nonn,easy,new
AUTHOR
Sean M. Drury, Nov 17 2024
STATUS
approved