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.

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