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 A266504 #40 Sep 08 2022 08:46:15 %S A266504 2,2,1,3,4,8,9,19,22,46,53,111,128,268,309,647,746,1562,1801,3771, %T A266504 4348,9104,10497,21979,25342,53062,61181,128103,147704,309268,356589, %U A266504 746639,860882,1802546,2078353,4351731,5017588,10506008,12113529,25363747,29244646,61233502 %N A266504 a(n) = 2*a(n - 2) + a(n - 4) with a(0) = a(1) = 2, a(2) = 1, a(3) = 3. %C A266504 This sequence gives all x in N | 2*x^2 - 7(-1)^x = y^2. The companion sequence to this sequence, giving y values, is A266505. %C A266504 A266505(n)/a(n) converges to sqrt(2). %C A266504 Alternatively, 1/4*(3*A002203(floor[n/2]) - A002203(n-(-1)^n)), where A002203 gives the Companion Pell numbers, or, in Lucas sequence notation, V_n(2, -1). %C A266504 Alternatively, bisection of A266506. %C A266504 Alternatively, A048654(n -1) and A078343(n + 1) interlaced. %C A266504 Alternatively, A100525(n-1), A266507(n), A038761(n) and A253811(n) interlaced. %C A266504 Let b(n) = (a(n) - a(n)(mod 2))/2, that is b(n) = {1, 1, 0, 1, 2, 4, 4, 9, 11, 23, 26, 55, 64, ...}. Then: %C A266504 A006452(n) = {b(4n+0) U b(4n+1)} gives n in N such that n^2 - 1 is triangular; %C A266504 A216134(n) = {b(4n+2) U b(4n+3)} gives n in N such that n^2 + n + 1 is triangular (indices of Sophie Germain triangular numbers); %C A266504 A216162(n) = {b(4n+0) U b(4n+2) U b(4n+1) U b(4n+3)}, sequences A006452 and A216134 interlaced. %H A266504 G. C. Greubel, <a href="/A266504/b266504.txt">Table of n, a(n) for n = 0..1000</a> %H A266504 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (0,2,0,1). %F A266504 a(n) = 1/sqrt(8)*(+sqrt(2)*(1+sqrt(2))^(floor(n/2)-(-1)^n)*(-1)^n - 3*(1-sqrt(2))^(floor(n/2)-(-1)^n) + sqrt(2)*(1-sqrt(2))^(floor(n/2)-(-1)^n)*(-1)^n + 3*(1+sqrt(2))^(floor(n/2)-(-1)^n)). %F A266504 a(n) = 1/4*((3*((1+sqrt(2))^floor(n/2)+(1-sqrt(2))^floor(n/2))) - (-1)^n*((1+sqrt(2))^(floor(n/2)-(-1)^n)+(1-sqrt(2))^(floor(n/2)-(-1)^n))). %F A266504 a(2n) = (+sqrt(2)*(1+sqrt(2))^(n-1) - 3 *(1-sqrt(2))^(n-1) + sqrt(2)*(1-sqrt(2))^(n-1) + 3*(1 + sqrt(2))^(n-1))/sqrt(8) = A048654(n -1). %F A266504 a(2n) = 1/4*((3*((1+sqrt(2))^n+(1-sqrt(2))^n)) - ((1+sqrt(2))^(n-1)+(1-sqrt(2))^(n-1))) = A048654(n -1). %F A266504 a(2n + 1) = (-sqrt(2)*(1+sqrt(2))^(n+1) - 3 *(1-sqrt(2))^(n+1) - sqrt(2)*(1-sqrt(2))^(n+1) + 3*(1+sqrt(2))^(n+1))/sqrt(8) = A078343(n + 1). %F A266504 a(2n + 1) =1/4*((3*((1+sqrt(2))^n+(1-sqrt(2))^n)) + ((1+sqrt(2))^(n+1)+(1-sqrt(2))^(n+1))) = A078343(n + 1). %F A266504 a(4n + 0) = 6*a(4n - 4) - a(4n - 8) = A100525(n-1). %F A266504 a(4n + 1) = 6*a(4n - 3) - a(4n - 7) = A266507(n). %F A266504 a(4n + 2) = 6*a(4n - 2) - a(4n - 6) = A038761(n). %F A266504 a(4n + 3) = 6*a(4n - 1) - a(4n - 5) = A253811(n). %F A266504 sqrt(2*a(n)^2 - 7(-1)^a(n))*sgn(2*n - 1) = A266505(n). %F A266504 (a(2n + 1) + a(2n))/2 = A002203(n), where A002203 gives the companion Pell numbers. %F A266504 (a(2n + 1) - a(2n))/2 = A000129(n), where A000129 gives the Pell numbers. %F A266504 (a(2n+2) + a(2n+1))*2 = A002203(n+2) %F A266504 (a(2n+2) - a(2n+1))*2 = A002203(n-1). %F A266504 G.f.: (1-x)*(2+4*x+x^2) / (1-2*x^2-x^4). - _Colin Barker_, Dec 31 2015 %t A266504 LinearRecurrence[{0, 2, 0, 1}, {2, 2, 1, 3}, 70] (* _Vincenzo Librandi_, Dec 31 2015 *) %t A266504 Table[SeriesCoefficient[(1 - x) (2 + 4 x + x^2)/(1 - 2 x^2 - x^4), {x, 0, n}], {n, 0, 41}] (* _Michael De Vlieger_, Dec 31 2015 *) %o A266504 (Magma) I:=[2,2,1,3]; [n le 4 select I[n] else 2*Self(n-2)+Self(n-4): n in [1..70]]; // _Vincenzo Librandi_, Dec 31 2015 %o A266504 (PARI) Vec((1-x)*(2+4*x+x^2)/(1-2*x^2-x^4) + O(x^50)) \\ _Colin Barker_, Dec 31 2015 %Y A266504 Cf. A000129, A001333, A002203, A002965, A006451, A006452, A002965, A038761, A038762, A048654, A048655, A054490, A078343, A098586, A098790, A100525, A101386, A135532, A216134, A216162, A253811, A255236, A266504, A266505, A266507. %K A266504 nonn,easy %O A266504 0,1 %A A266504 _Raphie Frank_, Dec 30 2015