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!)
A328916 Number of n-digit decimal numbers containing 123 as a substring. 1

%I #11 Mar 21 2023 18:06:57

%S 0,0,0,1,19,280,3699,45971,549430,6390601,72860039,818050960,

%T 9074118999,99668329951,1085865248550,11749578366501,126396115335059,

%U 1352875288102040,14417003302653899,153043636911203931,1619083493823937270,17076417934936718801

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

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

%H Michael Gutierrez, <a href="/A328916/b328916.txt">Table of n, a(n) for n = 0..997</a>

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

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

%o (Python)

%o a = [0, 0, 0, 1]

%o for i in range(0, 18):

%o a.append(10 * a[len(a) - 1] + 9 * 10 ** (len(a) - 4) - a[len(a) - 3])

%o print(a)

%Y Cf. A322628.

%K nonn,base,easy

%O 0,5

%A _Michael Gutierrez_, Oct 30 2019

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 1 02:11 EDT 2023. Contains 363068 sequences. (Running on oeis4.)