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.

A328916 Number of n-digit decimal numbers containing 123 as a substring.

Original entry on oeis.org

0, 0, 0, 1, 19, 280, 3699, 45971, 549430, 6390601, 72860039, 818050960, 9074118999, 99668329951, 1085865248550, 11749578366501, 126396115335059, 1352875288102040, 14417003302653899, 153043636911203931, 1619083493823937270, 17076417934936718801
Offset: 0

Views

Author

Michael Gutierrez, Oct 30 2019

Keywords

Comments

See A322628 for the number of n-digit decimal numbers containing 12 as a substring.

Examples

			For n=6, there are a(6)=3699 six-digit numbers that contain 123 as a substring.
		

Crossrefs

Cf. A322628.

Programs

  • Python
    a = [0, 0, 0, 1]
    for i in range(0, 18):
        a.append(10 * a[len(a) - 1] + 9 * 10 ** (len(a) - 4) - a[len(a) - 3])
    print(a)

Formula

a(n) = 10*a(n-1) + 9*10^(n-4) - a(n-3).