A279035 Left-concatenate zeros to 2^(n-1) such that it has n digits. In the regular array formed by listing the found powers, a(n) is the sum of (nonzero) digits in column n.
1, 2, 4, 9, 9, 9, 8, 19, 9, 8, 17, 27, 27, 27, 28, 17, 26, 35, 45, 45, 46, 37, 25, 44, 53, 65, 42, 72, 74, 52, 70, 90, 92, 74, 53, 62, 72, 70, 93, 61, 81, 80, 89, 100, 91, 80, 91, 79, 99, 99, 99, 98, 107, 117, 118, 106, 130, 86, 123, 155, 137, 117, 118, 105, 136
Offset: 1
Examples
1 .2 . 4 . .8 . .16 . . 32 . . .64 . . .128 . . . 256 . . . .512 . . . .1024 The sum of digits of the first column is 1. Therefore, a(1) = 1. The sum of digits in column 4 is 8 + 1 = 9. Therefore, a(4) = 9. With the powers of 2 listed above, we can find n up to n = 7. For n > 8, some digits from 2^m compose a(n) for m > 10.
Links
- Robert G. Wilson v, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
f[n_, b_] := Block[{k = n}, While[k < n + Floor[ k*Log10[b]], k++]; Plus @@ Mod[ Quotient[ Table[ b^j*10^(k - j), {j, n -1, k}], 10^(k - n +1)], 10]]; Table[f[n, 2], {n, 65}] (* Robert G. Wilson v, Dec 03 2016 *)
Comments