login
Least number k > n such that n concatenated with k is a perfect power.
2

%I #19 Jun 05 2021 12:33:20

%S 6,5,6,9,12,25,29,41,61,24,56,25,31,44,21,81,28,49,36,25,87,201,104,

%T 336,281,244,44,224,241,276,36,49,64,81,344,100,249,44,69,96,209,436,

%U 56,89,369,225,61,400,284,176,84,441,361,76,225,169,76,564,319,84,504,500,504,516,536,564

%N Least number k > n such that n concatenated with k is a perfect power.

%H Harvey P. Dale, <a href="/A243093/b243093.txt">Table of n, a(n) for n = 1..1000</a>

%t pp[n_]:=Module[{k=n+1},While[GCD@@FactorInteger[n*10^IntegerLength[ k]+ k][[All,2]]<2,k++];k]; Array[pp,70] (* _Harvey P. Dale_, Oct 09 2016 *)

%o (PARI)

%o a(n)=s=Str(n);k=n+1;while(!ispower(eval(concat(s,Str(k)))),k++);return(k)

%o vector(100,n,a(n))

%o (Python)

%o from sympy import perfect_power

%o def a(n):

%o s, k = str(n), n+1

%o while not perfect_power(int(s+str(k))): k += 1

%o return k

%o print([a(n) for n in range(1, 67)]) # _Michael S. Branicky_, Jun 05 2021

%Y Cf. A245632.

%K nonn,base

%O 1,1

%A _Derek Orr_, Aug 18 2014