login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A367246 a(n) is the number of n-digit numbers whose difference between the largest and smallest digits is equal to 5. 7

%I #5 Nov 12 2023 13:31:23

%S 0,9,139,1419,12079,92859,669319,4617699,30878959,201792939,

%T 1295974999,8212422579,51499341439,320287850619,1978857202279,

%U 12161478061059,74421280021519,453832688077899,2759692966903159,16742329188365139,101377580843991199,612894508749226779,3700556151386869639

%N a(n) is the number of n-digit numbers whose difference between the largest and smallest digits is equal to 5.

%C a(n) is the number of n-digit numbers in A366962.

%H <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (15,-74,120).

%F a(n) = 29*6^(n-1) - 49*5^(n-1) + 5*4^n.

%F a(n) = 15*a(n-1) - 74*a(n-2) + 120*a(n-3) for n > 3.

%F O.g.f.: x^2*(9 + 4*x)/((1 - 4*x)*(1 - 5*x)*(1 - 6*x)).

%F E.g.f.: (145*exp(6*x) - 294*exp(5*x) + 150*exp(4*x) - 1)/30.

%t LinearRecurrence[{15,-74,120},{0,9,139},23]

%Y Cf. A366962.

%Y Cf. A000302, A000351, A000400.

%Y Cf. A367243, A367244, A367245, A367247, A367248, A367249, A367250.

%K nonn,base,easy

%O 1,2

%A _Stefano Spezia_, Nov 11 2023

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 14 18:55 EDT 2024. Contains 375166 sequences. (Running on oeis4.)