OFFSET
0,2
LINKS
Kevin Ryde, Iterations of the Dragon Curve, see index "JN".
Index entries for linear recurrences with constant coefficients, signature (2,0,1,-2).
FORMULA
G.f.: (1-2*x^3)/(1-2*x-x^3+2*x^4).
a(0) = 1, a(1) = 2, a(2) = 4, a(3) = 7, a(n) = 2*a(n-1) + a(n-3) - 2*a(n-4) for n > 3. - Jinyuan Wang, Apr 08 2020
a(n) = ceiling((6/7)*2^n) = (6*2^n + 2^(n mod 3))/7. - Kevin Ryde, Aug 25 2021
MATHEMATICA
LinearRecurrence[{2, 0, 1, -2}, {1, 2, 4, 7}, 30] (* Jinyuan Wang, Apr 07 2020 *)
PROG
(PARI) Vec((1-2*x^3)/(1-2*x-x^3+2*x^4) + O(x^50)) \\ Michel Marcus, Dec 09 2014
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, Oct 30 2000
STATUS
approved