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-8 of 8 results.

A052409 a(n) = largest integer power m for which a representation of the form n = k^m exists (for some k).

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Greatest common divisor of all prime-exponents in canonical factorization of n for n>1: a(n)>1 iff n is a perfect power; a(A001597(k))=A025479(k). - Reinhard Zumkeller, Oct 13 2002
a(1) set to 0 since there is no largest finite integer power m for which a representation of the form 1 = 1^m exists (infinite largest m). - Daniel Forgues, Mar 06 2009
A052410(n)^a(n) = n. - Reinhard Zumkeller, Apr 06 2014
Positions of 1's are A007916. Smallest base is given by A052410. - Gus Wiseman, Jun 09 2020

Examples

			n = 72 = 2*2*2*3*3: GCD[exponents] = GCD[3,2] = 1. This is the least n for which a(n) <> A051904(n), the minimum of exponents.
For n = 10800 = 2^4 * 3^3 * 5^2, GCD[4,3,2] = 1, thus a(10800) = 1.
		

Crossrefs

Apart from the initial term essentially the same as A253641.
Differs from A051904 for the first time at n=72, where a(72) = 1, while A051904(72) = 2.
Differs from A158378 for the first time at n=10800, where a(10800) = 1, while A158378(10800) = 2.

Programs

Formula

a(1) = 0; for n > 1, a(n) = gcd(A067029(n), a(A028234(n))). - Antti Karttunen, Aug 07 2017

Extensions

More terms from Labos Elemer, Jun 17 2002

A072103 Sorted perfect powers a^b for a, b > 1 with duplication.

Original entry on oeis.org

4, 8, 9, 16, 16, 25, 27, 32, 36, 49, 64, 64, 64, 81, 81, 100, 121, 125, 128, 144, 169, 196, 216, 225, 243, 256, 256, 256, 289, 324, 343, 361, 400, 441, 484, 512, 512, 529, 576, 625, 625, 676, 729, 729, 729, 784, 841, 900, 961, 1000, 1024, 1024, 1024, 1089
Offset: 1

Views

Author

Eric W. Weisstein, Jun 18 2002

Keywords

Comments

If b is the largest integer such that n=a^b for some a > 1, then n occurs d(b)-1 times in this sequence (where d = A000005 is the number of divisors function). (This includes the case where b=1 and n does not occur in the sequence.) - M. F. Hasler, Jan 25 2015

Examples

			(a,b) = (2,4) and (4,2) both yield 2^4 = 4^2 = 16, therefore 16 is listed twice.
Similarly, 64 is listed 3 times since (a,b) = (2,6), (4,3) and (8,2) all yield 64.
		

Crossrefs

Programs

  • Haskell
    import Data.Set (singleton, findMin, deleteMin, insert)
    a072103 n = a072103_list !! (n-1)
    a072103_list = f 9 3 $ Set.singleton (4,2) where
       f zz z s
         | xx < zz   = xx : f zz z (Set.insert (x*xx, x) $ Set.deleteMin s)
         | otherwise = zz : f (zz+2*z+1) (z+1) (Set.insert (z*zz, z) s)
         where (xx, x) = Set.findMin s
    -- Reinhard Zumkeller, Oct 04 2012
    
  • Maple
    N:= 2000: # to get all entries <= N
    sort([seq(seq(a^b, b = 2 .. floor(log[a](N))), a = 2 .. floor(sqrt(N)))]); # Robert Israel, Jan 25 2015
  • Mathematica
    nn=60;Take[Sort[#[[1]]^#[[2]]&/@Tuples[Range[2,nn],2]],nn] (* Harvey P. Dale, Oct 03 2012 *)
  • PARI
    is_A072103(n)=ispower(n)
    for(n=1,999,(e=ispower(n))||next;fordiv(e,d,d>1 && print1(n","))) \\ M. F. Hasler, Jan 25 2015
    
  • Python
    import numpy
    from math import isqrt
    upto = 1090
    A072103 = []
    for m in range(2,isqrt(upto)+1):
        k = 2
        while m**k < upto:
            A072103.append(m**k)
            k += 1
    print(sorted(A072103)) # Karl-Heinz Hofmann, Sep 16 2023

Formula

Sum_{i>=2} Sum_{j>=2} 1/i^j = 1.

Extensions

Offset corrected and examples added by M. F. Hasler, Jan 25 2015

A175064 a(1) = 1; for n >= 2, a(n) = number of ways h to write the n-th perfect power A001597(n) as m^k with m >= 2 and k >= 1.

Original entry on oeis.org

1, 2, 2, 2, 3, 2, 2, 2, 2, 2, 4, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 3, 2, 2, 3, 2, 4, 2, 2, 2, 2, 2, 4, 2, 2, 2, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 6, 2, 2, 2, 2
Offset: 1

Views

Author

Jaroslav Krizek, Jan 23 2010

Keywords

Comments

Perfect powers with first occurrence of h >= 2: 4, 16, 64, 65536, 4096, ... [The perfect power corresponding to h is A175065(h) = 2^A005179(h). - Jianing Song, Oct 27 2024]

Examples

			For n = 11: A001597(11) = 64; there are 4 ways to write 64 as m^k: 64^1 = 8^2 = 4^3 = 2^6.
		

Crossrefs

Programs

  • Python
    from math import gcd
    from sympy import mobius, integer_nthroot, divisor_count, factorint
    def A175064(n):
        if n == 1: return 1
        def f(x): return int(n-2+x+sum(mobius(k)*(integer_nthroot(x,k)[0]-1) 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 divisor_count(gcd(*factorint(kmax).values())) # Chai Wah Wu, Aug 13 2024

Formula

a(n) = A000005(A253641(A001597(n))) = A253642(n)+1. - M. F. Hasler, Jan 25 2015

Extensions

Extended by T. D. Noe, Apr 21 2011
Definition clarified by Jonathan Sondow, Nov 30 2012

A253642 Number of ways the perfect power A001597(n) can be written as a^b, with a, b > 1.

Original entry on oeis.org

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

Views

Author

M. F. Hasler, Jan 25 2015

Keywords

Comments

Run lengths of A072103. Also, the terms a(n) which exceed 1 constitute A175066. - Andrey Zabolotskiy, Aug 17 2016

Examples

			a(1)=0 since A001597(1)=1 can be written as a^b for a=1 and any b, but not using a base a > 1.
a(2)=a(3)=a(4)=1 since the following terms 4=2^2, 8=2^3 and 9=3^2 can be written as perfect powers in only one way.
a(5)=2 since A001597(5)=16=a^b for (a,b)=(2,4) and (4,2).
		

Crossrefs

Programs

  • PARI
    for(n=1,9999,(e=ispower(n))&&print1(numdiv(e)-1,","))
    
  • Python
    from math import gcd
    from sympy import mobius, integer_nthroot, divisor_count, factorint
    def A253642(n):
        if n == 1: return 0
        def f(x): return int(n-2+x+sum(mobius(k)*(integer_nthroot(x,k)[0]-1) 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 divisor_count(gcd(*factorint(kmax).values()))-1 # Chai Wah Wu, Aug 13 2024

Formula

a(n) = A000005(A253641(A001597(n))) - 1.
a(n) = A175064(n) - 1.

A175067 a(n) is the sum of perfect divisors of n, where a perfect divisor of n is a divisor d such that d^k = n for some k >= 1.

Original entry on oeis.org

1, 2, 3, 6, 5, 6, 7, 10, 12, 10, 11, 12, 13, 14, 15, 22, 17, 18, 19, 20, 21, 22, 23, 24, 30, 26, 30, 28, 29, 30, 31, 34, 33, 34, 35, 42, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 56, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 78, 65, 66, 67, 68, 69, 70, 71, 72
Offset: 1

Views

Author

Jaroslav Krizek, Jan 23 2010

Keywords

Comments

a(n) > n for perfect powers n = A001597(m) for m > 2.

Examples

			For n = 8: a(8) = 10; there are two perfect divisors of 8: 2 and 8; their sum is 10.
		

Crossrefs

Programs

  • Maple
    A175067:= proc(n) local a, d, k; if n=1 then return 1 end if; a:=0; for d in numtheory[divisors](n) minus {1} do for k do if d^k=n then a:= a+d end if; if n <= d^k then break; end if; end do; end do; a end proc:
    seq(A175067(n), n=1..80); # Ridouane Oudra, Dec 12 2024
    # second Maple program:
    a:= n-> add(`if`(n=d^ilog[d](n), d, 0), d=numtheory[divisors](n)):
    seq(a(n), n=1..72);  # Alois P. Heinz, Dec 12 2024
  • Mathematica
    Table[Plus @@ (n^(1/Divisors[GCD @@ FactorInteger[n][[All, 2]]])), {n, 72}] (* Ivan Neretin, May 13 2015 *)

Formula

a(n) = A175070(n) + n. [Jaroslav Krizek, Jan 24 2010]
From Ridouane Oudra, Dec 12 2024: (Start)
a(n) = n, for n in A007916.
a(n^m) = Sum_{d|m} n^d, for n in A007916 and m an integer >0.
More generally, for all integers n we have :
a(n) = Sum_{d|A253641(n)} n^(d/A253641(n)).
a(n) = Sum_{d|A253641(n)} A052410(n)^d. (End)

Extensions

Name edited by Michel Marcus, Jun 13 2018

A175068 a(n) = product of perfect divisors of n.

Original entry on oeis.org

1, 2, 3, 8, 5, 6, 7, 16, 27, 10, 11, 12, 13, 14, 15, 128, 17, 18, 19, 20, 21, 22, 23, 24, 125, 26, 81, 28, 29, 30, 31, 64, 33, 34, 35, 216, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 343, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 4096, 65, 66, 67, 68, 69, 70
Offset: 1

Views

Author

Jaroslav Krizek, Jan 23 2010

Keywords

Comments

A perfect divisor d of n is a divisor such that d^k = n for some k >= 1.

Examples

			For n = 8: a(8) = 16; there are two perfect divisors of 8: 2 and 8; their product is 16.
		

Crossrefs

Programs

  • Maple
    A175068 := proc(n) local a,d,k ; if n = 1 then return 1; end if; a := 1 ; for d in numtheory[divisors](n) minus {1} do for k from 1 do if d^k = n then a := a*d ; end if; if d^k >= n then break; end if; end do: end do: a ; end proc:
    seq(A175068(n),n=1..80) ; # R. J. Mathar, Apr 14 2011
  • Mathematica
    Table[Times@@Select[Rest[Divisors[n]],IntegerQ[Log[#,n]]&],{n,70}] (* Harvey P. Dale, May 01 2017 *)
  • PARI
    A175068(n) = { my(m=1); fordiv(n,d,if((1==d)||(d^valuation(n,d))==n,m*=d)); (m); }; \\ Antti Karttunen, Nov 21 2017

Formula

a(n) > n for perfect powers n = A001597(m) for m > 2.
a(n) = A175069(n) * n. - Jaroslav Krizek, Jan 24 2010
From Ridouane Oudra, Nov 23 2024: (Start)
a(n) = n, for n in A007916.
a(n^m) = n^sigma(m), for n in A007916 and m an integer.
More generally, for all integer n we have :
a(n) = n^(sigma(A253641(n))/A253641(n)).
a(n) = n^(A346403(n)/A253641(n)). (End)

A259362 a(1) = 1, for n > 1: a(n) is the number of ways to write n as a nontrivial perfect power.

Original entry on oeis.org

1, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0
Offset: 1

Views

Author

Doug Bell, Jun 24 2015

Keywords

Comments

a(n) = number of integer pairs (i,j) for distinct values of i where i > 0, j > 1 and n = i^j. Since 1 = 1^r for all real values of r, the requirement for a distinct i causes a(1) = 1 instead of a(1) = infinity.
Alternatively, the sequence can be defined as: a(1) = 1, for n > 1: a(n) = number of pairs (i,j) such that i > 0, j > 1 and n = i^j.
A007916 = n, where a(n) = 0.
A001597 = n, where a(n) > 0.
A175082 = n, where n = 1 or a(n) = 0.
A117453 = n, where n = 1 or a(n) > 1.
A175065 = n, where n > 1 and a(n) > 0 and this is the first occurrence in this sequence of a(n).
A072103 = n repeated a(n) times where n > 1.
A075802 = min(1, a(n)).
A175066 = a(n), where n = 1 or a(n) > 1. This sequence is an expansion of A175066.
A253642 = 0 followed by a(n), where n > 1 and a(n) > 0.
A175064 = a(1) followed by a(n) + 1, where n > 1 and a(n) > 0.
Where n > 1, A001597(x) = n (which implies a(n) > 0), i = A025478(x) and j = A253641(n), then a(n) = A000005(j) - 1, which is the number of factors of j greater than 1. The integer pair (i,j) comprises the smallest value i and the largest value j where i > 0, j > 1 and n = i^j. The a(n) pairs of (a,b) where a > 0, b > 1 and n = a^b are formed with b = each of the a(n) factors of j greater than 1. Examples for n = {8,4096}:
a(8) = 1, A001597(3) = 8, A025478(3) = 2, A253641(8) = 3, 8 = 2^3 and A000005(3) - 1 = 1 because there is one factor of 3 greater than 1 [3]. The set of pairs (a,b) is {(2,3)}.
a(4096) = 5, A001597(82) = 4096, A025478(82) = 2, A253641(4096) = 12, 4096 = 2^12 and A000005(12) - 1 = 5 because there are five factors of 12 greater than 1 [2,3,4,6,12]. The set of pairs (a,b) is {(64,2),(16,3),(8,4),(4,6),(2,12)}.
A023055 = the ordered list of x+1 with duplicates removed, where x is the number of consecutive zeros appearing in this sequence between any two nonzero terms.
A070428(x) = number of terms a(n) > 0 where n <= 10^x.
a(n) <= A188585(n).

Examples

			a(6) = 0 because there is no way to write 6 as a nontrivial perfect power.
a(9) = 1 because there is one way to write 9 as a nontrivial perfect power: 3^2.
a(16) = 2 because there are two ways to write 16 as a nontrivial perfect power: 2^4, 4^2.
From _Friedjof Tellkamp_, Jun 14 2025: (Start)
n:       1, 2, 3, 4, 5, 6, 7, 8, 9, ...
Squares: 1, 0, 0, 1, 0, 0, 0, 0, 1, ... (A010052)
Cubes:   1, 0, 0, 0, 0, 0, 0, 1, 0, ... (A010057)
...
Sum:    oo, 0, 0, 1, 0, 0, 0, 1, 1, ...
a(1)=1:  1, 0, 0, 1, 0, 0, 0, 1, 1, ... (= this sequence). (End)
		

Crossrefs

Programs

  • Mathematica
    a[n_] := If[n == 1, 1, Sum[Boole[IntegerQ[n^(1/k)]], {k, 2, Floor[Log[2, n]]}]]; Array[a, 100] (* Friedjof Tellkamp, Jun 14 2025 *)
    a[n_] := If[n == 1, 1, DivisorSigma[0, Apply[GCD, Transpose[FactorInteger[n]][[2]]]] - 1]; Array[a, 100] (* Michael Shamos, Jul 06 2025 *)
  • PARI
    a(n) = if (n==1, 1, sum(i=2, logint(n, 2), ispower(n, i))); \\ Michel Marcus, Apr 11 2025

Formula

a(1) = 1, for n > 1: a(n) = A000005(A253641(n)) - 1.
If n not in A001597, then a(n) = 0, otherwise a(n) = A175064(x) - 1 where A001597(x) = n.
From Friedjof Tellkamp, Jun 14 2025: (Start)
a(n) = A089723(n) - 1, for n > 1.
a(n) = A010052(n) + A010057(n) + A374016(n) + (...), for n > 1.
Sum_{k>=2..n} a(k) = A089361(n), for n > 1.
G.f.: x + Sum_{j>=2, k>=2} x^(j^k).
Dirichlet g.f.: 1 + Sum_{k>=2} zeta(k*s)-1. (End)

A346403 a(1)=1; for n>1, a(n) gives the sum of the exponents in the different ways to write n as n = x^y, 2 <= x, 1 <= y.

Original entry on oeis.org

1, 1, 1, 3, 1, 1, 1, 4, 3, 1, 1, 1, 1, 1, 1, 7, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 4, 1, 1, 1, 1, 6, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 12, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 7, 1, 1, 1, 1, 1, 1
Offset: 1

Views

Author

Amiram Eldar, Jul 15 2021

Keywords

Comments

Denoted by tau(n) in Mycielski (1951), Fehér et al. (2006), and Awel and Küçükaslan (2020).
This function depends only on the prime signature of n (see the Formula section).

Examples

			4 = 2^2, gcd(2) = 2, sigma(2) = 3, so a(4) = 3. The representations are 4^1 and 2^2, and 1 + 2 = 3.
144 = 2^4 * 3^2, gcd(4,2) = 2, sigma(2) = 3, so a(144) = 3. The representations are 144^1 and 12^2, and 1 + 2 = 3.
		

Crossrefs

Programs

  • Maple
    A253641:=proc(n) if n in {0,1} then 1 else igcd(map(i->i[2], ifactors(n)[2])[]); fi; end: seq(numtheory[sigma](A253641(n)), n=1..120); # Ridouane Oudra, Jun 04 2025
  • Mathematica
    a[n_] := DivisorSigma[1, GCD @@ FactorInteger[n][[;; , 2]]]; Array[a, 100]
  • PARI
    a(n) = if (n==1, 1, sigma(gcd(factor(n)[,2]))); \\ Michel Marcus, Jul 16 2021

Formula

If n = Product_{i} p_i^e_i, then a(n) = sigma(gcd()).
Sum_{n>=1} (a(n)-1)/n = Pi^2/6 + 1 (= A013661 + 1) (Mycielski, 1951).
a(n) = sigma(A052409(n)), for n>1. - Ridouane Oudra, Nov 23 2024
a(n) = sigma(A253641(n)). - Ridouane Oudra, Jun 04 2025
Showing 1-8 of 8 results.