login
A217627
a(n) is the sum of the products of the nonzero digits of the numbers from 1 to n.
1
1, 3, 6, 10, 15, 21, 28, 36, 45, 46, 47, 49, 52, 56, 61, 67, 74, 82, 91, 93, 95, 99, 105, 113, 123, 135, 149, 165, 183, 186, 189, 195, 204, 216, 231, 249, 270, 294, 321, 325, 329, 337, 349, 365, 385, 409, 437, 469, 505, 510, 515, 525, 540, 560, 585, 615, 650
OFFSET
1,2
COMMENTS
The formula a(10^k) = 46^k can be easily derived from the Multinomial Theorem, inspecting the expansion of (1+1+2+3+...+9)^k, where the second '1's takes the place of '0' (since we are neglecting the zeros in the products). This formula can be generalized as follows:
Let B>1 be the base used for representation. Let D be a subset of {1,2,...,B-1}. Using base B, let A(n) be the sum of the products of the digits in D of the numbers up to n. Then, A(B^k)=(B+S-|D|)^k, where |D| is the cardinality of D and S is the sum of the elements of D. For example, in base 10, with D={1,3,5,7,9}, (i.e., A(n)= sum of the products of the odd digits of the numbers up to n) we have A(k)=(10+(1+3+5+7+9)-5)^k = 30^k.
LINKS
FORMULA
a(10^k) = 46^k.
EXAMPLE
a(10) = 1+2+3+4+5+6+7+8+9+1 = 46
MATHEMATICA
pp[n_]:=Times@@Select[IntegerDigits[n], #>0 &]; Accumulate[pp /@ Range[100]]
CROSSREFS
Cf. A061076 (the same sum, when zeros are taken into account).
Sequence in context: A061076 A054632 A109453 * A037123 A062918 A113168
KEYWORD
nonn,base,easy
AUTHOR
Giovanni Resta, Oct 18 2012
STATUS
approved