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.

Showing 1-3 of 3 results.

A322628 Number of n-digit decimal numbers containing a fixed 2-digit integer with distinct digits as a substring.

Original entry on oeis.org

0, 0, 1, 19, 279, 3671, 45431, 540639, 6260959, 71068951, 794428551, 8773216559, 95937737039, 1040604153831, 11210103801271, 120060433858879, 1279394234787519, 13573881914016311, 143459424905375591, 1511020367139739599, 15866744246492020399
Offset: 0

Views

Author

Owen M Sheff, Dec 20 2018

Keywords

Comments

First differences of A322052. - Jon E. Schoenfield, Jul 31 2021
See A138288 for the number of n-digit decimal numbers that do not contain a fixed 2-digit integer with distinct digits as a substring.

Crossrefs

Programs

  • GAP
    a:=[0,1,19];; for n in [4..20] do a[n]:=20*a[n-1]-101*a[n-2]+10*a[n-3]; od; Concatenation([0],a); # Muniru A Asiru, Dec 21 2018
  • Maple
    seq(coeff(series(x^2*(x-1)/((10*x-1)*(x^2-10*x+1)),x,n+1), x, n), n = 0 .. 20); # Muniru A Asiru, Dec 21 2018
  • PARI
    concat([0,0], Vec(x^2*(x-1)/((10*x-1)*(x^2-10*x+1)) + O(x^30))) \\ Colin Barker, Dec 21 2018
    
  • Python
    def find_int(i):
      if i == 0: return (0)
      intlist = [0,1,19]
      for n in range(4,i+2):
        if n > 3:
          a = 10*(intlist[n-2])+(9*10**(n-3)-intlist[n-3])
          intlist.append(a)
      return (intlist[i-1])
    for i in range(100):
      print(find_int(i), end=', ')
    

Formula

a(n) = 10*a(n-1) - a(n-2) + 9*10^(n-3) with a(0) = a(1) = 0, a(2) = 1.
G.f.: x^2*(x-1)/((10*x-1)*(x^2-10*x+1)). - Alois P. Heinz, Dec 20 2018
a(n) = (27*10^n + 5*(5-2*sqrt(6))^n*(-3+sqrt(6)) - 5*(3+sqrt(6))*(5+2*sqrt(6))^n) / 30 for n>0. - Colin Barker, Dec 21 2018

A322054 Number of decimal strings of length n that do not contain a specific string xx (where x is a single digit).

Original entry on oeis.org

10, 99, 981, 9720, 96309, 954261, 9455130, 93684519, 928256841, 9197472240, 91131561729, 902961305721, 8946835807050, 88648174014939, 878355088397901, 8703029361715560, 86232460051021149, 854419404714630381, 8465866782890863770
Offset: 1

Views

Author

N. J. A. Sloane, Dec 21 2018

Keywords

Comments

See A322053 for the number that do contain the specified string.

Examples

			Suppose the string is 00. At length 2 there are 99 strings that do not contain it. At length 3 there are 19 strings that do not contain it, 000, 00x, and x00, where x is any nonzero digit. So a(3) = 1000-19 = 981.
		

Crossrefs

Suggested by A322628.

Programs

  • Mathematica
    T[n_, k_] := LinearRecurrence[{n - 1, n - 1}, {n, n^2 - 1}, k];
    T[10, {1, 19}] (* Robert P. P. McKone, Dec 31 2020 *)

Formula

G.f.: x*(10+9*x)/(1-9*x-9*x^2).
a(n) = 9*a(n-1) + 9*a(n-2) for n >= 3.

A322053 Number of decimal strings of length n that contain a specific string xx (where x is a single digit).

Original entry on oeis.org

0, 1, 19, 280, 3691, 45739, 544870, 6315481, 71743159, 802527760, 8868438271, 97038694279, 1053164192950, 11351825985061, 121644911602099, 1296970638284440, 13767539948978851, 145580595285369619, 1534133217109136230, 16117424311550552641
Offset: 1

Views

Author

N. J. A. Sloane, Dec 21 2018

Keywords

Comments

See A322054 for the number that do not contain the specified string.

Examples

			Suppose the desired string is 00. At length 2 that is the only possibility. At length 3 there are 19 strings that contain it: 000, 00d, and d00, where d is any nonzero digit.
		

Crossrefs

Suggested by A322628.

Formula

G.f. = x^2/((1-10*x)*(1-9*x-9*x^2)).
Showing 1-3 of 3 results.