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.

This page as a plain text file.
%I A076405 #21 Feb 16 2025 08:32:47
%S A076405 1,8,16,27,32,125,81,64,216,343,128,243,1000,1331,625,256,1728,2197,
%T A076405 2744,1296,3375,729,512,4913,5832,2401,6859,8000,9261,10648,1024,
%U A076405 12167,13824,3125,17576,2187,21952,24389,27000,29791,10000,2048,35937,39304
%N A076405 Next perfect power having the same least root of n-th perfect power, A001597.
%C A076405 A025478(a(n)) = A025478(n); A001597(a(n)) = A025478(n)*A001597(n).
%H A076405 Reinhard Zumkeller, <a href="/A076405/b076405.txt">Table of n, a(n) for n = 1..10000</a>
%H A076405 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/PerfectPower.html">Perfect Powers</a>.
%e A076405 .   n  | A001597(n) | A025478(n)^A025479(n) |  a(n)
%e A076405 . -----+------------+-----------------------+---------------------------
%e A076405 .  13  |       100  |         10^2          | 1000 = 10^3 = A001597(41)
%e A076405 .  14  |       121  |         11^2          | 1331 = 11^3 = A001597(47)
%e A076405 .  15  |       125  |          5^3          |  625 =  5^4 = A001597(34)
%e A076405 .  16  |       128  |          2^7          |  256 =  2^8 = A001597(23)
%e A076405 .  17  |       144  |         12^2          | 1728 = 12^3 = A001597(54).
%t A076405 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 *)
%o A076405 (Haskell)
%o A076405 a076405 n = a076405_list !! (n-1)
%o A076405 a076405_list = 1 : f (tail $ zip a001597_list a025478_list) where
%o A076405    f ((p, r) : us) = g us where
%o A076405      g ((q, r') : vs) = if r' == r then q : f us else g vs
%o A076405 -- _Reinhard Zumkeller_, Mar 11 2014
%o A076405 (Python)
%o A076405 from math import gcd
%o A076405 from sympy import mobius, integer_nthroot, factorint
%o A076405 def A076405(n):
%o A076405     if n == 1: return 1
%o A076405     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())))
%o A076405     kmin, kmax = 1,2
%o A076405     while f(kmax) >= kmax:
%o A076405         kmax <<= 1
%o A076405     while True:
%o A076405         kmid = kmax+kmin>>1
%o A076405         if f(kmid) < kmid:
%o A076405             kmax = kmid
%o A076405         else:
%o A076405             kmin = kmid
%o A076405         if kmax-kmin <= 1:
%o A076405             break
%o A076405     return kmax*integer_nthroot(kmax, gcd(*factorint(kmax).values()))[0] # _Chai Wah Wu_, Aug 13 2024
%Y A076405 Cf. A052410.
%K A076405 nonn
%O A076405 1,2
%A A076405 _Reinhard Zumkeller_, Oct 09 2002
%E A076405 More terms from _Robert G. Wilson v_, Aug 03 2008