OFFSET
0,2
COMMENTS
Expansion level n comprises the first 3^n segments of the curve.
LINKS
Kevin Ryde, Table of n, a(n) for n = 0..500
Kevin Ryde, Iterations of the Terdragon Curve, see index "HA".
Index entries for linear recurrences with constant coefficients, signature (4,-4,4,6,-36,36,-36,27).
FORMULA
For n>=2, a(n) = (29/24)*3^n - (h/12)*3^floor(n/2) - (c/8) where h = 15,23,11,25 and c = 5,3,1,3 according as n == 0,1,2,3 (mod 4) respectively.
a(n) = 4*a(n-1) - 4*a(n-2) + 4*a(n-3) + 6*a(n-4) - 36*a(n-5) + 36*a(n-6) - 36*a(n-7) + 27*a(n-8), for n>=10.
G.f.: (2*x + 2*x^3 + 6*x^4 - 8*x^5 + 16*x^6 - 18*x^7 + 6*x^8 - 18*x^9) /( (1-x)*(1+x^2)*(1-9*x^4)*(1-3*x) ).
G.f.: (1/24)*( 16 + 16*x - 9/(1-x) - 6/(1+x^2) - (26+48*x)/(1-3*x^2) + (-4+2*x)/(1+3*x^2) + 29/(1-3*x) ).
Lim_{n->oo} a(n)/3^n = 29/24.
EXAMPLE
For n=1, the terdragon curve comprises 3 segments:
@---@ Convex hull vertices are marked "@".
\ They enclose an area of 2 unit triangles,
@---@ so a(1) = 2.
.
For n=2, the terdragon curve comprises 9 segments:
@---@
\ Convex hull vertices are marked "@".
@---* They enclose an area of a(2) = 8
\ / \ unit triangle equivalents.
*---@
\
@---@
PROG
(PARI) my(h=[30, 46, 22, 50]); a(n) = if(n<2, 2*n, (29*3^n - h[n%4+1]*3^(n\2))\24);
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Kevin Ryde, Apr 17 2021
STATUS
approved