OFFSET
0,4
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.
LINKS
Colin Barker, Table of n, a(n) for n = 0..500
Index entries for linear recurrences with constant coefficients, signature (20,-101,10).
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
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
PROG
(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=', ')
(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
(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
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Owen M Sheff, Dec 20 2018
STATUS
approved