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.

A181962 Numbers not of the form pi(p) + pi(sqrt(p)) for some prime p.

Original entry on oeis.org

3, 6, 12, 19, 35, 45, 68, 80, 108, 156, 173, 231, 276, 297, 344, 425, 504, 537, 628, 695, 726, 833, 909, 1024, 1188, 1278, 1321, 1409, 1452, 1553, 1908, 2008, 2174, 2224, 2524, 2583, 2766, 2953, 3082, 3281, 3477, 3554, 3911, 3989, 4134, 4210, 4674, 5154, 5323
Offset: 1

Views

Author

Vladimir Shevelev, Apr 06 2012

Keywords

Comments

Or places of squares in A000430.

Examples

			12 is in the sequence, since pi(23)+pi(sqrt(23))=9+2=11, while pi(29)+pi(sqrt(29))=10+3=13.
Also 12 is in the sequence since A000430(12)=25 is not prime.
		

Crossrefs

Programs

  • Maple
    a:= n-> numtheory[pi](ithprime(n)^2)+n:
    seq(a(n), n=1..50);  # Alois P. Heinz, Feb 21 2025
  • Mathematica
    t = Table[PrimePi[n] + PrimePi[Sqrt[n]], {n, Prime[Range[10000]]}]; Complement[Range[t[[-1]]], t] (* T. D. Noe, Apr 09 2012 *)
  • Python
    from sympy import primepi, prime
    def A181962(n): return primepi(prime(n)**2)+n # Chai Wah Wu, Feb 18 2025

Formula

a(n) = pi(prime(n)^2) + n = A000879(n) + n. - Chai Wah Wu, Feb 18 2025