A030626 Numbers with exactly 8 divisors.
24, 30, 40, 42, 54, 56, 66, 70, 78, 88, 102, 104, 105, 110, 114, 128, 130, 135, 136, 138, 152, 154, 165, 170, 174, 182, 184, 186, 189, 190, 195, 222, 230, 231, 232, 238, 246, 248, 250, 255, 258, 266, 273, 282, 285, 286, 290, 296, 297, 310, 318, 322, 328, 344, 345, 351, 354, 357, 366, 370, 374, 375, 376, 385, 399, 402
Offset: 1
Keywords
Links
- Jon E. Schoenfield, Table of n, a(n) for n = 1..10000 (first 1000 terms from R. J. Mathar)
- Jérôme Germoni, Nombres à huit diviseurs, Images des Mathématiques, CNRS, 2017 (in French).
- Eric Weisstein's World of Mathematics, Divisor Product.
Crossrefs
Programs
-
Magma
[n: n in [1..400] | DivisorSigma(0, n) eq 8]; // Vincenzo Librandi, Oct 05 2017
-
Maple
select(numtheory:-tau=8, [$1..1000]); # Robert Israel, Dec 17 2014
-
Mathematica
Select[Range[400], DivisorSigma[0, #]== 8 &] (* Vincenzo Librandi, Oct 05 2017 *)
-
PARI
Vec(select(x->x==8,vector(500, i, numdiv(i)),1)) \\ Michel Marcus, Dec 17 2014
-
Python
from sympy import divisor_count isok = lambda n: divisor_count(n) == 8 print([n for n in range(1, 400) if isok(n)]) # Darío Clavijo, Oct 17 2023
-
Python
from math import isqrt from sympy import primepi, primerange, integer_nthroot def A030626(n): def bisection(f,kmin=0,kmax=1): while f(kmax) > kmax: kmax <<= 1 kmin = kmax >> 1 while kmax-kmin > 1: kmid = kmax+kmin>>1 if f(kmid) <= kmid: kmax = kmid else: kmin = kmid return kmax def f(x): return int(n+x-sum(primepi(x//(k*m))-b for a,k in enumerate(primerange(integer_nthroot(x,3)[0]+1),1) for b,m in enumerate(primerange(k+1,isqrt(x//k)+1),a+1))-sum(primepi(x//p**3) for p in primerange(integer_nthroot(x,3)[0]+1))+primepi(integer_nthroot(x,4)[0])-primepi(integer_nthroot(x,7)[0])) return bisection(f,n,n) # Chai Wah Wu, Feb 21 2025
Formula
A000005(a(n))=8. - Juri-Stepan Gerasimov, Oct 10 2009
Comments