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-10 of 15 results. Next

A077284 Duplicate of A070428.

Original entry on oeis.org

1, 4, 13, 41, 125, 367, 1111, 3395, 10491, 32670, 102231, 320990, 1010196, 3184138
Offset: 0

Views

Author

Keywords

A001597 Perfect powers: m^k where m > 0 and k >= 2.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Might also be called the nontrivial powers. - N. J. A. Sloane, Mar 24 2018
See A175064 for number of ways to write a(n) as m^k (m >= 1, k >= 1). - Jaroslav Krizek, Jan 23 2010
a(1) = 1, for n >= 2: a(n) = numbers m such that sum of perfect divisors of x = m has no solution. Perfect divisor of n is divisor d such that d^k = n for some k >= 1. a(n) for n >= 2 is complement of A175082. - Jaroslav Krizek, Jan 24 2010
A075802(a(n)) = 1. - Reinhard Zumkeller, Jun 20 2011
Catalan's conjecture (now a theorem) is that 1 occurs just once as a difference, between 8 and 9.
For a proof of Catalan's conjecture, see the paper by Metsänkylä. - L. Edson Jeffery, Nov 29 2013
m^k is the largest number n such that (n^k-m)/(n-m) is an integer (for k > 1 and m > 1). - Derek Orr, May 22 2014
From Daniel Forgues, Jul 22 2014: (Start)
a(n) is asymptotic to n^2, since the density of cubes and higher powers among the squares and higher powers is 0. E.g.,
a(10^1) = 49 (49% of 10^2),
a(10^2) = 6400 (64% of 10^4),
a(10^3) = 804357 (80.4% of 10^6),
a(10^4) = 90706576 (90.7% of 10^8),
a(10^n) ~ 10^(2n) - o(10^(2n)). (End)
A proper subset of A001694. - Robert G. Wilson v, Aug 11 2014
a(10^n): 1, 49, 6400, 804357, 90706576, 9565035601, 979846576384, 99066667994176, 9956760243243489, ... . - Robert G. Wilson v, Aug 15 2014

References

  • R. L. Graham, D. E. Knuth and O. Patashnik, Concrete Mathematics. Addison-Wesley, Reading, MA, 1990, p. 66.
  • R. K. Guy, Unsolved Problems in Number Theory, Springer, 1st edition, 1981. See section D9.
  • René Schoof, Catalan's Conjecture, Springer-Verlag, 2008, p. 1.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Complement of A007916.
Subsequence of A072103; A072777 is a subsequence.
Union of A075109 and A075090.
There are four different sequences which may legitimately be called "prime powers": A000961 (p^k, k >= 0), A246655 (p^k, k >= 1), A246547 (p^k, k >= 2), A025475 (p^k, k=0 and k >= 2), and which are sometimes confused with the present sequence.
First differences give A053289.

Programs

  • Haskell
    import Data.Map (singleton, findMin, deleteMin, insert)
    a001597 n = a001597_list !! (n-1)
    (a001597_list, a025478_list, a025479_list) =
       unzip3 $ (1, 1, 2) : f 9 (3, 2) (singleton 4 (2, 2)) where
       f zz (bz, ez) m
        | xx < zz = (xx, bx, ex) :
                    f zz (bz, ez+1) (insert (bx*xx) (bx, ex+1) $ deleteMin m)
        | xx > zz = (zz, bz, 2) :
                    f (zz+2*bz+1) (bz+1, 2) (insert (bz*zz) (bz, 3) m)
        | otherwise = f (zz+2*bz+1) (bz+1, 2) m
        where (xx, (bx, ex)) = findMin m  --  bx ^ ex == xx
    -- Reinhard Zumkeller, Mar 28 2014, Oct 04 2012, Apr 13 2012
    
  • Magma
    [1] cat [n : n in [2..1000] | IsPower(n) ];
    
  • Maple
    isA001597 := proc(n)
        local e ;
        e := seq(op(2,p),p=ifactors(n)[2]) ;
        return ( igcd(e) >=2 or n =1 ) ;
    end proc:
    A001597 := proc(n)
        option remember;
        local a;
        if n = 1 then
            1;
        else
            for a from procname(n-1)+1 do
                if isA001597(a) then
                    return a ;
                end if;
             end do;
        end if;
    end proc:
    seq(A001597(n),n=1..70) ; # R. J. Mathar, Jun 07 2011
    N:= 10000: # to get all entries <= N
    sort({1,seq(seq(a^b, b = 2 .. floor(log[a](N))), a = 2 .. floor(sqrt(N)))}); # Robert FERREOL, Jul 18 2023
  • Mathematica
    min = 0; max = 10^4;  Union@ Flatten@ Table[ n^expo, {expo, Prime@ Range@ PrimePi@ Log2@ max}, {n, Floor[1 + min^(1/expo)], max^(1/expo)}] (* T. D. Noe, Apr 18 2011; slightly modified by Robert G. Wilson v, Aug 11 2014 *)
    perfectPowerQ[n_] := n == 1 || GCD @@ FactorInteger[n][[All, 2]] > 1; Select[Range@ 1765, perfectPowerQ] (* Ant King, Jun 29 2013; slightly modified by Robert G. Wilson v, Aug 11 2014 *)
    nextPerfectPower[n_] := If[n == 1, 4, Min@ Table[ (Floor[n^(1/k)] + 1)^k, {k, 2, 1 + Floor@ Log2@ n}]]; NestList[ nextPerfectPower, 1, 55] (* Robert G. Wilson v, Aug 11 2014 *)
    Join[{1},Select[Range[2000],GCD@@FactorInteger[#][[All,2]]>1&]] (* Harvey P. Dale, Apr 30 2018 *)
  • PARI
    {a(n) = local(m, c); if( n<2, n==1, c=1; m=1; while( cMichael Somos, Aug 05 2009 */
    
  • PARI
    is(n)=ispower(n) || n==1 \\ Charles R Greathouse IV, Sep 16 2015
    
  • PARI
    list(lim)=my(v=List(vector(sqrtint(lim\=1),n,n^2))); for(e=3,logint(lim,2), for(n=2,sqrtnint(lim,e), listput(v,n^e))); Set(v) \\ Charles R Greathouse IV, Dec 10 2019
    
  • Python
    from sympy import perfect_power
    def ok(n): return n==1 or perfect_power(n)
    print([m for m in range(1, 1765) if ok(m)]) # Michael S. Branicky, Jan 04 2021
    
  • Python
    import sympy
    class A001597() :
        def _init_(self) :
            self.a = [1]
        def at(self, n):
            if n <= len(self.a):
                return self.a[n-1]
            else:
                cand = self.at(n-1)+1
                while sympy.perfect_power(cand) == False:
                    cand += 1
                self.a.append(cand)
                return cand
    a001597 = A001597()
    for n in range(1,20):
        print(a001597.at(n)) # R. J. Mathar, Mar 28 2023
    
  • Python
    from sympy import mobius, integer_nthroot
    def A001597(n):
        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 kmax # Chai Wah Wu, Aug 13 2024
  • Sage
    def A001597_list(n) :
        return [k for k in (1..n) if k.is_perfect_power()]
    A001597_list(1764) # Peter Luschny, Feb 03 2012
    

Formula

Goldbach showed that Sum_{n >= 2} 1/(a(n)-1) = 1.
Formulas from postings to the Number Theory List by various authors, 2002:
Sum_{i >= 2} Sum_{j >= 2} 1/i^j = 1;
Sum_{k >= 2} 1/(a(k)+1) = Pi^2 / 3 - 5/2;
Sum_{k >= 2} 1/a(k) = Sum_{n >= 2} mu(n)(1- zeta(n)) approx = 0.87446436840494... See A072102.
For asymptotics see Newman.
For n > 1: gcd(exponents in prime factorization of a(n)) > 1, cf. A124010. - Reinhard Zumkeller, Apr 13 2012
a(n) ~ n^2. - Thomas Ordowski, Nov 04 2012
a(n) = n^2 - 2*n^(5/3) - 2*n^(7/5) + (13/3)*n^(4/3) - 2*n^(9/7) + 2*n^(6/5) - 2*n^(13/11) + o(n^(13/11)) (Jakimczuk, 2012). - Amiram Eldar, Jun 30 2023

Extensions

Minor corrections from N. J. A. Sloane, Jun 27 2010

A052486 Achilles numbers - powerful but imperfect: if n = Product(p_i^e_i) then all e_i > 1 (i.e., powerful), but the highest common factor of the e_i is 1, i.e., not a perfect power.

Original entry on oeis.org

72, 108, 200, 288, 392, 432, 500, 648, 675, 800, 864, 968, 972, 1125, 1152, 1323, 1352, 1372, 1568, 1800, 1944, 2000, 2312, 2592, 2700, 2888, 3087, 3200, 3267, 3456, 3528, 3872, 3888, 4000, 4232, 4500, 4563, 4608, 5000, 5292, 5324, 5400, 5408, 5488, 6075
Offset: 1

Views

Author

Henry Bottomley, Mar 16 2000

Keywords

Comments

Number of terms < 10^n: 0, 1, 13, 60, 252, 916, 3158, 10553, 34561, 111891, 359340, 1148195, 3656246, 11616582, 36851965, ..., A118896(n) - A070428(n). - Robert G. Wilson v, Aug 11 2014
a(n) = (s(n))^2 * f(n), s(n) > 1, f(n) > 1, where s(n) is not a power of f(n), and f(n) is squarefree and gcd(s(n), f(n)) = f(n). - Daniel Forgues, Aug 11 2015

Examples

			a(3)=200 because 200=2^3*5^2, both 3 and 2 are greater than 1, and the highest common factor of 3 and 2 is 1.
Factorizations of a(1) to a(20):
    72 = 2^3  3^2,  108 = 2^2 3^3,  200 = 2^3 5^2,  288 = 2^5  3^2,
   392 = 2^3  7^2,  432 = 2^4 3^3,  500 = 2^2 5^3,  648 = 2^3  3^4,
   675 = 3^3  5^2,  800 = 2^5 5^2,  864 = 2^5 3^3,  968 = 2^3 11^2,
   972 = 2^2  3^5, 1125 = 3^2 5^3, 1152 = 2^7 3^2, 1323 = 3^3  7^2,
  1352 = 2^3 13^2, 1372 = 2^2 7^3, 1568 = 2^5 7^2, 1800 = 2^3  3^2 5^2.
Examples for a(n) = (s(n))^2 * f(n): (see above comment)
s(n) = 6,  6, 10, 12, 14, 12, 10, 18, 15, 20, 12, 22, 18, 15, 24, 21,
f(n) = 2,  3,  2,  2,  2,  3,  5,  2,  3,  2,  6,  2,  3,  5,  2,  3,
		

Crossrefs

Programs

  • Maple
    filter:= proc(n) local E; E:= map(t->t[2], ifactors(n)[2]); min(E)>1 and igcd(op(E))=1 end proc:
    select(filter,[$1..10000]); # Robert Israel, Aug 11 2014
  • Mathematica
    achillesQ[n_] := Block[{ls = Last /@ FactorInteger@n}, Min@ ls > 1 == GCD @@ ls]; Select[ Range@ 5500, achillesQ@# &] (* Robert G. Wilson v, Jun 10 2010 *)
  • PARI
    is(n)=my(f=factor(n)[,2]); n>9 && vecmin(f)>1 && gcd(f)==1 \\ Charles R Greathouse IV, Sep 18 2015, replacing code by M. F. Hasler, Sep 23 2010
    
  • Python
    from math import gcd
    from itertools import count, islice
    from sympy import factorint
    def A052486_gen(startvalue=1): # generator of terms >= startvalue
        return (n for n in count(max(startvalue,1)) if (lambda x: all(e > 1 for e in x) and gcd(*x) == 1)(factorint(n).values()))
    A052486_list = list(islice(A052486_gen(),20)) # Chai Wah Wu, Feb 19 2022
    
  • Python
    from math import isqrt
    from sympy import mobius, integer_nthroot
    def A052486(n):
        def squarefreepi(n): return int(sum(mobius(k)*(n//k**2) for k in range(1, isqrt(n)+1)))
        def bisection(f,kmin=0,kmax=1):
            while f(kmax) > kmax: kmax <<= 1
            while kmax-kmin > 1:
                kmid = kmax+kmin>>1
                if f(kmid) <= kmid:
                    kmax = kmid
                else:
                    kmin = kmid
            return kmax
        def f(x):
            c, l = n+x+1, 0
            j = isqrt(x)
            while j>1:
                k2 = integer_nthroot(x//j**2,3)[0]+1
                w = squarefreepi(k2-1)
                c -= j*(w-l)
                l, j = w, isqrt(x//k2**3)
            c -= squarefreepi(integer_nthroot(x,3)[0])-l+sum(mobius(k)*(integer_nthroot(x, k)[0]-1) for k in range(2, x.bit_length()))
            return c
        return bisection(f,n,n) # Chai Wah Wu, Sep 10 2024

Formula

a(n) = O(n^2). - Daniel Forgues, Aug 11 2015
a(n) = O(n^2 / log log n). - Daniel Forgues, Aug 12 2015
Sum_{n>=1} 1/a(n) = zeta(2)*zeta(3)/zeta(6) - Sum_{k>=2} mu(k)*(1-zeta(k)) - 1 = A082695 - A072102 - 1 = 0.06913206841581433836... - Amiram Eldar, Oct 14 2020

Extensions

Example edited by Mac Coombe (mac.coombe(AT)gmail.com), Sep 18 2010
Name edited by M. F. Hasler, Jul 17 2019

A188951 Number of perfect powers (A001597) < 2^n.

Original entry on oeis.org

0, 1, 1, 2, 4, 7, 10, 15, 22, 30, 41, 57, 81, 113, 155, 216, 298, 416, 582, 813, 1135, 1588, 2223, 3115, 4368, 6135, 8622, 12127, 17063, 24022, 33838, 47688, 67226, 94804, 133737, 188709, 266350, 376018, 530940, 749819, 1059096, 1496143, 2113801, 2986769
Offset: 0

Views

Author

T. D. Noe, Apr 20 2011

Keywords

Examples

			For n=3, the perfect powers smaller than 2^3=8 are: 1 and 4. So a(3) = 2.
		

Crossrefs

Cf. A001597, A070228, A070428 (perfect powers not exceeding 10^n).

Programs

  • Mathematica
    Join[{0,1}, Table[-Sum[MoebiusMu[x]*Floor[2^(n/x) - 1], {x, 2, n}], {n, 2, 50}]]
  • PARI
    a(n) = sum(k=1, 2^n-1, (k==1) || ispower(k)); \\ Michel Marcus, Apr 11 2016
    
  • Python
    from sympy import mobius, integer_nthroot
    def A188951(n): return int(sum(mobius(x)*(1-integer_nthroot(1<Chai Wah Wu, Aug 13 2024

Formula

a(n) = A070228(n) - 1 for n > 1. - Amiram Eldar, May 19 2022

A075308 Number of n-digit perfect powers.

Original entry on oeis.org

4, 8, 28, 84, 242, 744, 2284, 7096, 22179, 69561, 218759, 689206, 2173942, 6862783, 21676671, 68493153, 216477260, 684309327, 2163434093, 6840212693, 21628140126, 68388775913, 216252650605, 683825838922, 2162393136881, 6837971108286, 21623312527390, 68378377967873
Offset: 1

Views

Author

Zak Seidov, Oct 11 2002

Keywords

Examples

			a(2) = 8 because there are eight 2-digit perfect powers: 16, 25, 27, 32, 36, 49, 64, 81.
a(3) = 28 = A070428(3) - A070428(2) = 41 - 13 (in A070428 offset is 0).
		

Crossrefs

Programs

  • Python
    from sympy import mobius, integer_nthroot
    def A075308(n): return int(sum(mobius(x)*(integer_nthroot(10**(n-1),x)[0]-integer_nthroot(10**n,x)[0]) for x in range(2,((10**(n-1)).bit_length())))-sum(mobius(x)*(integer_nthroot(10**n,x)[0]-1) for x in range((10**(n-1)).bit_length(),(10**n).bit_length()))) if n>2 else n<<2 # Chai Wah Wu, Aug 13 2024

Formula

a(n) = A070428(n) - A070428(n-1) for n >= 3.

Extensions

More terms from Jinyuan Wang, Mar 02 2020

A089579 Total number of perfect powers > 1 below 10^n.

Original entry on oeis.org

3, 11, 39, 123, 365, 1109, 3393, 10489, 32668, 102229, 320988, 1010194, 3184136, 10046919, 31723590, 100216743, 316694003, 1001003330, 3164437423, 10004650116, 31632790242, 100021566155, 316274216760, 1000100055682, 3162493192563, 10000464300849, 31623776828239, 100002154796112
Offset: 1

Views

Author

Martin Renner, Dec 29 2003

Keywords

Comments

k is a perfect power <=> there exist integers a and b, b > 1, and k = a^b.
From Robert G. Wilson v, Jul 17 2016: (Start)
Limit_{n->oo} a(n)/sqrt(10^n) = 1.
A089580(n) - a(n) = A275358(n).
The four terms which make up the difference between A089580(2) - a(2) are: 16 = 2^4 = 4^2, 64 = 2^6 = 4^3 = 8^2 and 81 = 3^4 = 9^2; one for 16, two for 64 and one for 81 making a total of 4. See A117453.
(End)

Examples

			For n=2, the 11 perfect powers > 1 below 10^2 = 100 are: 4, 8, 9, 16, 25, 27, 32, 36, 49, 64, 81. - _Michael B. Porter_, Jul 18 2016
		

Crossrefs

Programs

  • Mathematica
    Table[lim=10^n-1; Sum[ -(Floor[lim^(1/k)]-1)*MoebiusMu[k], {k,2,Floor[Log[2,lim]]}], {n,30}] (* T. D. Noe, Nov 16 2006 *)
  • Python
    from sympy import mobius, integer_nthroot
    def A089579(n): return int(sum(mobius(x)*(1-integer_nthroot(10**n,x)[0]) for x in range(2,(10**n).bit_length())))-1 if n>1 else 3 # Chai Wah Wu, Aug 13 2024
  • SageMath
    def A089579(n):
        gen = (p for p in srange(2, 10^n) if p.is_perfect_power())
        return sum(1 for _ in gen)
    print([A089579(n) for n in range(1, 7)])  # Peter Luschny, Sep 15 2023
    

Formula

a(n) = A070428(n) - 2 for n >= 2.

Extensions

a(9)-a(10) from Martin Renner, Oct 02 2004
More terms from T. D. Noe, Nov 16 2006
More precise name by Hugo Pfoertner, Sep 15 2023

A070228 Number of perfect powers (A001597) not exceeding 2^n.

Original entry on oeis.org

1, 1, 2, 3, 5, 8, 11, 16, 23, 31, 42, 58, 82, 114, 156, 217, 299, 417, 583, 814, 1136, 1589, 2224, 3116, 4369, 6136, 8623, 12128, 17064, 24023, 33839, 47689, 67227, 94805, 133738, 188710, 266351, 376019, 530941, 749820, 1059097, 1496144, 2113802, 2986770, 4220666
Offset: 0

Views

Author

Donald S. McDonald, May 14 2002

Keywords

Examples

			How many powers are there not exceeding 2^4?: 1, 4, 8, 9, 16. Hence a(4) = 5.
a(22)=2224: there are 2224 powers not exceeding 2^22.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := 1 - Sum[ MoebiusMu[x]*Floor[2^(n/x) - 1], {x, 2, n}]; Array[f, 44, 0] (* Robert G. Wilson v, Jan 20 2015 *)
  • PARI
    a(n) = 1 - sum(k=2, n, moebius(k)*(sqrtnint(2^n,k)-1));
    
  • Python
    from sympy import mobius, integer_nthroot
    def A070228(n): return int(1+sum(mobius(x)*(1-integer_nthroot(1<Chai Wah Wu, Aug 13 2024

Formula

a(n) = 1 - Sum_{k=2..n} Moebius(k)*floor(2^(n/k)-1). - Robert G. Wilson v, Jan 20 2015
a(n) = A188951(n) + 1 for n > 1. - Amiram Eldar, May 19 2022

Extensions

a(39)-a(44) from Alex Ratushnyak, Jan 02 2014

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)

A275358 The difference between A089580(n) and A089579(n).

Original entry on oeis.org

0, 4, 10, 20, 41, 65, 114, 185, 297, 487, 809, 1339, 2253, 3824, 6544, 11297, 19620, 34216, 59926, 105258, 185356, 327039, 577906, 1022466, 1810789, 3209398, 5691825, 10099475, 17927609, 31833805, 56541947, 100449345, 178484340, 317187186, 563744378, 1002052726
Offset: 1

Views

Author

Robert G. Wilson v, Jul 24 2016

Keywords

Comments

Submitted on the request of Omar E. Pol 17 July 2016. (A089579).
a(n) is the sum of A175066(m)-1 over such m that A117453(m)<10^n. - Andrey Zabolotskiy, Aug 17 2016

Examples

			a(2) = A089580(2)-A089579(2) = 4 because of the three terms: 16 = 2^4 = 4^2, 64 = 2^6 = 4^3 = 8^2 and 81 = 3^4 = 9^2; one for 16, two for 64 and one for 81 making a total of 4.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{lim = 10^n -1}, Sum[ (Floor[ lim^(1/k)] - 1)(1 + MoebiusMu[k]), {k, 2, Floor[ Log[2, lim]]}]]; Array[f, 36]

Formula

a(n) = A089580(n) - A089579(n).
Limit_{n->oo} a(n+1)/a(n) = 1.778279... (A011007). - Altug Alkan, Aug 22 2016

A362973 The number of cubefull numbers (A036966) not exceeding 10^n.

Original entry on oeis.org

1, 2, 7, 20, 51, 129, 307, 713, 1645, 3721, 8348, 18589, 41136, 90619, 198767, 434572, 947753, 2062437, 4480253, 9718457, 21055958, 45575049, 98566055, 213028539, 460160083, 993533517, 2144335391, 4626664451, 9980028172, 21523027285, 46408635232, 100053270534
Offset: 0

Views

Author

Amiram Eldar, May 11 2023

Keywords

Comments

The number of cubefull numbers not exceeding x is N(x) = c_0 * x^(1/3) + c_1 * x^(1/4) + c_2 * x^(1/5) + o(x^(1/8)), where c_0 (A362974), c_1 (A362975) and c_2 (A362976) are constants (Bateman and Grosswald, 1958; Finch, 2003).
The digits of a(3k) converge to A362974 as k -> oo. - Chai Wah Wu, May 13 2023

Examples

			There are 2 cubefull numbers not exceeding 10, 1 and 8, therefore a(1) = 2.
		

References

  • Steven R. Finch, Mathematical Constants, Cambridge University Press, 2003, section 2.6.1, pp. 113-115.

Crossrefs

Similar sequences: A070428, A118896.

Programs

  • Mathematica
    a[n_] := Module[{max = 10^n}, CountDistinct@ Flatten@ Table[i^5 * j^4 * k^3, {i, Surd[max, 5]}, {j, Surd[max/i^5, 4]}, {k, CubeRoot[max/(i^5*j^4)]}]]; Array[a, 15, 0]
  • Python
    from math import gcd
    from sympy import factorint, integer_nthroot
    def A362973(n):
        m, c = 10**n, 0
        for x in range(1,integer_nthroot(m,5)[0]+1):
            if all(d<=1 for d in factorint(x).values()):
                for y in range(1,integer_nthroot(z:=m//x**5,4)[0]+1):
                    if gcd(x,y)==1 and all(d<=1 for d in factorint(y).values()):
                        c += integer_nthroot(z//y**4,3)[0]
        return c # Chai Wah Wu, May 11-13 2023

Extensions

a(23)-a(31) from Chai Wah Wu, May 11 2023
Showing 1-10 of 15 results. Next