This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A030626 #82 Feb 21 2025 16:44:34 %S A030626 24,30,40,42,54,56,66,70,78,88,102,104,105,110,114,128,130,135,136, %T A030626 138,152,154,165,170,174,182,184,186,189,190,195,222,230,231,232,238, %U A030626 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 %N A030626 Numbers with exactly 8 divisors. %C A030626 Since A119479(8)=7, there are never more than 7 consecutive terms. Runs of 7 consecutive terms start at 171897, 180969, 647385, ... (subsequence of A049053). - _Ivan Neretin_, Feb 08 2016 %H A030626 Jon E. Schoenfield, <a href="/A030626/b030626.txt">Table of n, a(n) for n = 1..10000</a> (first 1000 terms from R. J. Mathar) %H A030626 Jérôme Germoni, <a href="http://images-archive.math.cnrs.fr/Nombres-a-huit-diviseurs.html">Nombres à huit diviseurs</a>, Images des Mathématiques, CNRS, 2017 (in French). %H A030626 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/DivisorProduct.html">Divisor Product</a>. %F A030626 A000005(a(n))=8. - _Juri-Stepan Gerasimov_, Oct 10 2009 %F A030626 Equals A065036 (p*q^3) U A007304 (p*q*r) U A092759 (p^7). - _Amarnath Murthy_, Apr 21 2001 %p A030626 select(numtheory:-tau=8, [$1..1000]); # _Robert Israel_, Dec 17 2014 %t A030626 Select[Range[400], DivisorSigma[0, #]== 8 &] (* _Vincenzo Librandi_, Oct 05 2017 *) %o A030626 (PARI) Vec(select(x->x==8,vector(500, i, numdiv(i)),1)) \\ _Michel Marcus_, Dec 17 2014 %o A030626 (Magma) [n: n in [1..400] | DivisorSigma(0, n) eq 8]; // _Vincenzo Librandi_, Oct 05 2017 %o A030626 (Python) %o A030626 from sympy import divisor_count %o A030626 isok = lambda n: divisor_count(n) == 8 %o A030626 print([n for n in range(1, 400) if isok(n)]) # _Darío Clavijo_, Oct 17 2023 %o A030626 (Python) %o A030626 from math import isqrt %o A030626 from sympy import primepi, primerange, integer_nthroot %o A030626 def A030626(n): %o A030626 def bisection(f,kmin=0,kmax=1): %o A030626 while f(kmax) > kmax: kmax <<= 1 %o A030626 kmin = kmax >> 1 %o A030626 while kmax-kmin > 1: %o A030626 kmid = kmax+kmin>>1 %o A030626 if f(kmid) <= kmid: %o A030626 kmax = kmid %o A030626 else: %o A030626 kmin = kmid %o A030626 return kmax %o A030626 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])) %o A030626 return bisection(f,n,n) # _Chai Wah Wu_, Feb 21 2025 %Y A030626 Essentially the same as A111398. %Y A030626 Cf. A000005, A007304, A049053, A065036, A092759, A119479. %K A030626 nonn %O A030626 1,1 %A A030626 _Jeff Burch_