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”).
%I #25 Sep 05 2021 22:02:00
%S 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,
%T 8,12,10,12,9,13,11,13,10,14,12,14,11,15,13,15,12,16,14,16,13,17,15,
%U 17,14,18,16,18,15,19,17,19,16,20,18,20,17,21,19,21,18
%N Smallest number of integer-sided squares needed to tile a 4 X n rectangle.
%H Alois P. Heinz, <a href="/A226577/b226577.txt">Table of n, a(n) for n = 0..1000</a>
%H <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (1,0,0,1,-1).
%F G.f.: (-3*x^4+2*x^3-2*x^2+4*x)/(x^5-x^4-x+1).
%F a(n) = 1 + a(n-4) for n>3.
%F 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]
%e a(11) = 6:
%e ._._._._._._._._._._._.
%e | | | |
%e | | | |
%e | | |_____|
%e |_______|_______|_|_|_|
%p a:= n-> iquo(n, 4, 'r') +[0, 4, 2, 4][r+1]:
%p seq(a(n), n=0..80);
%t 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 *)
%t LinearRecurrence[{1,0,0,1,-1},{0,4,2,4,1},90] (* _Harvey P. Dale_, Jul 03 2019 *)
%o (Maxima) makelist(5+(2*n-1-(2+(-1)^n)*(11+2*%i^(n*(n+1))))/8, n, 0, 80); /* _Bruno Berselli_, Jun 12 2013 */
%Y Row m=4 of A113881, A219158.
%K nonn,easy
%O 0,2
%A _Alois P. Heinz_, Jun 12 2013