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.
%I A328916 #11 Mar 21 2023 18:06:57 %S A328916 0,0,0,1,19,280,3699,45971,549430,6390601,72860039,818050960, %T A328916 9074118999,99668329951,1085865248550,11749578366501,126396115335059, %U A328916 1352875288102040,14417003302653899,153043636911203931,1619083493823937270,17076417934936718801 %N A328916 Number of n-digit decimal numbers containing 123 as a substring. %C A328916 See A322628 for the number of n-digit decimal numbers containing 12 as a substring. %H A328916 Michael Gutierrez, <a href="/A328916/b328916.txt">Table of n, a(n) for n = 0..997</a> %F A328916 a(n) = 10*a(n-1) + 9*10^(n-4) - a(n-3). %e A328916 For n=6, there are a(6)=3699 six-digit numbers that contain 123 as a substring. %o A328916 (Python) %o A328916 a = [0, 0, 0, 1] %o A328916 for i in range(0, 18): %o A328916 a.append(10 * a[len(a) - 1] + 9 * 10 ** (len(a) - 4) - a[len(a) - 3]) %o A328916 print(a) %Y A328916 Cf. A322628. %K A328916 nonn,base,easy %O A328916 0,5 %A A328916 _Michael Gutierrez_, Oct 30 2019