OFFSET
1,2
EXAMPLE
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.
PROG
(PARI) f(n) = primepi((n+1)^2)-primepi(n^2); \\ A014085
a(n) = my(k=1, p=prime(n)); while(f(k) != p, k++); k; \\ Michel Marcus, Aug 16 2022
CROSSREFS
KEYWORD
nonn
AUTHOR
Daniel Tisdale, Jul 26 2009
EXTENSIONS
Extended by Ray Chandler, May 10 2010
STATUS
approved