login
A213367
Numbers that are not squares of primes.
4
1, 2, 3, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70
OFFSET
1,2
COMMENTS
Numbers m such that A000005(m) <> 3.
First differs from A175084 at a(29).
LINKS
FORMULA
a(n) = n+m+1 if n+m>=r^2 and a(n) = n+m otherwise where m = PrimePi(sqrt(n)) and r = A151800(floor(sqrt(n))) is the least prime > sqrt(n). Equivalently, a(n) = n+A056811(n)+1 if n+A056811(n)>=A230775(n+1)^2 and a(n) = n+A056811(n) otherwise. - Chai Wah Wu, Dec 01 2025
EXAMPLE
4 is not in the sequence because 4 has three divisors: 1, 2, 4.
MATHEMATICA
Delete[Range[Last[#]], List /@ #] & [Prime[Range[5]]^2] (* Paolo Xausa, Jun 27 2026 *)
PROG
(Python)
from math import isqrt
from sympy import primepi, nextprime
def A213367(n): return n+(m:=int(primepi(k:=isqrt(n))))+(n+m>=nextprime(k)**2) # Chai Wah Wu, Dec 01 2025
CROSSREFS
Complement of A001248. Column 3 of A210976.
Sequence in context: A355547 A031975 A028729 * A386267 A175084 A171519
KEYWORD
nonn,easy,changed
AUTHOR
Omar E. Pol, Aug 11 2012
STATUS
approved