A255372
Number of strings of n decimal digits that contain at least one string of exactly 2 consecutive "0" digits.
Original entry on oeis.org
0, 0, 1, 18, 261, 3411, 42057, 499383, 5775480, 65506986, 731953926, 8082054387, 88382960316, 958831580700, 10332164902851, 110698940875149, 1180155371168034, 12527193711780981, 132468636134059128, 1396061253467955315, 14668489189614036627
Offset: 0
a(2) = 1 because there is only 1 two-digit string that contains the substring "00", i.e., "00" itself.
a(3) = 18 because there are 18 three-digit strings that contain a "00" substring that is not part of a string of three or more consecutive "0" digits; using "+" to represent a nonzero digit, the 18 strings comprise 9 of the form "00+" and 9 of the form "+00". ("000" is excluded.)
a(4) = 261 because there are 261 four-digit strings that contain a "00" substring that is not part of a string of three or more consecutive "0" digits; using "+" as above and "." to denote any digit (0 or otherwise), the 261 strings comprise 9*10=90 of the form "00+.", 9*9=81 of the form "+00+", and 10*9=90 of the form ".+00".
a(5) = 3411 because there are 3411 five-digit strings that contain at least one "00" substring that is not part of a string of three or more consecutive "0" digits; using "+" and "." as above, the 3411 strings comprise 9*10*10=900 of the form "00+..", 9*9*10=810 of the form "+00+.", 10*9*9=810 of the form ".+00+", and 99*9=891 that are of the form "..+00" but not of the form "00+00" (since the 9 strings of that latter form were already counted among the 900 of the form "00+..").
Cf.
A255371 (for strings with, as it were, "exactly 1 consecutive '0' digit", i.e., a "0" that is not a substring of a longer string of "0" digits) and
A255373-
A255380 (for strings of exactly k consecutive "0" digits, for the cases k=3 through k=10).
-
LinearRecurrence[{20,-100,-9,99,-90},{0,0,1,18,261},30] (* Harvey P. Dale, Jan 01 2021 *)
A255374
Number of strings of n decimal digits that contain at least one string of exactly 4 consecutive "0" digits.
Original entry on oeis.org
0, 0, 0, 0, 1, 18, 261, 3420, 42300, 503991, 5849757, 66595383, 746925399, 8278904070, 90884885481, 989800742916, 10707460718526, 115168484215116, 1232617054343121, 13135427089598511, 139446180653268195, 1475374347592901460, 15562803326717545290
Offset: 0
Cf.
A255371-
A255373 (for the k=1 through k=3 cases of "exactly k consecutive '0' digits"),
A255375-
A255380 (for the cases k=5 through k=10).
A255381
Number of strings of k+n decimal digits that contain one string of exactly k consecutive "0" digits, where k >= n.
Original entry on oeis.org
1, 18, 261, 3420, 42300, 504000, 5850000, 66600000, 747000000, 8280000000, 90900000000, 990000000000, 10710000000000, 115200000000000, 1233000000000000, 13140000000000000, 139500000000000000, 1476000000000000000, 15570000000000000000, 163800000000000000000
Offset: 0
Trivially, a(0)=1 because there is 1 string of k decimal digits that contains one string of exactly k consecutive "0" digits, where k >= 0: namely, the string of k consecutive "0" digits itself.
a(1)=18 because there are 18 strings of k+1 decimal digits that contain one string of exactly k consecutive "0" digits, where k >= 1. Letting "S" and "+" represent the string of exactly k consecutive "0" digits and any nonzero digit, respectively, the 18 strings comprise 9 of the form "S+" and 9 of the form "+S".
a(2)=261 because there are 261 strings of k+2 decimal digits that contain one string of exactly k consecutive "0" digits, where k >= 2. Letting "S", "+", and "." represent the string of exactly k consecutive "0" digits, any nonzero digit, and any digit (zero or nonzero), respectively, the 261 strings comprise 9*10=90 of the form "S+.", 9*9=81 of the form "+S+", and 10*9=90 of the form ".+S".
a(3)=3420 because there are 3420 strings of k+3 decimal digits that contain one string of exactly k consecutive "0" digits, where k >= 3. Using "S", "+", and "." as above, the 3420 strings comprise 9*10*10=900 of the form "S+..", 9*9*10=810 of the form "+S+.", 10*9*9=810 of the form ".+S+", and 10*10*9=900 of the form "..+S".
Showing 1-3 of 3 results.
Comments