login
Sum of n written in each integer base from 1 to n inclusive, read as decimal numbers.
0

%I #36 Jun 05 2019 15:02:47

%S 1,21,132,1232,11245,111274,1111289,11112199,111112293,1111112324,

%T 11111112343,111111112468,1111111112489,11111111112522,

%U 111111111112557,1111111111121537,11111111111121562,111111111111121678,1111111111111121705,11111111111111121832

%N Sum of n written in each integer base from 1 to n inclusive, read as decimal numbers.

%C The sequence cannot continue after 20 with the given rules, because 21 in base 11 is 1A, which cannot be read as in decimal.

%e For n=3, the bases are 111 (base 1), 11 (base 2), and 10 (base 3), which sum to 132.

%o (PARI) digs(n, b) = if (b==1, vector(n, k, 1), digits(n, b));

%o a(n) = sum(b=1, n, fromdigits(digs(n, b), 10)); \\ _Michel Marcus_, Jun 05 2019

%K nonn,base

%O 1,2

%A _David Robillard_, Jun 05 2019