OFFSET
1,2
EXAMPLE
k = 18 is a term: prime(18) = 61, pi(18) = 7, and (61-7)/18 = 54/18 = 3.
MATHEMATICA
Do[ If[ IntegerQ[ (Prime[n] - PrimePi[n])/n ], Print[n]], {n, 1, 6*10^7} ]
Select[Range[5000000], Divisible[Prime[#]-PrimePi[#], #]&] (* Harvey P. Dale, Aug 12 2013 *)
PROG
(PARI) isok(k) = ((prime(k) - primepi(k)) % k) == 0; \\ Michel Marcus, Jun 15 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
Labos Elemer and Robert G. Wilson v, Oct 18 2001
EXTENSIONS
a(18)-a(23) from Donovan Johnson, Apr 23 2010
a(24)-a(29) from Donovan Johnson, Oct 17 2012
STATUS
approved