login
A065139
Numbers n such that the sum of prime(n) and pi(n) is divisible by n.
2
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,2
LINKS
FORMULA
Solutions to pi(x) + prime(x) = A000720(x) + A000040(x) = 0 (mod x).
EXAMPLE
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.
MATHEMATICA
Do[ If[ IntegerQ[ (Prime[n] + PrimePi[n]) /n ], Print[n]], {n, 1, 5*10^7} ]
Select[ Range[10^8], IntegerQ[(Prime[ # ] + PrimePi[ # ])/ # ] & ]
PROG
(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
CROSSREFS
KEYWORD
nonn
AUTHOR
Labos Elemer, Oct 16 2001
EXTENSIONS
a(17)-a(19) from Donovan Johnson, Aug 21 2011
a(20)-a(28) from Giovanni Resta, Oct 15 2019
STATUS
approved