cp's OEIS Frontend

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.

A030626 Numbers with exactly 8 divisors.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

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

Crossrefs

Essentially the same as A111398.

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
Equals A065036 (p*q^3) U A007304 (p*q*r) U A092759 (p^7). - Amarnath Murthy, Apr 21 2001