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.

Previous Showing 11-17 of 17 results.

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)).

A157986 Largest exponents of perfect powers (m^k where m is an integer and k >= 2) multiplied by -1 when base m is prime (m^k thus a prime power).

Original entry on oeis.org

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

Views

Author

Daniel Forgues, Mar 10 2009

Keywords

Crossrefs

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

Formula

a(n) = {k}_n * (-1)^(Pi(m) - Pi(m-1)) where {k}_n is the exponent of {m^k}_n (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) = A025479(n) * (-1)^{Pi(m) - Pi(m-1)}, with m = A001597(n)^(1/(A025479(n))).

A340587 a(n) is the least root of A340586(n).

Original entry on oeis.org

2, 2, 13, 6, 7, 20, 21, 2, 5, 3, 29, 30, 34, 38, 39, 40, 12, 43, 44, 2, 7, 51, 14, 54, 5, 57, 15, 60, 61, 62, 2, 66, 67, 68, 69, 17, 72, 73, 74, 75, 18, 78, 79, 3, 19, 84, 85, 86, 87, 6, 20, 2, 92, 93, 94, 95, 21, 98, 10, 102, 22, 105, 106, 107, 108, 109, 23, 112
Offset: 1

Views

Author

Hugo Pfoertner, Jan 14 2021

Keywords

Examples

			a(1) = 2: A340586(1) = 4 = 2^2,
a(2) = 2: A340586(2) = 16 = 2^4,
a(3) = 13: A340586(3) = 169 = 13^2.
		

Crossrefs

Programs

  • PARI
    a340587(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(round(n1^(1/p1)), ", ")); n2=n1; n1=n; p2=p1; p1=p0))};
    a340587(13000)

Formula

a(n) = A025478(A340586(n)).

A076292 Perfect powers with squarefree root.

Original entry on oeis.org

1, 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, 2048, 2116, 2187
Offset: 1

Views

Author

Reinhard Zumkeller, Nov 06 2002

Keywords

Examples

			A001597(17) = 144 = (3*2^2)^2 is not a term.
		

Crossrefs

Programs

  • Mathematica
    q[n_] := n == 1 || Length[(u = Union[FactorInteger[n][[;;,2]]])] == 1 && u[[1]] > 1; Select[Range[2000], q] (* Amiram Eldar, Jan 01 2022 *)
  • PARI
    is(n)=n==1 || (ispower(n,,&n) && issquarefree(n)) \\ Charles R Greathouse IV, Oct 16 2015

Formula

A025478(a(n)) = A007947(a(n)).

A076405 Next perfect power having the same least root of n-th perfect power, A001597.

Original entry on oeis.org

1, 8, 16, 27, 32, 125, 81, 64, 216, 343, 128, 243, 1000, 1331, 625, 256, 1728, 2197, 2744, 1296, 3375, 729, 512, 4913, 5832, 2401, 6859, 8000, 9261, 10648, 1024, 12167, 13824, 3125, 17576, 2187, 21952, 24389, 27000, 29791, 10000, 2048, 35937, 39304
Offset: 1

Views

Author

Reinhard Zumkeller, Oct 09 2002

Keywords

Comments

A025478(a(n)) = A025478(n); A001597(a(n)) = A025478(n)*A001597(n).

Examples

			.   n  | A001597(n) | A025478(n)^A025479(n) |  a(n)
. -----+------------+-----------------------+---------------------------
.  13  |       100  |         10^2          | 1000 = 10^3 = A001597(41)
.  14  |       121  |         11^2          | 1331 = 11^3 = A001597(47)
.  15  |       125  |          5^3          |  625 =  5^4 = A001597(34)
.  16  |       128  |          2^7          |  256 =  2^8 = A001597(23)
.  17  |       144  |         12^2          | 1728 = 12^3 = A001597(54).
		

Crossrefs

Cf. A052410.

Programs

  • Haskell
    a076405 n = a076405_list !! (n-1)
    a076405_list = 1 : f (tail $ zip a001597_list a025478_list) where
       f ((p, r) : us) = g us where
         g ((q, r') : vs) = if r' == r then q : f us else g vs
    -- Reinhard Zumkeller, Mar 11 2014
    
  • Mathematica
    ppQ[n_] := GCD @@ Last /@ FactorInteger@# > 1; f[n_] := Block[{fi = Transpose@ FactorInteger@ n}, fi2 = fi[[2]]; Times @@ (fi[[1]]^(fi[[2]] (1 + 1/GCD @@ fi[[2]])))]; lst = Join[{1}, Select[ Range@ 1848, ppQ@# &]]; f /@ lst (* Robert G. Wilson v, Aug 03 2008 *)
  • Python
    from math import gcd
    from sympy import mobius, integer_nthroot, factorint
    def A076405(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 kmax*integer_nthroot(kmax, gcd(*factorint(kmax).values()))[0] # Chai Wah Wu, Aug 13 2024

Extensions

More terms from Robert G. Wilson v, Aug 03 2008

A129385 a(n) is the smallest root m of the least perfect power q (= m^k) such that n+q is an even semiprime, or -1 if no such q exists.

Original entry on oeis.org

2, 3, 2, 1, -1, 1, 2, 3, -1, 1, 2, 3, -1, 1, 2, 7, -1, 3, 2, 3, -1, 1, 2, 11, -1, 1, 2, 19, -1, 3, 2, 3, -1, 1, 2, 3, -1, 1, 2, 7, -1, 3, 2, 7, -1, 1, 2, 3, -1, 3, 2, 7, -1, 3, 2, 3, -1, 1, 2, 3, -1, 1, 2, 19, -1, 3, 2, 3, -1, 5, 2, 3, -1, 1, 2, 19, -1, 3, 2, 3, -1, 1, 2, 3, -1, 1, 2, 11, -1, 5, 2, 3, -1, 1, 2, 3, -1, 3, 2, 23, -1, 5, 2
Offset: 0

Views

Author

Klaus Brockhaus, Apr 14 2007

Keywords

Comments

If n = 4*d with d > 0 then a(n) = -1: If q is odd then 4*d+q is odd; if q is even then q = 4*x with integer x > 0 and n+q = 2*2*(d+x) has more than 2 prime factors. Consequently n+q is odd or not semiprime.
There are also composite terms. The first two of them are a(122) = 6 and a(161) = 15.

Examples

			n=0: A001597(2) = 4 = 2^2 is the least perfect power q such that 0+q is an even semiprime; 0+4 = 4 = 2*2, hence a(0) = 2.
n=11: A001597(7) = 27 = 3^3 is the least perfect power q such that 11+q is an even semiprime; 11+27 = 38 = 2*19, hence a(11) = 3.
n=14: A001597(3) = 8 = 2^3 is the least perfect power q such that 14+q is an even semiprime; 14+8 = 22 = 2*11, hence a(14) = 2.
n=27: A001597(1722) = 2476099 = 19^5 is the least perfect power q such that 27+q is an even semiprime; 27+2476099 = 2476126 = 2*1238063 and 1238063 is prime, hence a(27) = 19.
		

Crossrefs

Cf. A001597 (perfect powers), A025478 (smallest root of perfect powers), A127913, A129386 (records), A129387 (where records occur).

Programs

  • Magma
    PP:=[1] cat [ n: n in [2..2500000] | IsPower(n) ]; prootesp:=function(n); if exists(k) {x: x in PP | IsEven(n+x) and IsPrime((n+x) div 2) } then y:=k; else return -1; end if; if y eq 1 then return 1; end if; _, b:=IsPower(y); return b; end function; [ prootesp(n): n in [0..100] ];

A157987 Smallest roots m of perfect powers (m^k where m is an integer and k >= 2) multiplied by -1 when m is prime (m^k thus a prime power).

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

Views

Author

Daniel Forgues, Mar 10 2009, Mar 14 2009

Keywords

Crossrefs

Cf. 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).
Cf. A157986 Largest exponents of perfect powers (m^k where m is an integer and k >= 2) multiplied by -1 when base m is prime (m^k thus a prime power).
Cf. A001597 Perfect powers: m^k where m is an integer and k >= 2.
Cf. A025479 Largest exponents of perfect powers (A001597).
Cf. A025478 Least roots of perfect powers (A001597).

Formula

a(n) = {m}_n * (-1)^{Pi(m) - Pi(m-1)}
where {m}_n is the smallest root of {m^k}_n (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) = m * (-1)^{Pi(m) - Pi(m-1)}, with m = A025478(n) = {A001597(n)}^{1/{A025479(n)}}.
Previous Showing 11-17 of 17 results.