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

A322969 Sum of the largest exponents A025479 of the first n perfect powers > 1.

Original entry on oeis.org

2, 5, 7, 11, 13, 16, 21, 23, 25, 31, 35, 37, 39, 42, 49, 51, 53, 55, 58, 60, 65, 73, 75, 77, 80, 82, 84, 86, 88, 97, 99, 101, 105, 107, 113, 115, 117, 119, 121, 124, 134, 136, 138, 140, 144, 147, 149, 151, 153, 155, 157, 160, 162, 164, 166, 168, 179, 181, 188
Offset: 1

Views

Author

Hugo Pfoertner, Jan 01 2019

Keywords

Examples

			a(1) = 2 because the first perfect power 4 = 2^2,
a(2) = 5: added exponent 3 from 8 = 2^3,
a(3) = 7: added exponent 2 from 9 = 3^2,
a(4) = 11: added largest exponent 4 from 16=2^4.
		

Crossrefs

Programs

  • Mathematica
    Union@ Accumulate@ Table[If[Set[e, GCD @@ #[[All, -1]]] > 1, e, 0] &@ FactorInteger@ n, {n, 4, 2400}] (* Michael De Vlieger, Jan 01 2019 *)
  • PARI
    my(s=0); for(k=1, 3^7, if(j=ispower(k), print1(s+=j, ", ")))

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)

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)

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

A025478 Least roots of perfect powers (A001597).

Original entry on oeis.org

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

Views

Author

Keywords

Examples

			a(5) = 2 because pp(5) = 16 = 2^4 (not 4^2 as we take the smallest base).
		

Crossrefs

Cf. A052410 (least root), A001597 (perfect powers).
Cf. A025479 (largest exponents of perfect powers), A070228.

Programs

  • Haskell
    a025478 n = a025478_list !! (n-1)  -- a025478_list defined in A001597.
    -- Reinhard Zumkeller, Mar 11 2014
    
  • Mathematica
    pp = Select[ Range[5000], Apply[GCD, Last[ Transpose[ FactorInteger[ # ]]]] > 1 &]; f[n_] := Block[{b = 2}, While[ !IntegerQ[ Log[b, pp[[n]]]], b++ ]; b]; Join[{1}, Table[ f[n], {n, 2, 80}]]
    (* Second program: *)
    Prepend[DeleteCases[#, 0], 1] &@ Table[If[Set[e, GCD @@ #[[All, -1]]] > 1, Power[n, 1/e], 0] &@ FactorInteger@ n, {n, 4000}]  (* Michael De Vlieger, Apr 25 2017 *)
  • PARI
    lista(kmax) = {my(r, e); print1(1, ", "); for(k = 1, kmax, e = ispower(k, , &r); if(e > 0, print1(r, ", ")));} \\ Amiram Eldar, Sep 07 2024
  • Python
    from math import gcd
    from sympy import mobius, integer_nthroot, factorint
    def A025478(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 integer_nthroot(kmax, gcd(*factorint(kmax).values()))[0] # Chai Wah Wu, Aug 13 2024
    

Formula

a(n) = A052410(A001597(n)).
(i) a(n) < n for n > 2. (ii) a(n)/n is bounded and lim sup a(n)/n must be around 0.7. (iii) Sum_{k=1..n} a(k) seems to be asymptotic to c*n^2 with c around 0.29. (iv) a(n) = 2 if n is in A070228 (proof seems self-evident), hence there is no asymptotic expression for a(n) (just the average in (iii)). - Benoit Cloitre, Oct 14 2002

Extensions

Definition edited and cross-reference added by Daniel Forgues, Mar 10 2009

A076408 Sum of first n perfect powers.

Original entry on oeis.org

1, 5, 13, 22, 38, 63, 90, 122, 158, 207, 271, 352, 452, 573, 698, 826, 970, 1139, 1335, 1551, 1776, 2019, 2275, 2564, 2888, 3231, 3592, 3992, 4433, 4917, 5429, 5958, 6534, 7159, 7835, 8564, 9348, 10189, 11089, 12050, 13050, 14074, 15163, 16319, 17544
Offset: 1

Views

Author

Reinhard Zumkeller, Oct 09 2002

Keywords

Examples

			a(8) = 1+4+8+9+16+25+27+32 = 122.
		

Crossrefs

Programs

  • Mathematica
    Accumulate[Join[{1},Select[Range[1500],GCD@@FactorInteger[#][[All,2]]>1&]]] (* Harvey P. Dale, Feb 12 2023 *)
  • PARI
    print1(s=1,", ");for(k=2,1225,if(ispower(k),print1(s+=k,", "))) \\ Hugo Pfoertner, Jan 01 2019

A076399 Number of prime factors of n-th perfect power (with repetition).

Original entry on oeis.org

0, 2, 3, 2, 4, 2, 3, 5, 4, 2, 6, 4, 4, 2, 3, 7, 6, 2, 4, 6, 4, 5, 8, 2, 6, 3, 2, 6, 4, 4, 9, 2, 8, 4, 4, 6, 6, 2, 6, 2, 6, 10, 4, 4, 4, 8, 3, 2, 4, 4, 8, 2, 9, 6, 2, 6, 6, 11, 4, 7, 3, 2, 10, 4, 6, 4, 6, 6, 2, 8, 4, 5, 8, 4, 4, 6, 2, 8, 2, 4, 6, 12, 4, 6, 2, 6, 4, 6, 3, 2, 10, 2, 4, 6, 6, 9, 4, 6, 2, 10, 8
Offset: 1

Views

Author

Reinhard Zumkeller, Oct 09 2002

Keywords

Crossrefs

Programs

  • Haskell
    a076399 n = a001222 (a025478 n) * a025479 n
    -- Reinhard Zumkeller, Mar 28 2014
    
  • Mathematica
    PrimeOmega[Select[Range[10^4], # == 1 || GCD @@ FactorInteger[#][[;; , 2]] > 1 &]] (* Amiram Eldar, Feb 18 2023 *)
  • PARI
    is(n) = n==1 || ispower(n);
    apply(bigomega, select(is, [1..5000])) \\ Amiram Eldar, Feb 18 2023
    
  • Python
    from sympy import mobius, integer_nthroot, primeomega
    def A076399(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 int(primeomega(kmax)) # Chai Wah Wu, Aug 14 2024

Formula

a(n) = A001222(A001597(n)).
a(n) = A001222(A025478(n))*A025479(n).
Sum_{A001597(k) <= x} a(k) = 2*sqrt(x)*log(log(x)) + 2*(B_2 - log(2))*sqrt(x) + O(sqrt(x)/log(x)), where B_2 = A083342 (Jakimczuk and Lalín, 2022). - Amiram Eldar, Feb 18 2023, corrected Sep 21 2024

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)

A093771 Perfect powers for which the exponent is a prime number: solutions to {A051409(x) is prime}.

Original entry on oeis.org

4, 8, 9, 25, 27, 32, 36, 49, 100, 121, 125, 128, 144, 169, 196, 216, 225, 243, 289, 324, 343, 361, 400, 441, 484, 529, 576, 676, 784, 841, 900, 961, 1000, 1089, 1156, 1225, 1331, 1369, 1444, 1521, 1600, 1681, 1728, 1764, 1849, 1936, 2025, 2048, 2116, 2187
Offset: 1

Views

Author

Labos Elemer, Apr 19 2004

Keywords

Comments

A010051(A025479(n)) = 1. - Reinhard Zumkeller, Mar 28 2014

Examples

			All 2-,3-,5-,7th ... powers are here, 4-,6-,8th etc. powers are excluded
from A001597.
		

Crossrefs

Programs

  • Haskell
    a093771 n = a093771_list !! (n-1)
    a093771_list = [a001597 x | x <- [2..], a010051 (a025479 x) == 1]
    -- Reinhard Zumkeller, Mar 28 2014
    
  • Mathematica
    ffi[x_] :=Flatten[FactorInteger[x]] ep[x_] :=Table[Part[ffi[x], 2*w], {w, 1, lf[x]}] lf[x_] :=Length[FactorInteger[x]] Do[If[PrimeQ[Apply[GCD, ep[n]]], Print[n]], {n, 2, 10000}]
  • PARI
    is(n)=isprime(ispower(n)) \\ Charles R Greathouse IV, Oct 19 2015

Formula

GCD of prime-exponents in canonical factorization of n is prime.

A157985 Perfect powers (m^k where m is an integer and k >= 2) multiplied by -1 when m is prime for largest k (m^k thus a prime power).

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
Offset: 1

Views

Author

Daniel Forgues, Mar 10 2009

Keywords

Comments

The rather strange phrase "largest k" in the definition refers to the fact that there can be several ways to write a number in the form m^k. - N. J. A. Sloane, Jan 01 2019

Crossrefs

Cf. A001597 (perfect powers), A025479 (largest exponents of perfect powers).
Cf. A025478 (least roots of perfect powers).
Cf. A157986.

Formula

a(n) = {m^k}_n * (-1)^(Pi(m) - Pi(m-1)) where {m^k}_n is the n-th perfect power with positive integer base m corresponding to largest integer exponent k and Pi(m) is the prime counting function evaluated at m.
a(n) = A001597(n) * (-1)^(Pi(m) - Pi(m-1)), with m = A001597(n)^(1/A025479(n)).
Showing 1-10 of 14 results. Next