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!)
A367243 a(n) is the number of n-digit numbers whose difference between the largest and smallest digits is equal to 2. 7
0, 15, 91, 381, 1375, 4605, 14791, 46341, 142975, 436845, 1326391, 4010901, 12096175, 36415485, 109500391, 329009061, 988042975, 2966160525, 8902544791, 26715760821, 80163535375, 240523111965, 721634347591, 2165033066181, 6495359245375, 19486597829805, 58460833676791 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
a(n) is the number of n-digit numbers in A366959.
LINKS
FORMULA
a(n) = (46*3^n - 93*2^n + 48)/6.
a(n) = 6*a(n-1) - 11*a(n-2) + 6*a(n-3) for n > 3.
O.g.f.: x^2*(15 + x)/((1 - x)*(1- 2*x)*(1 - 3*x)).
E.g.f.: (exp(x) - 1)^2*(46*exp(x) - 1)/6.
MATHEMATICA
LinearRecurrence[{6, -11, 6}, {0, 15, 91}, 27]
CROSSREFS
Cf. A366959.
Sequence in context: A237516 A020242 A020255 * A180248 A329759 A041428
KEYWORD
nonn,base,easy
AUTHOR
Stefano Spezia, Nov 11 2023
STATUS
approved

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 June 23 15:55 EDT 2024. Contains 373651 sequences. (Running on oeis4.)