OFFSET
1,2
COMMENTS
Every number n (of two or more digits) is guaranteed to yield a smaller number a(n) since 9^k < 10^k This sequence is related to other sequences about sum of the digits or sum of powers of digits.
EXAMPLE
E.g. a(1247) = 1^4 + 2^3 + 4^2 + 7^1 = 1 + 8 + 16 + 7 = 32.
MAPLE
A114570 := proc(n) local L; L := convert(n, base, 10) ; add( op(i, L)^i, i=1..nops(L)) ; end proc: # R. J. Mathar, Dec 20 2010
MATHEMATICA
f[n_] := Block[{id = IntegerDigits@ n}, Plus @@ (id^Reverse@ Range@ Length@ id)]; Array[f, 78]
PROG
(Sage) A114570 = lambda n: sum(d**i for i, d in enumerate(n.digits(), 1)) # D. S. McNeil, Dec 21 2010
(PARI) a(n) = my(d=digits(n), k=#d); sum(i=1, k, d[i]^(k+1-i)); \\ Michel Marcus, Jan 25 2018
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Sergio Pimentel, Feb 16 2006
STATUS
approved