login
Sum_{k>=0} (d_k)^(k+1)*10^k, where Sum_{k>=0} (d_k)*10^k is the decimal expansion of n.
1

%I #21 Nov 16 2022 09:45:28

%S 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,40,41,42,43,44,45,

%T 46,47,48,49,90,91,92,93,94,95,96,97,98,99,160,161,162,163,164,165,

%U 166,167,168,169,250,251,252,253,254,255,256,257,258,259,360,361,362,363,364,365,366,367,368,369,490

%N Sum_{k>=0} (d_k)^(k+1)*10^k, where Sum_{k>=0} (d_k)*10^k is the decimal expansion of n.

%C a(n) = n when 0 <= n < 20 or 10^i <= n < 10^i + 20 for some i>1.

%C a(n) = n if and only if every digit of n (in base 10), except possibly the ones digit, is 0 or 1. Otherwise, n < a(n). - _Danny Rorabaugh_, Apr 02 2015

%H Michael De Vlieger, <a href="/A256577/b256577.txt">Table of n, a(n) for n = 0..10000</a>

%e a(19) = 1^2 * 10^1 + 9^1 * 10^0 = 19.

%e a(20) = 2^2 * 10^1 + 0^1 * 10^0 = 40.

%e a(40) = 4^2 * 10^1 + 0^1 * 10^0 = 160.

%e a(199) = 1^3 * 10^2 + 9^2 * 10^1 + 9^1 * 10^0 = 100 + 810 + 9 = 919.

%t Array[Total@ MapIndexed[#1^(#2)*10^(#2 - 1) & @@ {#1, First[#2]} &, Reverse@ IntegerDigits[#]] &, 71, 0] (* _Michael De Vlieger_, Nov 16 2022 *)

%o (PARI) vector(80, n, d = digits(n); sum(k=1, #d, d[k]^(#d-k+1)*10^(#d-k))) \\ _Michel Marcus_, Apr 09 2015

%Y Cf. A066566 (first 39 terms identical).

%Y Cf. A255073 (primes that remain prime, no carry).

%K base,nonn,easy

%O 0,3

%A _Michael De Vlieger_, Apr 02 2015

%E Name and comments corrected by _Paul Tek_, Apr 11 2015