login
The position of first occurrence of n-th prime in A014085.
0

%I #9 Aug 16 2022 16:06:15

%S 1,4,10,16,39,45,57,82,79,117,134,192,193,218,240,256,284,343,359,415,

%T 386,467,484,501,550,627,595,739,612,724,815,785,872,868,1007,998,

%U 1064,1154,1086,1134,1173,1181,1260,1304,1357,1291,1515,1502,1545,1638,1590

%N The position of first occurrence of n-th prime in A014085.

%e The first ten terms of A014085 are 2,2,2,3,2,4,3,4,3,5. prime(1) = 2 is the first element, prime(2) = 3 is the 4th element, prime(3)= 5 is the 10th element; so 1,4,10 are the first three elements of this sequence.

%o (PARI) f(n) = primepi((n+1)^2)-primepi(n^2); \\ A014085

%o a(n) = my(k=1, p=prime(n)); while(f(k) != p, k++); k; \\ _Michel Marcus_, Aug 16 2022

%Y Cf. A014085.

%K nonn

%O 1,2

%A _Daniel Tisdale_, Jul 26 2009

%E Extended by _Ray Chandler_, May 10 2010