OFFSET
0,6
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..1000
EXAMPLE
a(0) = 1: [(0,0)].
a(3) = 1: [(0,0),(2,1),(3,3)].
a(4) = 1: [(0,0),(3,1),(4,4)].
a(5) = 3: [(0,0),(3,1),(4,3),(5,5)], [(0,0),(2,1),(4,2),(5,5)], [(0,0),(4,1),(5,5)].
a(6) = 7: [(0,0),(2,1),(3,3),(5,4),(6,6)], [(0,0),(2,1),(4,2),(5,4),(6,6)], [(0,0),(4,1),(5,4),(6,6)], [(0,0),(4,1),(5,3),(6,6)], [(0,0),(3,1),(5,2),(6,6)], [(0,0),(2,1),(5,2),(6,6)], [(0,0),(5,1),(6,6)].
MAPLE
a:= proc(n) option remember; `if`(n<5, [1, 0$2, 1$2][n+1],
((n-3)*a(n-1) +(5*n-5)*a(n-2) +(3*n-3)*a(n-3)
-(4*n-20)*a(n-4) -(4*n-16)*a(n-5))/(n+1))
end:
seq(a(n), n=0..40);
MATHEMATICA
a[n_] := a[n] = If[n < 5, {1, 0, 0, 1, 1}[[n+1]], ((n-3)a[n-1] + (5n-5)a[n-2] + (3n-3)a[n-3] - (4n-20)a[n-4] - (4n-16)a[n-5])/(n+1)];
Table[a[n], {n, 0, 40}] (* Jean-François Alcover, Oct 25 2023, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Oct 14 2015
STATUS
approved