OFFSET
1,2
COMMENTS
1 together with primes and squares of primes.
Numbers n such that A229964(n) = 0. - Eric M. Schmidt, Oct 05 2013
Numbers that cannot be written as a product of 2 distinct nonunits. - Peter Munn, May 26 2023
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..10000
FORMULA
a(n) = A000430(n-1), n>1. - R. J. Mathar, May 21 2010
MATHEMATICA
Select[Range[300], DivisorSigma[0, #]<4&] (* or *) Select[With[ {prs = Prime[Range[200]]}, Union[Join[{1}, prs, prs^2]]], #<301&] (* Harvey P. Dale, Jan 04 2012 *)
PROG
(PARI) is(n)=isprime(n) || (issquare(n, &n) && isprime(n)) || n==1 \\ Charles R Greathouse IV, Dec 23 2022
(Python)
from math import isqrt
from sympy import primepi
def A166684(n):
def f(x): return n-1+x-primepi(x)-primepi(isqrt(x))
m, k = n, f(n)
while m != k:
m, k = k, f(k)
return int(m) # Chai Wah Wu, Aug 09 2024
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Juri-Stepan Gerasimov, Oct 18 2009
EXTENSIONS
Corrected (193 inserted) by R. J. Mathar, May 21 2010
STATUS
approved