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.

A253641 Largest integer b such that n=a^b for some integer a; a(0)=a(1)=1 by convention.

This page as a plain text file.
%I A253641 #30 Jun 15 2025 12:39:52
%S A253641 1,1,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,
%T A253641 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,
%U A253641 1,1,1,1,1,1,1,1,1,1,1,1,1,4,1,1,1,1,1,1,1,1,1
%N A253641 Largest integer b such that n=a^b for some integer a; a(0)=a(1)=1 by convention.
%C A253641 A000005(a(n))-1 yields the number of times n is listed in A072103, i.e., the number of ways it can be written differently as perfect power.
%C A253641 For any n, a(n) >= 1 since n = n^1.
%C A253641 Integers n = 0 and n = 1 can be written as n^b with arbitrarily large b; to remain consistent with the preceding formula and the comment, the conventional choice a(n) = 1 seemed the best one.
%C A253641 The same as A052409 if the convention is dropped. - _R. J. Mathar_, Jan 29 2015
%H A253641 Antti Karttunen, <a href="/A253641/b253641.txt">Table of n, a(n) for n = 0..10000</a>
%e A253641 a(4) = 2 since 4 = 2^2. a(64) = 6 since 64 = 2^6 (although also 64 = 4^3 = 8^2).
%p A253641 a:=proc(n) if n in {0, 1} then 1 else igcd(map(i->i[2], ifactors(n)[2])[]); fi; end: seq(a(n), n=0..120); # _Ridouane Oudra_, Jun 10 2025
%o A253641 (PARI) A253641(n)=max(ispower(n),1)
%o A253641 (Python)
%o A253641 from math import gcd
%o A253641 from sympy import factorint
%o A253641 def A253641(n): return gcd(*factorint(n).values()) if n>1 else 1 # _Chai Wah Wu_, Aug 13 2024
%Y A253641 Cf. A001597, A072103, A175064, A253642, A052409.
%K A253641 nonn,easy
%O A253641 0,5
%A A253641 _M. F. Hasler_, Jan 25 2015