OFFSET
1,15
COMMENTS
Table starts:
..1..1...1...1...1...1...1....1....1....1....1....1....1....1....1....1....1
..1..1...1...1...1...1...1....1....1....1....1....1....1....1....1....1....1
..1..1...1...1...1...1...1....1....1....1....1....1....1....1....1....1....1
..1..1...1...1...1...1...1....1....1....1....1....1....1....1....1....1....1
..2..3...4...5...6...7...8....9...10...11...12...13...14...15...16...17...18
..3..5...7...9..11..13..15...17...19...21...23...25...27...29...31...33...35
..4..7..10..13..16..19..22...25...28...31...34...37...40...43...46...49...52
..5..9..13..17..21..25..29...33...37...41...45...49...53...57...61...65...69
..6.11..16..21..26..31..36...41...46...51...56...61...66...71...76...81...86
..8.17..28..41..56..73..92..113..136..161..188..217..248..281..316..353..392
.11.27..49..77.111.151.197..249..307..371..441..517..599..687..781..881..987
.15.41..79.129.191.265.351..449..559..681..815..961.1119.1289.1471.1665.1871
.20.59.118.197.296.415.554..713..892.1091.1310.1549.1808.2087.2386.2705.3044
.26.81.166.281.426.601.806.1041.1306.1601.1926.2281.2666.3081.3526.4001.4506
LINKS
R. H. Hardin, Table of n, a(n) for n = 1..9999
FORMULA
With z X 1 tiles of k colors on an n X 1 grid (with n >= z), either there is a tile (of any of the k colors) on the first spot, followed by any configuration on the remaining (n-z) X 1 grid, or the first spot is vacant, followed by any configuration on the remaining (n-1) X 1. So T(n,k) = T(n-1,k) + k*T(n-z,k), with T(n,k) = 1 for n=0,1,...,z-1. The solution is T(n,k) = sum_r r^(-n-1)/(1 + z k r^(z-1)) where the sum is over the roots of the polynomial k x^z + x - 1.
T(n,k) = sum {s=0..[n/5]} (binomial(n-4*s,s)*k^s).
For z X 1 tiles, T(n,k,z) = sum{s=0..[n/z]} (binomial(n-(z-1)*s,s)*k^s). - R. H. Hardin, Jul 31 2011
EXAMPLE
Some solutions for n=11 k=3; colors=1, 2, 3; empty=0
..0....2....2....0....0....1....0....3....3....0....0....0....0....3....1....0
..0....2....2....0....1....1....3....3....3....3....2....3....1....3....1....1
..0....2....2....0....1....1....3....3....3....3....2....3....1....3....1....1
..3....2....2....0....1....1....3....3....3....3....2....3....1....3....1....1
..3....2....2....0....1....1....3....3....3....3....2....3....1....3....1....1
..3....1....0....2....1....0....3....3....0....3....2....3....1....0....0....1
..3....1....3....2....1....1....2....3....2....0....0....3....0....3....0....2
..3....1....3....2....1....1....2....3....2....0....0....3....0....3....0....2
..0....1....3....2....1....1....2....3....2....0....0....3....0....3....0....2
..0....1....3....2....1....1....2....3....2....0....0....3....0....3....0....2
..0....0....3....0....1....1....2....0....2....0....0....3....0....3....0....2
MAPLE
T:= proc(n, k) option remember;
`if`(n<0, 0,
`if`(n<5 or k=0, 1, k*T(n-5, k) +T(n-1, k)))
end:
seq(seq(T(n, d+1-n), n=1..d), d=1..13); # Alois P. Heinz, Jul 29 2011
MATHEMATICA
T[n_, k_] := T[n, k] = If[n<0, 0, If[n < 5 || k == 0, 1, k*T[n-5, k]+T[n-1, k]]]; Table[Table[T[n, d+1-n], {n, 1, d}], {d, 1, 14}] // Flatten (* Jean-François Alcover, Mar 04 2014, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
R. H. Hardin, with proof and formula from Robert Israel in the Sequence Fans Mailing List, Jul 29 2011
STATUS
approved