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.

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

Original entry on oeis.org

0, 3, 79, 1323, 18175, 223323, 2555119, 27828363, 292407775, 2990349243, 29943991759, 294872615403, 2864776362175, 27525734996763, 262061152909999, 2475899571994443, 23240879960425375, 216963121865909883, 2015960236625789839, 18656492902684557483, 172056837889322101375
Offset: 1

Views

Author

Stefano Spezia, Nov 11 2023

Keywords

Comments

a(n) is the number of n-digit numbers in A366965.

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{24,-191,504},{0,3,79},21]

Formula

a(n) = 17*9^(n-1) - 31*8^(n-1) + 2*7^n.
a(n) = 24*a(n-1) - 191*a(n-2) + 504*a(n-3) for n > 3.
O.g.f.: x^2*(3 + 7*x)/((1 - 7*x)*(1 - 8*x)*(1 - 9*x)).
E.g.f.: (136*exp(9*x) - 279*exp(8*x) + 144*exp(7*x) - 1)/72.