OFFSET
1,7
LINKS
Harry J. Smith, Table of n, a(n) for n = 1..1000
EXAMPLE
n=25, p(25)=97, n - pi(n) = 25 - 9 = 16, a(25)=1 because 97 = 6*16 + 1.
MATHEMATICA
Table[Mod[Prime[n], n-PrimePi[n]], {n, 90}] (* Harvey P. Dale, Aug 04 2015 *)
PROG
(PARI) { for (n = 1, 1000, a=prime(n)%(n - primepi(n)); write("b065863.txt", n, " ", a) ) } \\ Harry J. Smith, Nov 02 2009
CROSSREFS
KEYWORD
nonn
AUTHOR
Labos Elemer, Nov 26 2001
STATUS
approved