cp's OEIS Frontend

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.

A232801 a(2n) = (3^n - 1)/2, a(2n+1) = 3^n.

This page as a plain text file.
%I A232801 #26 Sep 08 2022 08:46:06
%S A232801 0,1,1,3,4,9,13,27,40,81,121,243,364,729,1093,2187,3280,6561,9841,
%T A232801 19683,29524,59049,88573,177147,265720,531441,797161,1594323,2391484,
%U A232801 4782969,7174453,14348907,21523360,43046721,64570081,129140163,193710244,387420489
%N A232801 a(2n) = (3^n - 1)/2,  a(2n+1) = 3^n.
%H A232801 Michael De Vlieger, <a href="/A232801/b232801.txt">Table of n, a(n) for n = 0..4192</a>
%H A232801 László Németh and László Szalay, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL24/Nemeth/nemeth8.html">Sequences Involving Square Zig-Zag Shapes</a>, J. Int. Seq., Vol. 24 (2021), Article 21.5.2.
%H A232801 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (0,4,0,-3).
%F A232801 a(2n+1) = (a(2n) + a(2n+2) + 1)/2, a(0) = 0.
%F A232801 The second differences of a(n) alternate: -1, 3^(n-1) + 1, for n >= 0.
%F A232801 a(2n) = A003462(n), a(2n+1) = A000244(n).
%F A232801 G.f.: x*(x^2-x-1)/((x^2-1)*(1-3*x^2)). - _Philippe Deléham_, Dec 12 2013
%F A232801 a(n) = 4*a(n-2)-3*a(n-4) for n>3, a(0)=0, a(1)=1, a(2)=1, a(3)=3. - _Philippe Deléham_, Dec 12 2013
%F A232801 a(n) = (1+(-1)^n)*(3^(n/2)-1)/4+(1-(-1)^n)*3^(n/2-1/2)/2. - _Wesley Ivan Hurt_, Aug 29 2015
%F A232801 E.g.f.: (1/2)*(cosh(sqrt(3)*x) - cosh(x)) + (1/sqrt(3))*sinh(sqrt(3)*x). - _G. C. Greubel_, Aug 29 2015
%p A232801 A232801:=n->(1+(-1)^n)*(3^(n/2)-1)/4+(1-(-1)^n)*3^(n/2-1/2)/2: seq(A232801(n), n=0..50); # _Wesley Ivan Hurt_, Aug 29 2015
%t A232801 Table[If[OddQ[n], 3^((n-1)/2), (3^(n/2)-1)/2], {n, 0, 50}] (* _T. D. Noe_, Dec 11 2013 *)
%t A232801 RecurrenceTable[{a[n]== 4*a[n-2] - 3*a[n-4], a[0]==0, a[1]==1, a[2]==1, a[3]==3}, a, {n,0,50}] (* _G. C. Greubel_, Aug 29 2015 *)
%o A232801 (Magma) [(1+(-1)^n)*(3^(n div 2)-1)/4+(1-(-1)^n)*3^((n-1) div 2)/2 : n in [0..50]]; // _Wesley Ivan Hurt_, Aug 29 2015
%Y A232801 Cf. A000244, A003462.
%K A232801 nonn,easy
%O A232801 0,4
%A A232801 _Richard R. Forberg_, Nov 30 2013