OFFSET
1,1
COMMENTS
A polyline qualifies if its n-th link has length n; the angle between adjacent links is Pi/3; and links of the same parity are parallel.
Finding the possible numbers of links reduces to finding nontrivial solutions to the Pell equation x^2 - 3y^2 = 1 for even x. See the formulas below.
LINKS
Paolo Xausa, Table of n, a(n) for n = 1..1500
Alexander M. Domashenko, Problem: Snake in a hexagon (in Russian).
Alexander M. Domashenko, Problem 2211: Sixth hexagon (in Russian).
Index entries for linear recurrences with constant coefficients, signature (0,15,0,-15,0,1)
FORMULA
a(2n-1) = 3*y(2n-1) - 1, a(2n) = 3*y(2n-1) from the nontrivial solutions of the equation x^2 - 3y^2 = 1.
Here y(n) = A001353(n). - Andrey Zabolotskiy, Oct 16 2022
From Chai Wah Wu, Mar 13 2023: (Start)
a(n) = 15*a(n-2) - 15*a(n-4) + a(n-6) for n > 6.
G.f.: x*(-2-3*x-14*x^2+4*x^4+3*x^5) / ( (x-1)*(1+x)*(x^2-4*x+1)*(x^2+4*x+1) ). (End)
EXAMPLE
a(1) = 2, since the first nontrivial pair (2;1) of the Pell equation x^2 - 3y^2 = 1 determines a(1) = 3*y(1) - 1 = 3*1 - 1 = 2 and in a hexagon with side 1 a broken line of two links connects the midpoints of its opposite sides.
a(2) = 3, since the first nontrivial pair (2;1) of the Pell equation x^2 - 3y^2 = 1 determines a(2) = 3*y(2 -1) = 3 and in a hexagon with side 2 a broken line of three links connects the midpoints of its opposite sides.
a(3) = 44, since the third nontrivial pair (26;15) of the Pell equation x^2 - 3y^2 = 1 determines a(3) = 3*y(3) - 1 = 3*15 - 1 = 44.
a(4) = 45, since the third nontrivial pair (26;15) of the Pell equation x^2 - 3y^2 = 1 determines a(4) = 3*y(4 -1) = 3*15 = 45.
MATHEMATICA
LinearRecurrence[{0, 15, 0, -15, 0, 1}, {2, 3, 44, 45, 626, 627}, 30] (* Paolo Xausa, Oct 03 2024 *)
CROSSREFS
KEYWORD
nonn,easy,changed
AUTHOR
Alexander M. Domashenko, Jul 24 2022
EXTENSIONS
Edited by Peter Munn, Jan 31 2025, incorporating insight from Andrey Zabolotskiy into the name.
STATUS
approved