OFFSET
1,3
LINKS
Index entries for linear recurrences with constant coefficients, signature (2, 2, -2, 1).
FORMULA
G.f.: (x^2-x)/(x^4-2*x^3+2*x^2+2*x-1).
a(n) = 2*a(n-1) + 2*a(n-2) - 2*a(n-3) + a(n-4), n > 4.
EXAMPLE
Illustration of a(1)=a(2)=1:
. .__.
| .__|
| |__
| .__|
Illustration of a(3)=4:
.__.__. . .__. . .__. .__.__.
.__.__| |__| | | | | .__. |
|__.__. .__. | |__| | | | |
.__.__| | |__| .__.__| | |__|
MATHEMATICA
LinearRecurrence[{2, 2, -2, 1}, {1, 1, 4, 8}, 30] (* T. D. Noe, Nov 06 2013 *)
CROSSREFS
KEYWORD
nonn,walk
AUTHOR
Sean A. Irvine, Nov 17 2010
EXTENSIONS
G.f. formula reverted to the original (correct) value by Stefan Bühler, Nov 06 2013
STATUS
approved