A226577 Smallest number of integer-sided squares needed to tile a 4 X n rectangle.
0, 4, 2, 4, 1, 5, 3, 5, 2, 6, 4, 6, 3, 7, 5, 7, 4, 8, 6, 8, 5, 9, 7, 9, 6, 10, 8, 10, 7, 11, 9, 11, 8, 12, 10, 12, 9, 13, 11, 13, 10, 14, 12, 14, 11, 15, 13, 15, 12, 16, 14, 16, 13, 17, 15, 17, 14, 18, 16, 18, 15, 19, 17, 19, 16, 20, 18, 20, 17, 21, 19, 21, 18
Offset: 0
Examples
a(11) = 6: ._._._._._._._._._._._. | | | | | | | | | | |_____| |_______|_______|_|_|_|
Links
- Alois P. Heinz, Table of n, a(n) for n = 0..1000
- Index entries for linear recurrences with constant coefficients, signature (1,0,0,1,-1).
Programs
-
Maple
a:= n-> iquo(n, 4, 'r') +[0, 4, 2, 4][r+1]: seq(a(n), n=0..80);
-
Mathematica
RecurrenceTable[{a[0] == 0, a[1] == 4, a[2] == 2, a[3] == 4, a[n] == 1 + a[n - 4]}, a[n], {n, 0, 80}] (* Bruno Berselli, Jun 12 2013 *) LinearRecurrence[{1,0,0,1,-1},{0,4,2,4,1},90] (* Harvey P. Dale, Jul 03 2019 *)
-
Maxima
makelist(5+(2*n-1-(2+(-1)^n)*(11+2*%i^(n*(n+1))))/8, n, 0, 80); /* Bruno Berselli, Jun 12 2013 */
Formula
G.f.: (-3*x^4+2*x^3-2*x^2+4*x)/(x^5-x^4-x+1).
a(n) = 1 + a(n-4) for n>3.
a(n) = 5 + (2*n - 1 - (2 + (-1)^n)*(11 + 2*i^(n*(n+1))))/8, where i=sqrt(-1). [Bruno Berselli, Jun 12 2013]