cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A217627 a(n) is the sum of the products of the nonzero digits of the numbers from 1 to n.

Original entry on oeis.org

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

Views

Author

Giovanni Resta, Oct 18 2012

Keywords

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.

Examples

			a(10) = 1+2+3+4+5+6+7+8+9+1 = 46
		

Crossrefs

Cf. A061076 (the same sum, when zeros are taken into account).

Programs

  • Mathematica
    pp[n_]:=Times@@Select[IntegerDigits[n],#>0 &]; Accumulate[pp /@ Range[100]]

Formula

a(10^k) = 46^k.