This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A356047 #46 Jan 31 2025 11:51:11 %S A356047 2,3,44,45,626,627,8732,8733,121634,121635,1694156,1694157,23596562, %T A356047 23596563,328657724,328657725,4577611586,4577611587,63757904492, %U A356047 63757904493,888033051314,888033051315,12368704813916,12368704813917,172273834343522,172273834343523,2399464975995404,2399464975995405,33420235829592146,33420235829592147 %N A356047 The number of links of a qualifying "snake" polyline that connects the midpoints of opposite sides of the n-th regular integer hexagon that allows such a construction. %C A356047 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. %C A356047 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. %H A356047 Paolo Xausa, <a href="/A356047/b356047.txt">Table of n, a(n) for n = 1..1500</a> %H A356047 Alexander M. Domashenko, <a href="https://elementy.ru/problems/2606/Zmeyka_v_shestiugolnike">Problem: Snake in a hexagon</a> (in Russian). %H A356047 Alexander M. Domashenko, <a href="https://www.diofant.ru/problem/3996/">Problem 2211: Sixth hexagon</a> (in Russian). %H A356047 <a href="/index/Rec#order_06">Index entries for linear recurrences with constant coefficients</a>, signature (0,15,0,-15,0,1) %F A356047 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. %F A356047 Here y(n) = A001353(n). - _Andrey Zabolotskiy_, Oct 16 2022 %F A356047 From _Chai Wah Wu_, Mar 13 2023: (Start) %F A356047 a(n) = 15*a(n-2) - 15*a(n-4) + a(n-6) for n > 6. %F A356047 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) %e A356047 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. %e A356047 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. %e A356047 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. %e A356047 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. %t A356047 LinearRecurrence[{0, 15, 0, -15, 0, 1}, {2, 3, 44, 45, 626, 627}, 30] (* _Paolo Xausa_, Oct 03 2024 *) %Y A356047 Cf. A001353, A357733 (sides of the hexagons). %K A356047 nonn,easy %O A356047 1,1 %A A356047 _Alexander M. Domashenko_, Jul 24 2022 %E A356047 Edited by _Peter Munn_, Jan 31 2025, incorporating insight from _Andrey Zabolotskiy_ into the name.