OFFSET
0,3
COMMENTS
When constructing this sequence, the rectangles that are considered are those whose sides are parallel to the corresponding links of the dragon curve.
LINKS
Nicolay Avilov, Illustration of initial terms.
Index entries for linear recurrences with constant coefficients, signature (1,3,-3,8,-8,-12,12,-16,16)
FORMULA
G.f.: x * (1 + x + x^2 + 6*x^3 + 7*x^4 + 2*x^6) / ((1 - x) * (1 - 2*x) * (1 + 2*x) * (1 + x^2) * (1 - 2*x^2) * (1 + 2*x^2)).
a(n) =
(3*2^n - 5*2^(n/2) + 2) / 2 for n == 0 (mod 2),
(5*2^n - 9*2^((n-1)/2) + 2) / 3 for n == 1 (mod 4),
(5*2^n - 13*2^((n-1)/2) + 4) / 3 for n == 3 (mod 4). (End)
EXAMPLE
See link:
a(3) = 2*3 = 6;
a(4) = 3*5 = 15;
a(5) = 6*7 = 42.
PROG
(Python)
x1, x2, y1, y2, ex, ey, a = 0, 1, 0, 0, 1, 0, [0]
for n in range(40):
ex, ey = ex-ey, ey+ex
x1r, x2r, y1r, y2r = y1+ex, y2+ex, -x2+ey, -x1+ey
x1, x2, y1, y2 = min(x1, x1r), max(x2, x2r), min(y1, y1r), max(y2, y2r)
a.append((x2-x1)*(y2-y1))
print(a) # Andrey Zabolotskiy, May 03 2023
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Nicolay Avilov, Apr 25 2023
EXTENSIONS
Terms a(16) and beyond and a(0)=0 from Andrey Zabolotskiy, Apr 27 2023
STATUS
approved