A030513 Numbers with 4 divisors.
6, 8, 10, 14, 15, 21, 22, 26, 27, 33, 34, 35, 38, 39, 46, 51, 55, 57, 58, 62, 65, 69, 74, 77, 82, 85, 86, 87, 91, 93, 94, 95, 106, 111, 115, 118, 119, 122, 123, 125, 129, 133, 134, 141, 142, 143, 145, 146, 155, 158, 159, 161, 166, 177, 178, 183, 185, 187
Offset: 1
References
- Wacław Sierpiński, Elementary Theory of Numbers, Ex. 2 p. 174, Warsaw, 1964.
Links
Crossrefs
Programs
-
Magma
[n: n in [1..200] | DivisorSigma(0, n) eq 4]; // Vincenzo Librandi, Jul 16 2015
-
Mathematica
Select[Range[200], DivisorSigma[0,#]==4&] (* Harvey P. Dale, Apr 06 2011 *)
-
PARI
is(n)=numdiv(n)==4 \\ Charles R Greathouse IV, May 18 2015
-
Python
from math import isqrt from sympy import primepi, integer_nthroot, primerange def A030513(n): def f(x): return int(n+x-primepi(integer_nthroot(x,3)[0])+(t:=primepi(s:=isqrt(x)))+(t*(t-1)>>1)-sum(primepi(x//k) for k in primerange(1, s+1))) m, k = n, f(n) while m != k: m, k = k, f(k) return m # Chai Wah Wu, Aug 16 2024
Formula
{n : A000005(n) = 4}. - Juri-Stepan Gerasimov, Oct 10 2009
Extensions
Incorrect comments removed by Charles R Greathouse IV, Mar 18 2010
Comments