[go: up one dir, main page]

login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A064777
Numbers k such that prime(k) - pi(k) is divisible by k.
0
1, 2, 3, 18, 42, 95, 524, 273585, 1735537, 4406057, 4406063, 4406188, 4406196, 4406341, 4406539, 4406541, 28703894, 73694240, 73694281, 73694287, 73694360, 73694363, 73694410, 3287860772, 3287860773, 3287860880, 3287860889, 3287860895, 3287860897
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
EXTENSIONS
a(18)-a(23) from Donovan Johnson, Apr 23 2010
a(24)-a(29) from Donovan Johnson, Oct 17 2012
STATUS
approved