A166684 Numbers n such that d(n)<4.
1, 2, 3, 4, 5, 7, 9, 11, 13, 17, 19, 23, 25, 29, 31, 37, 41, 43, 47, 49, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 121, 127, 131, 137, 139, 149, 151, 157, 163, 167, 169, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251
Offset: 1
Links
- G. C. Greubel, Table of n, a(n) for n = 1..10000
Programs
-
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 *)
-
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
Formula
a(n) = A000430(n-1), n>1. - R. J. Mathar, May 21 2010
Extensions
Corrected (193 inserted) by R. J. Mathar, May 21 2010
Comments