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.
%I A245632 #17 Jun 05 2021 12:32:32 %S A245632 6,5,2,9,12,4,29,1,61,0,56,1,31,4,21,9,28,49,6,25,6,5,104,3,6,244,44, %T A245632 9,16,25,25,4,64,3,344,1,21,44,69,0,209,25,56,1,369,24,61,4,13,41,2,9, %U A245632 29,76,225,25,6,32,29,84,504,5,504,516,61,564,6,59,169,56,289,9,96,529,69,176,44,4,21,656 %N A245632 Least number k such that n concatenated with k is a perfect power. %H A245632 Jens Kruse Andersen, <a href="/A245632/b245632.txt">Table of n, a(n) for n = 1..10000</a> %e A245632 16 is the smallest perfect power > 9 beginning with 1. Thus a(1) = 6. %p A245632 conc:= proc(n,k) if k = 0 then 10*n else 10^(1+ilog10(k))*n+k fi end proc: %p A245632 ispow:= proc(x) local F; F:= ifactors(x)[2]; %p A245632 evalb(igcd(seq(f[2],f=F))>1) end proc: %p A245632 a:= proc(n) local k; for k from 0 do if ispow(conc(n,k)) then return k fi od end proc; %p A245632 seq(a(n),n=1..100); # _Robert Israel_, Jul 28 2014 %o A245632 (PARI) %o A245632 a(n)=p="";for(k=0,oo,p=concat(Str(n),Str(k));if(ispower(eval(p)),return(k))) %o A245632 n=1;while(n<100,print1(a(n),", ");n++) %o A245632 (Python) %o A245632 from sympy import perfect_power %o A245632 def a(n): %o A245632 s, k = str(n), 0 %o A245632 while not perfect_power(int(s+str(k))): k += 1 %o A245632 return k %o A245632 print([a(n) for n in range(1, 81)]) # _Michael S. Branicky_, Jun 05 2021 %Y A245632 Cf. A071176, A245631, A243093. %K A245632 nonn,base %O A245632 1,1 %A A245632 _Derek Orr_, Jul 27 2014