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.

Showing 1-6 of 6 results.

A327527 Number of uniform divisors of n.

Original entry on oeis.org

1, 2, 2, 3, 2, 4, 2, 4, 3, 4, 2, 5, 2, 4, 4, 5, 2, 5, 2, 5, 4, 4, 2, 6, 3, 4, 4, 5, 2, 8, 2, 6, 4, 4, 4, 7, 2, 4, 4, 6, 2, 8, 2, 5, 5, 4, 2, 7, 3, 5, 4, 5, 2, 6, 4, 6, 4, 4, 2, 9, 2, 4, 5, 7, 4, 8, 2, 5, 4, 8, 2, 8, 2, 4, 5, 5, 4, 8, 2, 7, 5, 4, 2, 9, 4, 4, 4, 6, 2, 9, 4, 5, 4, 4, 4, 8, 2, 5, 5, 7, 2, 8, 2, 6, 8
Offset: 1

Views

Author

Gus Wiseman, Sep 17 2019

Keywords

Comments

A number is uniform if its prime multiplicities are all equal, meaning it is a power of a squarefree number. Uniform numbers are listed in A072774. The maximum uniform divisor of n is A327526(n).

Examples

			The uniform divisors of 40 are {1, 2, 4, 5, 8, 10}, so a(40) = 6.
		

Crossrefs

See link for additional cross-references.

Programs

  • Mathematica
    Table[Length[Select[Divisors[n],SameQ@@Last/@FactorInteger[#]&]],{n,100}]
    a[n_] := Module[{e = FactorInteger[n][[;; , 2]]}, 1 + Total[2^Accumulate[Count[e, #] & /@ Range[Max[e], 1, -1]] - 1]]; a[1] = 1; Array[a, 100] (* Amiram Eldar, Dec 19 2023 *)
  • PARI
    isA072774(n) = { ispower(n, , &n); issquarefree(n); }; \\ From A072774
    A327527(n) = sumdiv(n,d,isA072774(d)); \\ Antti Karttunen, Nov 13 2021

Formula

From Amiram Eldar, Dec 19 2023: (Start)
a(n) = A034444(n) + A368251(n).
Sum_{k=1..n} a(k) ~ (n/zeta(2)) * (log(n) + 2*gamma - 1 - 2*zeta'(2)/zeta(2) + c * zeta(2)), where gamma is Euler's constant (A001620) and c = A368250. (End)

Extensions

Data section extended up to 105 terms by Antti Karttunen, Nov 13 2021

A072777 Powers of squarefree numbers that are not squarefree.

Original entry on oeis.org

4, 8, 9, 16, 25, 27, 32, 36, 49, 64, 81, 100, 121, 125, 128, 169, 196, 216, 225, 243, 256, 289, 343, 361, 441, 484, 512, 529, 625, 676, 729, 841, 900, 961, 1000, 1024, 1089, 1156, 1225, 1296, 1331, 1369, 1444, 1521, 1681, 1764, 1849
Offset: 1

Views

Author

Reinhard Zumkeller, Jul 10 2002

Keywords

Comments

For all n exists k: a(n) = A072774(k) and A072776(k) > 1.
Numbers k such that every prime in the prime factorization of k is raised to the same power > 1; k is a term iff k/A007947(k)^m = 1 for some m > 1. - David James Sycamore, Jun 12 2024

Examples

			The number 144 = 12^2 is not a member because 12 is not squarefree.
64 = 2^6 and 49 = 7^2 are members because, though not squarefree, they are powers of the squarefree numbers 2 and 7, respectively. Note that 64 is included even though it is also a square of a nonsquarefree number. - _Stanislav Sykora_, Jul 11 2014
		

Crossrefs

Cf. A005117, subsequence of A001597 and A072774.
Cf. A007947.

Programs

  • Haskell
    import Data.Map (singleton, findMin, deleteMin, insert)
    a072777 n = a072777_list !! (n-1)
    a072777_list = f 9 (drop 2 a005117_list) (singleton 4 (2, 2)) where
       f vv vs'@(v:ws@(w:_)) m
        | xx < vv = xx : f vv vs' (insert (bx*xx) (bx, ex+1) $ deleteMin m)
        | xx > vv = vv : f (w*w) ws (insert (v^3) (v, 3) m)
        where (xx, (bx, ex)) = findMin m
    -- Reinhard Zumkeller, Apr 06 2014
    
  • Mathematica
    Select[Range[2000], Length[u = Union[FactorInteger[#][[All, 2]]]] == 1 && u[[1]] > 1 &] (* Jean-François Alcover, Mar 27 2013 *)
  • PARI
    BelongsToA(n) = {my(f, k, e); if(n == 1, return(0));
    f = factor(n); e = f[1, 2]; if(e == 1, return(0));
    for(k = 2, #f[, 2], if(f[k, 2] != e, return(0))); return(1);}
    Ntest(nmax, test) = {my(k = 1, n = 0, v); v = vector(nmax); while(1, n++; if(test(n), v[k] = n; k++; if(k > nmax, break)); ); return(v); }
    a = Ntest(20000, BelongsToA) \\ Note: not very efficient. - Stanislav Sykora, Jul 11 2014
    
  • PARI
    is(n)=ispower(n,,&n) && issquarefree(n) \\ Charles R Greathouse IV, Oct 16 2015
    
  • Python
    from math import isqrt
    from sympy import mobius, integer_nthroot
    def A072777(n):
        def g(x): return int(sum(mobius(k)*(x//k**2) for k in range(1, isqrt(x)+1)))-1
        def f(x): return n-1+x-sum(g(integer_nthroot(x,k)[0]) for k in range(2,x.bit_length()))
        kmin, kmax = 1,2
        while f(kmax) >= kmax:
            kmax <<= 1
        while True:
            kmid = kmax+kmin>>1
            if f(kmid) < kmid:
                kmax = kmid
            else:
                kmin = kmid
            if kmax-kmin <= 1:
                break
        return kmax # Chai Wah Wu, Aug 19 2024

Formula

Sum_{n>=1} 1/a(n) = Sum_{n>=2} mu(n)^2/(n*(n-1)) = Sum_{n>=2} (zeta(n)/zeta(2*n) - 1) = 0.8486338679... (A368250). - Amiram Eldar, Jul 22 2020

A368249 a(n) = A002378(A005117(n)-1).

Original entry on oeis.org

0, 2, 6, 20, 30, 42, 90, 110, 156, 182, 210, 272, 342, 420, 462, 506, 650, 812, 870, 930, 1056, 1122, 1190, 1332, 1406, 1482, 1640, 1722, 1806, 2070, 2162, 2550, 2756, 2970, 3192, 3306, 3422, 3660, 3782, 4160, 4290, 4422, 4692, 4830, 4970, 5256, 5402, 5852, 6006
Offset: 1

Views

Author

Amiram Eldar, Dec 19 2023

Keywords

Comments

The squarefree oblong numbers (A229882) are all terms of this sequence, and their relative asymptotic density in it is A065474/A059956 = 0.530711... (A065469).

Crossrefs

Programs

  • Mathematica
    Table[n*(n - 1), {n, Select[Range[100], SquareFreeQ]}]
  • PARI
    lista(kmax) = forsquarefree(k=1, kmax, print1(k[1]*(k[1]-1), ", "));
    
  • Python
    from math import isqrt
    from sympy import mobius
    def A368249(n):
        def f(x): return int(n-sum(mobius(k)*(x//k**2) for k in range(2, isqrt(x)+1)))
        m, k = n, f(n)
        while m != k: m, k = k, f(k)
        return m*(m-1) # Chai Wah Wu, Dec 23 2024

Formula

Sum_{n>=2} 1/a(n) = Sum_{k>=2} (zeta(k)/zeta(2*k) - 1) = 0.848633... (A368250).

A368251 The number of nonsquarefree divisors of n that are powers of squarefree numbers (A072777).

Original entry on oeis.org

0, 0, 0, 1, 0, 0, 0, 2, 1, 0, 0, 1, 0, 0, 0, 3, 0, 1, 0, 1, 0, 0, 0, 2, 1, 0, 2, 1, 0, 0, 0, 4, 0, 0, 0, 3, 0, 0, 0, 2, 0, 0, 0, 1, 1, 0, 0, 3, 1, 1, 0, 1, 0, 2, 0, 2, 0, 0, 0, 1, 0, 0, 1, 5, 0, 0, 0, 1, 0, 0, 0, 4, 0, 0, 1, 1, 0, 0, 0, 3, 3, 0, 0, 1, 0, 0, 0
Offset: 1

Views

Author

Amiram Eldar, Dec 19 2023

Keywords

Comments

First differs from A046660 and A066301 at n = 36, and from A183094 at n = 72.
Let b(n, k) be the sequence that counts the divisors of n that are k-th powers of squarefree numbers. Then, b(n, 1) = A034444(n), b(n, 2) = A323308(n), b(n, 3) = A368248(n). b(n, k) is multiplicative with b(p^e, k) = 2 if e >= k, and 1 otherwise. The asymptotic mean of b(n, k) for k >= 2 is lim_{m->oo} (1/m) * Sum_{n=1..m} b(n, k) = zeta(k)/zeta(2*k). Since a(n) = Sum_{k>=2} (b(n, k) - 1), the formula for the asymptotic mean of this sequence follows (see the Formula section).

Crossrefs

Programs

  • Mathematica
    a[n_] := Module[{e = FactorInteger[n][[;; , 2]]}, 1 + Total[2^Accumulate[Count[e, #] & /@ Range[Max[e], 1, -1]] - 1] - 2^Length[e]]; a[1] = 0; Array[a, 100]
  • PARI
    a(n) = {my(f = factor(n), e, m, h, c); if(n == 1, 0, e = f[,2]; m = vecmax(e); h = vector(m); for(i = 1,m, c = 0; for(j = 1, #e, if(e[j] == (m+1-i), c++)); h[i] = c); for(i = 2, m, h[i] += h[i-1]); for(i = 1, m, h[i] = 2^h[i]-1); 1 + vecsum(h) - 1<<#e);}

Formula

a(n) = A327527(n) - A034444(n).
a(n) = 0 if and only if n is squarefree (A005117).
Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = Sum_{k>=2} (zeta(k)/zeta(2*k) - 1) = 0.848633... (A368250).

A370494 Oblong numbers of the form (k-1)*k where k is the product of an odd number of distinct primes.

Original entry on oeis.org

2, 6, 20, 42, 110, 156, 272, 342, 506, 812, 870, 930, 1332, 1640, 1722, 1806, 2162, 2756, 3422, 3660, 4290, 4422, 4830, 4970, 5256, 6006, 6162, 6806, 7832, 9312, 10100, 10302, 10506, 10920, 11342, 11772, 11990, 12656, 12882, 16002, 16770, 17030, 18632, 18906, 19182
Offset: 1

Views

Author

Amiram Eldar, Feb 20 2024

Keywords

Crossrefs

Complement of A370495 within A368249.

Programs

  • Mathematica
    Table[n*(n - 1), {n, Select[Range[150], MoebiusMu[#] == -1 &]}]
  • PARI
    lista(kmax) = forsquarefree(k=1, kmax, if(moebius(k) == -1, print1(k[1]*(k[1]-1), ", ")));
    
  • Python
    from math import isqrt, prod
    from sympy import primerange, integer_nthroot, primepi
    def A370494(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 g(x,a,b,c,m): yield from (((d,) for d in enumerate(primerange(b+1,isqrt(x//c)+1),a+1)) if m==2 else (((a2,b2),)+d for a2,b2 in enumerate(primerange(b+1,integer_nthroot(x//c,m)[0]+1),a+1) for d in g(x,a2,b2,c*b2,m-1)))
        def f(x): return int(n+x-primepi(x)-sum(sum(primepi(x//prod(c[1] for c in a))-a[-1][0] for a in g(x,0,1,1,i)) for i in range(3,x.bit_length(),2)))
        return (k:=bisection(f,n,n))*(k-1) # Chai Wah Wu, Jan 28 2025

Formula

a(n) = A002378(A030059(n)-1).
Sum_{n>=1} 1/a(n) = (A368250 + A033150 - 1)/2 = 0.776922504035... .

A370495 Oblong numbers of the form (k-1)*k where k is the product of an even number of distinct primes.

Original entry on oeis.org

0, 30, 90, 182, 210, 420, 462, 650, 1056, 1122, 1190, 1406, 1482, 2070, 2550, 2970, 3192, 3306, 3782, 4160, 4692, 5402, 5852, 6642, 7140, 7310, 7482, 8190, 8556, 8742, 8930, 11130, 12210, 13110, 13806, 14042, 14762, 15006, 16512, 17556, 17822, 19740, 20022, 20306
Offset: 1

Views

Author

Amiram Eldar, Feb 20 2024

Keywords

Crossrefs

Complement of A370494 within A368249.

Programs

  • Mathematica
    Table[n*(n - 1), {n, Select[Range[150], MoebiusMu[#] == 1 &]}]
  • PARI
    lista(kmax) = forsquarefree(k=1, kmax, if(moebius(k) == 1, print1(k[1]*(k[1]-1), ", ")));
    
  • Python
    from math import isqrt, prod
    from sympy import primerange, integer_nthroot, primepi
    def A370495(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 g(x,a,b,c,m): yield from (((d,) for d in enumerate(primerange(b+1,isqrt(x//c)+1),a+1)) if m==2 else (((a2,b2),)+d for a2,b2 in enumerate(primerange(b+1,integer_nthroot(x//c,m)[0]+1),a+1) for d in g(x,a2,b2,c*b2,m-1)))
        def f(x): return int(n-1+x-sum(sum(primepi(x//prod(c[1] for c in a))-a[-1][0] for a in g(x,0,1,1,i)) for i in range(2,x.bit_length(),2)))
        return (k:=bisection(f,n,n))*(k-1) # Chai Wah Wu, Jan 28 2025

Formula

a(n) = A002378(A030229(n)-1).
Sum_{n>=2} 1/a(n) = (A368250 - A033150 + 1)/2 = 0.071711363929... .
Showing 1-6 of 6 results.