OFFSET
1,7
COMMENTS
Odd n yields the x- and even n the y-coordinates (i.e., x- and y-coordinates alternate in the sequence).
LINKS
Index entries for linear recurrences with constant coefficients, signature (0,0,0,0,0,2,0,0,0,0,0,-1).
FORMULA
a(n) = ceiling(1/18*n*((2 - n) mod 6 + 4*n mod (-3) + 1)), for n >= 1.
x(n) = ceiling(n - 2/3*(n^2 + 1) mod 3), for n >= 1 (x-coordinates).
y(n) = floor(2*n/3)*((2 - n) mod (-3) + 1), for n >= 1 (y-coordinates).
From Colin Barker, May 03 2020: (Start)
G.f.: x^3*(1 + x^3 - 2*x^4 - x^5 + x^6 - x^7) / ((1 - x)^2*(1 + x)^2*(1 - x + x^2)^2*(1 + x + x^2)^2).
a(n) = 2*a(n-6) - a(n-12) for n>12.
(End)
From Wolfdieter Lang, Jul 13 2020: (Start)
Bisection: x(k) = a(2*k-1). x(3+3*l) = 0, x(1+3*l) = -2*l, x(2+3*l) = 1+2*l, for l >= 0.
x(k) = (2*(k-1)*modp((k-4)^2,3) - (2*k-1)*modp((k-2)^2,3) + 1)/3, for k >= 1.
y(k) = a(2*k). y(3+3*k) = 1+l, y(1+3*k) = -l = y(2+3*k), for l >= 0.
y(k) = ((k-1)*modp((k-1)^2,3) + (k-2)*modp((k+1)^2,3) - k*modp(k^2,3) -(k-3))/3, k >= 1.
G.f.s: Gx(t) = t^2*(1 - 2*t^2 + t^3)/(1 - t^3)^2, and Gy(t) = t^3*(1 - t - t^2) / (1 - t^3)^2.
This produces the g.f. G(x) = Gy(x^2) + Gx(x^2)/x given by Colin Barker.
(End)
EXAMPLE
X- and y-coordinates of the corners alternate in the sequence: 0, 0, 1, 0, 0, 1, -2,-1, 3, -1, ...
(0,4)
. \
. \
. \
(0,3) \
/ \ \
/ \ \
/ \ \
/ (0,2) \ \
/ / \ \ \
/ / \ \ \
/ / \ \ \
/ / (0,1) \ \ \
/ / / \ \ \ \
/ / / \ \ \ \
/ / / \ \ \ \
/ / / (0,0)->(1,0)\ \ \
/ / / \ \ \
/ / / \ \ \
/ / (-2,-1)------------->(3,-1)\ \
/ / \ \
/ / \ \
/ (-4,-2)--------------------------->(5,-2)\
/ \
/ \
(-6,-3)------------------------------------------>(7,-3)
MATHEMATICA
a[n_] := Ceiling[1/18*n*(Mod[2 - n, 6] + 4*Mod[n, -3] + 1)]; Table[ a[n], {n, 66}] (* or *)
LinearRecurrence[{0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, -1}, {0, 0, 1, 0, 0, 1, -2, -1, 3, -1, 0, 2}, 66]
CROSSREFS
KEYWORD
sign,look
AUTHOR
Mikk Heidemaa, May 03 2020
STATUS
approved