OFFSET
1,2
COMMENTS
The ratio phi=0.618... is chosen so that from the fourth stage on some squares overlap perfectly. The figure displays some kind of fractal behavior. See illustration.
LINKS
Colin Barker, Table of n, a(n) for n = 1..1000
Paolo Franchi, Illustration of initial terms
Index entries for linear recurrences with constant coefficients, signature (4,-5,2,2,-2).
FORMULA
Linear non-homogeneous recurrence relation:
a(n) = 2*a(n-1) + a(n-2) - 2*a(n-3) + 2*a(n-4) + 2*a(n-5) + 4.
Linear homogeneous recurrence relation:
a(n) = 4*a(n-1) - 5*a(n-2) + 2*a(n-3) + 2*a(n-4) - 2*a(n-5).
G.f.: x*(1+x)*(1+2*x^2-2*x^3) / ((1-x)*(1-3*x+2*x^2-2*x^4)). - Colin Barker, Mar 09 2016
MATHEMATICA
RecurrenceTable[{a[n + 1] ==
4 a[n] - 5 a[n - 1] + 2 a[n - 2] + 2 a[n - 3] - 2 a[n - 4],
a[1] == 1, a[2] == 5, a[3] == 17, a[4] == 45, a[5] == 105}, a, {n,
1, 30}]
RecurrenceTable[{a[n + 1] ==
2 a[n] + a[n - 1] - 2 a[n - 2] + 2 a[n - 3] + 2 a[n - 4] + 4,
a[1] == 1, a[2] == 5, a[3] == 17, a[4] == 45, a[5] == 105}, a, {n,
1, 30}]
PROG
(PARI) Vec(x*(1+x)*(1+2*x^2-2*x^3)/((1-x)*(1-3*x+2*x^2-2*x^4)) + O(x^50)) \\ Colin Barker, Mar 09 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Paolo Franchi, Mar 08 2016
STATUS
approved