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.

A328350 Let S be any integer in the range 6 <= S <= 24. 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 three distinct nonzero digits d1, d2, d3 such that d1+d2+d3 = S.

This page as a plain text file.
%I A328350 #55 Apr 29 2024 09:08:00
%S A328350 0,1,34,1033,31030,931021,27930994,837930913,25137930670,754137929941,
%T A328350 22624137927754,678724137921193,20361724137901510,610851724137842461,
%U A328350 18325551724137665314,549766551724137133873,16492996551724135539550,494789896551724130756581,14843696896551724116407674,445310906896551724073360953
%N A328350 Let S be any integer in the range 6 <= S <= 24. 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 three distinct nonzero digits d1, d2, d3 such that d1+d2+d3 = S.
%C A328350 This sequence is the building block for the calculation of the sums of positive integers whose decimal expansion contains only three distinct, nonzero digits: see attached pdf document.
%H A328350 Pierre-Alain Sallard, <a href="/A328350/a328350_2.pdf">Integers sequences A328348 and A328350 to A328356</a>
%H A328350 <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (34,-123,90).
%F A328350 a(n) = (20*30^n - 29*3^n + 9)/522.
%F A328350 From _Stefano Spezia_, Oct 17 2019: (Start)
%F A328350 O.g.f.: x/(1 - 34*x + 123*x^2 - 90*x^3).
%F A328350 E.g.f.: (1/522)*(9*exp(x) - 29*exp(3*x) + 20*exp(30*x)).
%F A328350 a(n) = 34*a(n-1) - 123*a(n-2) + 90*a(n-3) for n > 2. (End)
%F A328350 a(n) = 31*a(n-1) - 30*a(n-2) + 3^n for n > 1. - _Pierre-Alain Sallard_, Dec 15 2019
%e A328350 For n=2, the sum of all positive integers whose decimal expansions consist of at most n=2 of the digits 5, 6 or 7, i.e., the sum 5+6+7+55+56+57+65+66+67+75+76+77, is equal to a(2)*(5+6+7) = 612.
%e A328350 The formula is valid for any other choice of three distinct digits. Another example: again with n=2, but let's say with the digits 1, 2 and 3, the sum 1+2+3+11+12+13+21+22+23+31+32+33 is equal to a(2)*(1+2+3) = 204.
%t A328350 Array[(20*30^# - 29*3^# + 9)/522 &, 20, 0] (* or *)
%t A328350 LinearRecurrence[{34, -123, 90}, {0, 1, 34}, 20] (* _Paolo Xausa_, Apr 29 2024 *)
%o A328350 (Python) [(20*30**n-29*3**n+9)//522 for n in range(20)]
%Y A328350 Cf. A328348, A328351, A328352, A328353, A328354, A328355, A328356.
%K A328350 nonn,base,easy
%O A328350 0,3
%A A328350 _Pierre-Alain Sallard_, Oct 13 2019
%E A328350 Needs editing. - _N. J. A. Sloane_, Dec 12 2019