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.

A328348 Let S be any integer in the range 3 <= S <= 17. 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 two distinct nonzero digits p and q such that p+q=S.

This page as a plain text file.
%I A328348 #57 Dec 17 2019 17:25:47
%S A328348 0,1,23,467,9355,187131,3742683,74853787,1497075995,29941520411,
%T A328348 598830409243,11976608186907,239532163742235,4790643274852891,
%U A328348 95812865497074203,1916257309941516827,38325146198830402075,766502923976608172571,15330058479532163713563,306601169590643274795547
%N A328348 Let S be any integer in the range 3 <= S <= 17. 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 two distinct nonzero digits p and q such that p+q=S.
%C A328348 This sequence is the building block for the calculation of the sums of positive integers whose decimal notation only uses two distinct, nonzero digits. See the attached pdf document.
%H A328348 Pierre-Alain Sallard, <a href="/A328348/a328348_2.pdf">Integers sequences A328348 and A328350 to A328356</a>
%H A328348 <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (23,-62,40).
%F A328348 a(n) = (10*20^n - 19*2^n + 9)/171.
%F A328348 From _Stefano Spezia_, Oct 15 2019: (Start)
%F A328348 G.f.: x/(1 - 23*x + 62*x^2 - 40*x^3).
%F A328348 E.g.f.: (1/171)*exp(x)*(9 - 19*exp(x) + 10*exp(19*x)).
%F A328348 a(n) = 23*a(n-1) - 62*a(n-2) + 40*a(n-3) for n > 2.
%F A328348 (End)
%F A328348 a(n) = 21*a(n-1) - 20*a(n-2) + 2^(n-1) for n > 1. - _Pierre-Alain Sallard_, Dec 10 2019
%e A328348 For n=3, the sum of all positive integers whose decimal expansion contains only the digits 5 and 8 (then S=5+8=13) with at most n=3 such digits, i.e., the sum 5 + 8 + 55 + 58 + 85 + 88 + 555 + 558 + 585 + 588 + 855 + 858 + 885 + 888, is equal to a(3)*13=6071.
%e A328348 The formula is valid for any other choice of two distinct digits. Other examples: always with n=3 but let's say with the 2 and 3 digits (then S=2+3=5), the sum 2+3+22+23+32+33+222+223+232+233+322+323+332+333 is equal to a(3)*5=2335.
%e A328348 Or with the 6 and 7 digits (and which case S=6+7 is the same as with the 5 and 8 digits), the sum 6+7+66+67+...+776+777 is equal to a(3)*13=6071 (same sum as with the 5 and 8 digits).
%o A328348 (Python) [(10*20**n-19*2**n+9)/(9*19) for n in range(20)]
%Y A328348 Cf. A328350, A328351, A328352, A328353, A328354, A328355, A328356.
%K A328348 nonn,base
%O A328348 0,3
%A A328348 _Pierre-Alain Sallard_, Oct 13 2019