login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A328355
Let S be any integer in the range 36 <= S <= 44. Sequence has the property that a(n)*S is the sum of all positive integers whose decimal expansion has <= n digits and uses eight distinct nonzero digits d1,d2,d3,d4,d5,d6,d7,d8 such that d1+d2+d3+d4+d5+d6+d7+d8=S.
8
0, 1, 89, 7193, 576025, 46086681, 3686971929, 294958053913, 23596646709785, 1887731755956761, 151018540629932569, 12081483251621739033, 966518660139556190745, 77321492811243031804441, 6185719424900070836714009, 494857553992010693275990553, 39588604319360895672790202905
OFFSET
0,3
COMMENTS
This sequence is the building block for the calculation of the sums of positive integers whose decimal expansion uses exactly eight distinct, nonzero digits: see the attached pdf documents.
FORMULA
a(n) = (70*80^n - 79*8^n + 9) / 4977.
a(n) = 81 a(n-1) - 80 a(n-2) + 8^(n-1) for n > 1.
G.f.: x / (1 - 89*x + 728*x^2 - 640*x^3).
a(n) = 89*a(n-1) - 728*a(n-2) + 640*a(n-3) for n > 2.
E.g.f.: (9*exp(x) - 79*exp(8*x) + 70*exp(80*x))/4977. - Stefano Spezia, Dec 11 2019
EXAMPLE
For n=2, the sum of all positive integers whose decimal notation is made of any digit different from 0 and, let's say, 9 with at most n=2 such digits, i.e., the sum 1+2+3+4+5+6+7+8+11+12+13+14+15+16+17+18+21+...+28+31+...+38+41+...+48+51+...+58+61+...+68+71+...+78+81+...+88, is equal to a(2)*(1+2+3+4+5+6+7+8) = 89*36 = 3204.
Similarly, and always with n=2, the sum of all positive integers whose decimal notation is made of any digit different from 0 and, let's say, 8, i.e., the sum 1+2+3+4+5+6+7+9+11+..+17+19+21+...+27+29+31+...+37+39+41+...+47+49+51+...+57+59+61+...+67+69+71+...+77+79+91+...+97+99 is equal to a(2)*(1+2+3+4+5+6+7+9) = 89*37 = 3293.
MATHEMATICA
CoefficientList[Series[x/(1 - 89 x + 728 x^2 - 640 x^3), {x, 0, 16}], x] (* Michael De Vlieger, Dec 10 2019 *)
PROG
(Python)[(70*80**n-79*8**n+9)//4977 for n in range(20)]
KEYWORD
nonn,base
AUTHOR
STATUS
approved