login
a(n) = (n')^A054054(n), where n' is the number resulting from removing the rightmost occurrence of the smallest digit of n, A054054(n).
2

%I #33 Jul 13 2021 09:04:43

%S 0,0,0,0,0,0,0,0,0,1,1,2,3,4,5,6,7,8,9,1,2,4,9,16,25,36,49,64,81,1,3,

%T 9,27,64,125,216,343,512,729,1,4,16,64,256,625,1296,2401,4096,6561,1,

%U 5,25,125,625,3125,7776,16807,32768,59049,1

%N a(n) = (n')^A054054(n), where n' is the number resulting from removing the rightmost occurrence of the smallest digit of n, A054054(n).

%C Suggested by _Eric Angelini_'s posting to Math-Fun mailing list, Dec. 29, 2020.

%e a(201) = 21^0 = 1, a(21) = 2^1 = 2, a(232) = 23^2 = 529.

%p leastdigit:=proc(n)

%p min(convert(n,base,10));

%p end:

%p locationdigit:=proc(n,d)

%p local L,i;

%p L:=convert(n,base,10);

%p for i from 1 to nops(L) do

%p if d = L[i] then return (nops(L)+1-i); fi;

%p od:

%p end:

%p cutout:=proc(X,i) [seq(X[j],j=1..i-1),seq(X[j],j=i+1..nops(X))]; end:

%p ToNum:=proc(X)

%p add(X[i]*10^(nops(X)-i),i=1..nops(X));

%p end:

%p removeleastdigit:=proc(n)

%p local i,X;

%p i:=locationdigit(n,leastdigit(n));

%p X:=ListTools:-Reverse(convert(n,base,10));

%p ToNum(cutout(X,i));

%p end proc:

%p a:=proc(n)

%p removeleastdigit(n)^leastdigit(n);

%p end:

%o (Python)

%o def A340270(n): return A340184(n)**int(min(str(n)))

%o print([A340270(n) for n in range(1, 61)]) # _Michael S. Branicky_, Jan 03 2021

%o (PARI) apply( {A340270(n,m=vecmin(n=digits(n)))=#n>1&& forstep( i=#n,1,-1, n[i]==m && return(fromdigits(n[^i])^m))}, [1..99]) \\ _M. F. Hasler_, Jan 03 2021

%K base,easy,nonn

%O 1,12

%A _W. Edwin Clark_, Jan 02 2021

%E Changed definition as suggested by _M. F. Hasler_