login
A328352
Similar to A328350, but for 5 digits rather then 3.
8
0, 1, 56, 2831, 141706, 7086081, 354307956, 17715417331, 885770964206, 44288548698581, 2214427437370456, 110721371880729831, 5536068594097526706, 276803429705181511081, 13840171485260601432956, 692008574263037701042331, 34600428713151923199089206, 1730021435657596350689323581
OFFSET
0,3
COMMENTS
This sequence is the building block for the calculation of the sums of positive integers whose decimal expansion only uses five distinct, nonzero digits: see the attached pdf document.
FORMULA
a(n) = (40*50^n - 49*5^n + 9) / 1764.
a(n) = 51*a(n-1) - 50*a(n-2) + 5^(n-1) for n > 1.
G.f.: x / (1 - 56*x + 305*x^2 - 250*x^3).
a(n) = 56*a(n-1) - 305*a(n-2) + 250*a(n-3) for n > 2.
EXAMPLE
For n=2, the sum of all positive integers whose decimal notation is only made of the 3,4,5,6 and 7 digit with at most n=2 such digits, i.e. the sum 3+4+5+6+7+33+34+35+36+37+43+44+45+46+47+53+54+55+56+57+63+64+65+66+67+73+74+75+76+77 is equal to a(2)*(3+4+5+6+7) = 56*25 = 1400.
The formula is valid for any other 5-tuple of digits, as soon as the 5 digits are different from each other. Always with n=2 but let's say with the 5,6,7,8 and 9 digits, the sum 5+6+7+8+9+55+56+57+58+59+65+66+67+68+69+75+76+77+78+79+85+86+87+88+89+95+96+97+98+99 is equal to a(2)*(5+6+7+8+9) = 56*35 = 1960.
PROG
(Python) [(40*50**n-49*5**n+9)//1764 for n in range(12)]
KEYWORD
nonn,base
AUTHOR
STATUS
approved