Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #29 Oct 16 2019 06:08:38
%S 1,2,7,9,23,57,149,368,921,5863,14531,36087,36255,36257,233084,
%T 1505984,1151321194,1151321361,7826138122,967823489175,967823489458,
%U 967823489477,967823489490,967823489491,2545928465925,123116092093107,123116092093185,123116092094024
%N Numbers n such that the sum of prime(n) and pi(n) is divisible by n.
%H Giovanni Resta, <a href="/A065139/b065139.txt">Table of n, a(n) for n = 1..33</a>
%F Solutions to pi(x) + prime(x) = A000720(x) + A000040(x) = 0 (mod x).
%e p(233084) = 3242497, Pi(233084) = 20679; sum = 3263176 = 14*233084; order of quotient is log(n).
%e (prime(1505984) + pi(1505984))/1505984 = (23981141 + 114603)/1505984 = 16.
%t Do[ If[ IntegerQ[ (Prime[n] + PrimePi[n]) /n ], Print[n]], {n, 1, 5*10^7} ]
%t Select[ Range[10^8], IntegerQ[(Prime[ # ] + PrimePi[ # ])/ # ] & ]
%o (PARI) k=0;n=0;forprime(p=2,4e9,if(isprime(n++),k++);if((k+p)%n==0,print1(n", "))) \\ _Charles R Greathouse IV_, Aug 21 2011
%Y Cf. A000040, A000720, A006988.
%K nonn
%O 1,2
%A _Labos Elemer_, Oct 16 2001
%E a(17)-a(19) from _Donovan Johnson_, Aug 21 2011
%E a(20)-a(28) from _Giovanni Resta_, Oct 15 2019