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 13 results. Next

A007916 Numbers that are not perfect powers.

Original entry on oeis.org

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

Views

Author

R. Muller

Keywords

Comments

From Gus Wiseman, Oct 23 2016: (Start)
There is a 1-to-1 correspondence between integers N >= 2 and sequences a(x_1),a(x_2),...,a(x_k) of terms from this sequence. Every N >= 2 can be written uniquely as a "power tower"
N = a(x_1)^a(x_2)^a(x_3)^...^a(x_k),
where the exponents are to be nested from the right.
Proof: If N is not a perfect power then N = a(x) for some x, and we are done. Otherwise, write N = a(x_1)^M for some M >=2, and repeat the process. QED
Of course, prime numbers also have distinct power towers (see A164336). (End)
These numbers can be computed with a modified Sieve of Eratosthenes: (1) start at n=2; (2) if n is not crossed out, then append n to the sequence and cross out all powers of n; (3) set n = n+1 and go to step 2. - Sam Alexander, Dec 15 2003
These are all numbers such that the multiplicities of the prime factors have no common divisor. The first number in the sequence whose prime multiplicities are not coprime is 180 = 2 * 2 * 3 * 3 * 5. Mathematica: CoprimeQ[2,2,1]->False. - Gus Wiseman, Jan 14 2017

Examples

			Example of the power tower factorizations for the first nine positive integers: 1=1, 2=a(1), 3=a(2), 4=a(1)^a(1), 5=a(3), 6=a(4), 7=a(5), 8=a(1)^a(2), 9=a(2)^a(1). - _Gus Wiseman_, Oct 20 2016
		

Crossrefs

Complement of A001597. Union of A052485 and A052486.
Cf. A153158 (squares of these numbers).
See A277562, A277564, A277576, A277615 for more about the power towers.
A278029 is a left inverse.
Cf. A052409.

Programs

  • Haskell
    a007916 n = a007916_list !! (n-1)
    a007916_list = filter ((== 1) . foldl1 gcd . a124010_row) [2..]
    -- Reinhard Zumkeller, Apr 13 2012
    
  • Magma
    [n : n in [2..1000] | not IsPower(n) ];
    
  • Maple
    See link.
  • Mathematica
    a = {}; Do[If[Apply[GCD, Transpose[FactorInteger[n]][[2]]] == 1, a = Append[a, n]], {n, 2, 200}];
    Select[Range[2,200],GCD@@FactorInteger[#][[All,-1]]===1&] (* Michael De Vlieger, Oct 21 2016. Corrected by Gus Wiseman, Jan 14 2017 *)
  • PARI
    is(n)=!ispower(n)&&n>1 \\ Charles R Greathouse IV, Jul 01 2013
    
  • Python
    from sympy import mobius, integer_nthroot
    def A007916(n):
        def f(x): return int(n+1-sum(mobius(k)*(integer_nthroot(x,k)[0]-1) for k in range(2,x.bit_length())))
        m, k = n, f(n)
        while m != k:
            m, k = k, f(k)
        return m # Chai Wah Wu, Aug 13 2024

Formula

A075802(a(n)) = 0. - Reinhard Zumkeller, Mar 19 2009
Gcd(exponents in prime factorization of a(n)) = 1, cf. A124010. - Reinhard Zumkeller, Apr 13 2012
a(n) ~ n. - Charles R Greathouse IV, Jul 01 2013
A052409(a(n)) = 1. - Ridouane Oudra, Nov 23 2024

Extensions

More terms from Henry Bottomley, Sep 12 2000
Edited by Charles R Greathouse IV, Mar 18 2010
Further edited by N. J. A. Sloane, Nov 09 2016

A111245 Perfect powers m^k, where m is an integer, which are not equal to the sum of m distinct primes.

Original entry on oeis.org

1, 4, 9, 25, 36, 49, 100, 121, 144, 169, 196, 225, 289, 324, 361, 400, 441, 484, 529, 576, 676, 784, 841, 900, 1089, 1156, 1225, 1369, 1444, 1521, 1600, 1681, 1764, 1849
Offset: 1

Views

Author

Giovanni Teofilatto, Oct 31 2005

Keywords

Comments

Perfect powers with k = 2.

Crossrefs

Subsequence of A000290.

Formula

a(n) = A153158(n-1) for n >= 2. - Hugo Pfoertner, Jan 14 2021

A153147 a(n) = A007916(n)^3.

Original entry on oeis.org

8, 27, 125, 216, 343, 1000, 1331, 1728, 2197, 2744, 3375, 4913, 5832, 6859, 8000, 9261, 10648, 12167, 13824, 17576, 21952, 24389, 27000, 29791, 35937, 39304, 42875, 50653, 54872, 59319, 64000, 68921, 74088, 79507, 85184, 91125, 97336, 103823
Offset: 1

Views

Author

Keywords

Comments

2^3=8, 3^3=27, 4^3=64=2^6 is not in the sequence, 5^3=125, 6^3=216, ...

Crossrefs

Programs

  • Mathematica
    Select[Range[2,100],GCD@@Last/@FactorInteger@#==1&]^3
  • Python
    from sympy import mobius, integer_nthroot
    def A153147(n):
        def f(x): return int(n+1-sum(mobius(k)*(integer_nthroot(x,k)[0]-1) for k in range(2,x.bit_length())))
        m, k = n, f(n)
        while m != k: m, k = k, f(k)
        return m**3

Extensions

Edited by Ray Chandler, Dec 22 2008

A153157 a(n) = A007916(n)^4.

Original entry on oeis.org

16, 81, 625, 1296, 2401, 10000, 14641, 20736, 28561, 38416, 50625, 83521, 104976, 130321, 160000, 194481, 234256, 279841, 331776, 456976, 614656, 707281, 810000, 923521, 1185921, 1336336, 1500625, 1874161, 2085136, 2313441, 2560000, 2825761
Offset: 1

Views

Author

Keywords

Comments

2^4=16,3^4=81,4^4=256=2^8 is not in the sequence,5^4=625,6^4=1296,...

Crossrefs

Programs

  • Mathematica
    Select[Range[2,100],GCD@@Last/@FactorInteger@#==1&]^4
  • Python
    from sympy import mobius, integer_nthroot
    def A153157(n):
        def f(x): return int(n+1-sum(mobius(k)*(integer_nthroot(x,k)[0]-1) for k in range(2,x.bit_length())))
        m, k = n, f(n)
        while m != k: m, k = k, f(k)
        return m**4 # Chai Wah Wu, Nov 21 2024

Extensions

Edited by Ray Chandler, Dec 22 2008

A153159 a(n) = A007916(n)^5.

Original entry on oeis.org

32, 243, 3125, 7776, 16807, 100000, 161051, 248832, 371293, 537824, 759375, 1419857, 1889568, 2476099, 3200000, 4084101, 5153632, 6436343, 7962624, 11881376, 17210368, 20511149, 24300000, 28629151, 39135393, 45435424
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    Select[Range[2,100],GCD@@Last/@FactorInteger@#==1&]^5
  • Python
    from sympy import mobius, integer_nthroot
    def A153159(n):
        def f(x): return int(n+1-sum(mobius(k)*(integer_nthroot(x, k)[0]-1) for k in range(2, x.bit_length())))
        m, k = n, f(n)
        while m != k: m, k = k, f(k)
        return m**5 # Chai Wah Wu, Nov 21 2024

Extensions

Edited and extended by Ray Chandler, Dec 22 2008

A153160 a(n) = A007916(n)^6.

Original entry on oeis.org

64, 729, 15625, 46656, 117649, 1000000, 1771561, 2985984, 4826809, 7529536, 11390625, 24137569, 34012224, 47045881, 64000000, 85766121, 113379904, 148035889, 191102976, 308915776, 481890304, 594823321, 729000000, 887503681
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    Select[Range[2,100],GCD@@Last/@FactorInteger@#==1&]^6
  • Python
    from sympy import mobius, integer_nthroot
    def A153160(n):
        def f(x): return int(n+1-sum(mobius(k)*(integer_nthroot(x, k)[0]-1) for k in range(2, x.bit_length())))
        m, k = n, f(n)
        while m != k: m, k = k, f(k)
        return m**6 # Chai Wah Wu, Nov 21 2024

Extensions

Edited and extended by Ray Chandler, Dec 22 2008

A340642 Perfect powers such that the two immediately adjacent perfect powers both have an exponent greater than 2.

Original entry on oeis.org

4, 9, 25, 225, 676, 2116, 6724, 7921, 8100, 16641, 104329, 131044, 160801, 176400, 372100, 389376, 705600, 4096576, 7306209, 7884864, 47444544, 146385801, 254817369, 373262400, 607622500, 895804900, 1121580100, 1330936324, 1536875209, 2097182025, 2258435529, 2749953600
Offset: 1

Views

Author

Hugo Pfoertner, Jan 14 2021

Keywords

Comments

Apparently, all known terms (checked through 10^18) are squares with maximum exponent 2, i.e., terms of A111245 (squares that are not a higher power). This would imply that of 3 immediately adjacent perfect powers, at least one is a term of A111245. Is there a known counterexample of 3 consecutive perfect powers, none of which is in A111245?

Examples

			The first terms, assuming 1 being at least a cube:
.
  n   p1  x^p1  p2  a(n)  p3  z^p3
                   =y^p2
  1  >2     1   2     4   3     8
  2   3     8   2     9   4    16
  3   4    16   2    25   3    27
  4   3   216   2   225   5   243
  5   4   625   2   676   6   729
		

Crossrefs

Programs

  • PARI
    a340642(limit)={my(p2=999, p1=2, n2=1, n1=4); for(n=5, limit, my(p0=ispower(n)); if(p0>1, if(p2>2&p0>2, print1(n1,", ")); n2=n1; n1=n; p2=p1; p1=p0))};
    a340642(50000000)

A340586 Perfect powers such that the two immediately adjacent perfect powers both have a largest exponent A025479 equal to 2.

Original entry on oeis.org

8, 16, 169, 216, 343, 400, 441, 512, 625, 729, 841, 900, 1156, 1444, 1521, 1600, 1728, 1849, 1936, 2048, 2401, 2601, 2744, 2916, 3125, 3249, 3375, 3600, 3721, 3844, 4096, 4356, 4489, 4624, 4761, 4913, 5184, 5329, 5476, 5625, 5832, 6084, 6241, 6561, 6859, 7056
Offset: 1

Views

Author

Hugo Pfoertner, Jan 14 2021

Keywords

Examples

			a(1) = 8 because its neighboring perfect powers 4 = 2^2 and 9 = 3^2 both have the largest exponent 2.
9 is not in the sequence because both exponents of the neighboring perfect powers 8 = 2^3 and 16 = 2^4 are > 2.
a(2) = 16: neighbors 9 = 3^2 and 25 = 5^2 satisfy the exponent condition.
Next excluded terms: 25 (16 = 2^4, 27 = 3^3), 27 (32 = 2^5), 32 (27 = 3^3), 36 (32 = 2^5), 49 (64 = 2^6), 64 (81 = 3^4), 81 (64 = 2^6), 100 (81 = 3^4), 121 (125 = 5^3), 125 (128 = 2^7), 128 (125 = 5^3), 144 (128 = 2^7).
a(3) = 169: neighbors 144 = 12^2 and 196 = 14^2 satisfy the exponent condition.
		

Crossrefs

Programs

  • PARI
    a340586(limit)={my(p2=999,p1=2,n2=1,n1=4);for(n=5,limit,my(p0=ispower(n));if(p0>1,if(p2+p0==4,print1(n1,", "));n2=n1;n1=n;p2=p1;p1=p0))};
    a340586(7500)

A340588 Squares of perfect powers.

Original entry on oeis.org

1, 16, 64, 81, 256, 625, 729, 1024, 1296, 2401, 4096, 6561, 10000, 14641, 15625, 16384, 20736, 28561, 38416, 46656, 50625, 59049, 65536, 83521, 104976, 117649, 130321, 160000, 194481, 234256, 262144, 279841, 331776, 390625, 456976, 531441, 614656, 707281, 810000, 923521, 1000000
Offset: 1

Views

Author

Terry D. Grant, Sep 21 2020

Keywords

Crossrefs

Cf. A153158 (complement within positive squares).

Programs

  • Maple
    q:= n-> is(igcd(seq(i[2], i=ifactors(n)[2]))<>2):
    select(q, [i^2$i=1..1000])[];  # Alois P. Heinz, Nov 26 2024
  • Mathematica
    Join[{1}, (Select[Range[2000], GCD @@ FactorInteger[#][[All, 2]] > 1 &])^2]
  • Python
    from sympy import mobius, integer_nthroot
    def A340588(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**2 # Chai Wah Wu, Aug 14 2024

Formula

a(n) = A001597(n)^2.
a(n+1) = A062965(n) + 1. - Hugo Pfoertner, Sep 29 2020
Sum_{k>1} 1/(a(k) - 1) = 7/4 - Pi^2/6 = 7/4 - zeta(2).
Sum_{k>1} 1/a(k) = Sum_{k>=2} mu(k)*(1-zeta(2*k)).

A340640 Perfect powers such that the two immediately adjacent perfect powers have at least one largest exponent A025479 greater than 2.

Original entry on oeis.org

4, 9, 25, 27, 32, 36, 49, 64, 81, 100, 121, 125, 128, 144, 196, 225, 243, 256, 289, 324, 361, 484, 529, 576, 676, 784, 961, 1000, 1024, 1089, 1225, 1296, 1331, 1369, 1681, 1764, 2025, 2116, 2187, 2197, 2209, 2304, 2500, 2704, 2809, 3025, 3136, 3364, 3481, 3969
Offset: 1

Views

Author

Hugo Pfoertner, Jan 14 2021

Keywords

Examples

			a(1) = 4 because the next perfect power is 8 = 2^3, i.e., its exponent is > 2.
a(2) = 9: the exponents of the neighbors 8 = 2^3 and 16 = 2^4 are both > 2.
16 is not in the sequence because both neighboring perfect powers 9 = 3^2 and 25 = 5^2 have exponents 2.
Neighbors with exponents > 2 of the next terms: a(3) = 25 (16 = 2^3), a(4) = 27 (32 = 2^5), a(5) = 32 (27 = 3^3), a(6) = 36 (32 = 2^5), a(7) = 49 (64 = 2^6), a(8) = 64 (81 = 3^4).
		

Crossrefs

Programs

  • PARI
    a340640(limit)={my(p2=999, p1=2, n2=1, n1=4); for(n=5, limit, my(p0=ispower(n)); if(p0>1, if(p2+p0>4, print1(n1, ", ")); n2=n1; n1=n; p2=p1; p1=p0))};
    a340640(5000)
Showing 1-10 of 13 results. Next