login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A244281
Answer to Red, Green and Blue Tiles Problem.
0
0, 0, 1, 4, 11, 23, 43, 75, 126, 207, 335, 536, 852, 1350, 2136, 3378, 5344, 8462, 13416, 21300, 33866, 53923, 85979, 137274, 219444, 351203, 562667, 902327, 1448298, 2326472, 3739820, 6015701, 9682260, 15591825, 25120251, 40489004, 65285631, 105304917, 169908475
OFFSET
0,4
COMMENTS
A row of n black squares is to have a number of its squares replaced by rectangles of lengths 2 (red), 3 (green) or 4 (blue). In how many different ways can the original squares be replaced if rectangles cannot be mixed and at least one rectangle must be used?
FORMULA
Empirical g.f.: -x^2*(3*x^7+2*x^6+x^4-3*x^3-x+1) / ((x-1)^2*(x^2+x-1)*(x^3+x-1)*(x^4+x-1)). - Colin Barker, Nov 14 2014
PROG
(Python)
import math
for n in range(1, 40):
ans = 0
for k in range(0, n):
for i in range(2, 5):
for j in range(1, ((k/i)+1)):
c = k - (i * j) + j
ans = ans + (math.factorial(c) / (math.factorial(j) * math.factorial(k-(i*j))))
print ans
CROSSREFS
Sequence in context: A019298 A237586 A173702 * A014242 A240074 A008181
KEYWORD
nonn
AUTHOR
Jameson Lee, Jul 02 2014
STATUS
approved