The OEIS is supported by the many generous donors to the OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A232801 a(2n) = (3^n - 1)/2,  a(2n+1) = 3^n. 1
 0, 1, 1, 3, 4, 9, 13, 27, 40, 81, 121, 243, 364, 729, 1093, 2187, 3280, 6561, 9841, 19683, 29524, 59049, 88573, 177147, 265720, 531441, 797161, 1594323, 2391484, 4782969, 7174453, 14348907, 21523360, 43046721, 64570081, 129140163, 193710244, 387420489 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,4 LINKS Michael De Vlieger, Table of n, a(n) for n = 0..4192 László Németh and László Szalay, Sequences Involving Square Zig-Zag Shapes, J. Int. Seq., Vol. 24 (2021), Article 21.5.2. Index entries for linear recurrences with constant coefficients, signature (0,4,0,-3). FORMULA a(2n+1) = (a(2n) + a(2n+2) + 1)/2, a(0) = 0. The second differences of a(n) alternate: -1, 3^(n-1) + 1, for n >= 0. a(2n) = A003462(n), a(2n+1) = A000244(n). G.f.: x*(x^2-x-1)/((x^2-1)*(1-3*x^2)). - Philippe Deléham, Dec 12 2013 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 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 E.g.f.: (1/2)*(cosh(sqrt(3)*x) - cosh(x)) + (1/sqrt(3))*sinh(sqrt(3)*x). - G. C. Greubel, Aug 29 2015 MAPLE 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 MATHEMATICA Table[If[OddQ[n], 3^((n-1)/2), (3^(n/2)-1)/2], {n, 0, 50}] (* T. D. Noe, Dec 11 2013 *) 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 *) PROG (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 CROSSREFS Cf. A000244, A003462. Sequence in context: A079284 A000624 A244703 * A056514 A151517 A219043 Adjacent sequences:  A232798 A232799 A232800 * A232802 A232803 A232804 KEYWORD nonn,easy AUTHOR Richard R. Forberg, Nov 30 2013 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified January 28 04:11 EST 2022. Contains 350654 sequences. (Running on oeis4.)