cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A226577 Smallest number of integer-sided squares needed to tile a 4 X n rectangle.

Original entry on oeis.org

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

Views

Author

Alois P. Heinz, Jun 12 2013

Keywords

Examples

			a(11) = 6:
._._._._._._._._._._._.
|       |       |     |
|       |       |     |
|       |       |_____|
|_______|_______|_|_|_|
		

Crossrefs

Row m=4 of A113881, A219158.

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]