The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation. Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A328351 Let S be any integer in the range 10 <= S <= 30. Sequence has the property that a(n)*S is the sum of all positive integers whose decimal expansion has <= n digits and contains at most four distinct nonzero digits d1, d2, d3 and d4 such that d1+d2+d3+d4=S. 8
 0, 1, 45, 1821, 72925, 2917341, 116695005, 4667805661, 186712248285, 7468490018781, 298739601100765, 11949584045428701, 477983361822740445, 19119334472931987421, 764773378917368975325, 30590935156695116926941, 1223637406267806108733405, 48945496250712250075959261 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,3 COMMENTS This sequence is the building block for the calculation of the sums of positive integers whose decimal notation only uses four distinct, nonzero digits: see the attached pdf document. LINKS Pierre-Alain Sallard, Integers sequences A328348 and A328350 to A328356 Index entries for linear recurrences with constant coefficients, signature (45,-204,160). FORMULA a(n) = (30*40^n-39*4^n+9)/1053. From Stefano Spezia, Oct 15 2019: (Start) G.f.: x/(1 - 45*x + 204*x^2 - 160*x^3). E.g.f.: (1/351)*exp(x)*(3 - 13*exp(3*x) + 10*exp(39*x)). a(n) = 45*a(n-1) - 204*a(n-2) + 160*a(n-3) for n > 2. (End) a(n) = 41*a(n-1) - 40*a(n-2) + 4^(n-1) for n > 1. - Pierre-Alain Sallard, Dec 22 2019 EXAMPLE For n=2, the sum of all positive integers whose decimal notation is only made of the 4,5,6 or 7 digit with at most n=2 such digits, i.e., the sum 4+5+6+7+44+45+46+47+54+55+56+57+64+65+66+67+74+75+76+77, is equal to (4+5+6+7)*a(2)=990. The formula is valid for any other quadruple, as soon as the four digits are different from each other. Another example: always with n=2 but let's say with the 1,2,3 and 4 digits, the sum 1+2+3+4+11+12+13+14+21+22+23+24+31+32+33+34+41+42+43+44 is equal to a(2)*(1+2+3+4) = 450. MATHEMATICA CoefficientList[Series[x/(1 - 45 x + 204 x^2 - 160 x^3), {x, 0, 17}], x] (* Michael De Vlieger, Dec 23 2019 *) PROG (Python) [(30*40**n-39*4**n+9)//1053 for n in range(20)] CROSSREFS Cf. A328348, A328350, A328352, A328353, A328354, A328355, A328356. Sequence in context: A049397 A215859 A143170 * A203828 A318221 A162885 Adjacent sequences:  A328348 A328349 A328350 * A328352 A328353 A328354 KEYWORD nonn,base AUTHOR Pierre-Alain Sallard, Oct 13 2019 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified June 5 12:47 EDT 2020. Contains 334840 sequences. (Running on oeis4.)