OFFSET
1,1
EXAMPLE
p(10) mod (10-PrimePi(10)-1) = 29 mod (10-4-1) = 29 mod 5 = 4 and a(4)=10.
MATHEMATICA
a[n_] := (k = 4; While[ Mod[ Prime[k], k - PrimePi[k] - 1] != n, k++ ]; k); Table[ a[n], {n, 1, 29}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Labos Elemer, Jul 30 2002
EXTENSIONS
Edited by Robert G. Wilson v, Jul 31 2002
a(30) from Giovanni Resta, Sep 02 2019
STATUS
approved