cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A065139 Numbers n such that the sum of prime(n) and pi(n) is divisible by n.

Original entry on oeis.org

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

Views

Author

Labos Elemer, Oct 16 2001

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.
		

Crossrefs

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

Formula

Solutions to pi(x) + prime(x) = A000720(x) + A000040(x) = 0 (mod x).

Extensions

a(17)-a(19) from Donovan Johnson, Aug 21 2011
a(20)-a(28) from Giovanni Resta, Oct 15 2019