A065139 Numbers n such that the sum of prime(n) and pi(n) is divisible by n.
1, 2, 7, 9, 23, 57, 149, 368, 921, 5863, 14531, 36087, 36255, 36257, 233084, 1505984, 1151321194, 1151321361, 7826138122, 967823489175, 967823489458, 967823489477, 967823489490, 967823489491, 2545928465925, 123116092093107, 123116092093185, 123116092094024
Offset: 1
Keywords
Examples
p(233084) = 3242497, Pi(233084) = 20679; sum = 3263176 = 14*233084; order of quotient is log(n). (prime(1505984) + pi(1505984))/1505984 = (23981141 + 114603)/1505984 = 16.
Links
- Giovanni Resta, Table of n, a(n) for n = 1..33
Programs
-
Mathematica
Do[ If[ IntegerQ[ (Prime[n] + PrimePi[n]) /n ], Print[n]], {n, 1, 5*10^7} ] Select[ Range[10^8], IntegerQ[(Prime[ # ] + PrimePi[ # ])/ # ] & ]
-
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
Extensions
a(17)-a(19) from Donovan Johnson, Aug 21 2011
a(20)-a(28) from Giovanni Resta, Oct 15 2019