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”).
%I #42 Nov 25 2024 09:08:43
%S 2,6,20,42,96,138,218,264,348,490,582,762,884,962,1086,1282,1510,1564,
%T 1890,2028,2110,2348,2570,2798,3128,3396,3528,3686,3798,3932,4672,
%U 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
%N a(n) = prime(prime(prime(n))) - prime(prime(n)).
%F a(n) = A168152(prime(n)) = A014689(prime(prime(n))).
%F a(n) = A038580(n) - A006450(n).
%F a(n) ~ n*(log(n))^3.
%F a(n) == 0 (mod 2).
%e For n=5, A038580(5)=127 and A006450(5)=31 so a(5) = 127 - 31 = 96.
%p a:= ithprime@@3-ithprime@@2:
%p seq(a(n), n=1..56); # _Alois P. Heinz_, Nov 18 2024
%t Nest[Prime, Range[100], 3] - PrimePi /@ Nest[Prime, Range[100], 3]
%o (PARI) a(n) = my(q=prime(prime(n))); prime(q) - q; \\ _Michel Marcus_, Nov 18 2024
%Y Cf. A000040, A006450, A038580, A014689, A168152.
%K nonn,easy,new
%O 1,1
%A _Sean M. Drury_, Nov 17 2024