The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A122983 a(n) = (2 + (-1)^n + 3^n)/4. 18

%I

%S 1,1,3,7,21,61,183,547,1641,4921,14763,44287,132861,398581,1195743,

%T 3587227,10761681,32285041,96855123,290565367,871696101,2615088301,

%U 7845264903,23535794707,70607384121,211822152361,635466457083

%N a(n) = (2 + (-1)^n + 3^n)/4.

%C Old definition was: "Binomial transform of aeration of A081294".

%C Binomial transform is A063376.

%C A122983 = (1,1,3,7,1,1,3,7,...) mod 10. - _M. F. Hasler_, Feb 25 2008

%C Equals row sums of triangle A158301. - _Gary W. Adamson_, Mar 15 2009

%C a(n) = the number of ternary sequences of length n where the numbers of (0's, 1's) are both even. A015518 covers the (odd, even) and (even, odd) cases, and A081251 covers (odd, odd). - _Toby Gottfried_, Apr 18 2010

%C This sequence also describes the number of moves of the k-th disk solving (non-optimally) the [RED ; NEUTRAL ; BLUE] pre-colored Magnetic Tower of Hanoi (MToH) puzzle. The sequence A183119 is the partial sums of the sequence in question (obviously describing the total number of moves associated with the specific solution algorithm). For other MToH-related sequences, Cf. A183111 - A183125.

%C Let B=[1,sqrt(2),0; sqrt(2),1,sqrt(2); 0,sqrt(2),1] be a 3 X 3 matrix. Then a(n)=[B^n]_(1,1), n=0,1,2,.... - _L. Edson Jeffery_, Dec 21 2011

%C Also the domination number of the n-Hanoi graph. - _Eric W. Weisstein_, Jun 16 2017

%C Also the matching number of the n-Sierpinski sieve graph. - _Eric W. Weisstein_, Jun 17 2017

%C Let M = [1,1,1,0; 1,1,0,1; 1,0,1,1; 0,1,1,1], a 4 X 4 matrix. Then a(n) is the upper left entry in M^n. - _Philippe Deléham_, Aug 23 2020

%H M. F. Hasler, <a href="/A122983/b122983.txt">Table of n, a(n) for n = 0..199</a>.

%H Ji Young Choi, <a href="https://www.emis.de/journals/JIS/VOL21/Choi/choi10.html">A Generalization of Collatz Functions and Jacobsthal Numbers</a>, J. Int. Seq., Vol. 21 (2018), Article 18.5.4.

%H Alexander Diaz-Lopez, Pamela E. Harris, Erik Insko, Darleen Perez-Lavin, <a href="http://arxiv.org/abs/1505.04479">Peaks Sets of Classical Coxeter Groups</a>, arXiv preprint, arXiv:1505.04479 [math.GR], 2015.

%H A. M. Hinz, S. Klavžar, U. Milutinović, C. Petr, <a href="http://dx.doi.org/10.1007/978-3-0348-0237-6">The Tower of Hanoi - Myths and Maths</a>, Birkhäuser 2013. See page 99. <a href="http://tohbook.info">Book's website</a>

%H Uri Levy, <a href="http://arxiv.org/abs/1003.0225">The Magnetic Tower of Hanoi</a>, arXiv:1003.0225 [math.CO], 2010.

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/DominationNumber.html">Domination Number</a>

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/MatchingNumber.html">Matching Number</a>

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/HanoiGraph.html">Hanoi Graph</a>

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/SierpinskiSieveGraph.html">Sierpinski Sieve Graph</a>

%H <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (3,1,-3).

%F From _Paul Barry_, Jun 14 2007: (Start)

%F G.f.: (1-2*x-x^2)/((1-x)*(1+x)*(1-3*x));

%F a(n) = 3^n/4+(-1)^n/4+1/2;

%F E.g.f.: cosh(x)^2*exp(x). (End)

%F a(n) = 3*a(n-1) + a(n-2) - 3*a(n-3); a(0)=1, a(1)=1, a(2)=3. - _Harvey P. Dale_, Sep 03 2013

%F E.g.f.: Q(0)/2, where Q(k) = 1 + 3^k/( 2 - 2*(-1)^k/( 3^k + (-1)^k - 2*x*3^k/( 2*x + (k+1)*(-1)^k/Q(k+1) ))); (continued fraction). - _Sergei N. Gladkovskii_, Dec 22 2013

%F a(2*n) = 3*a(2*n-1); a(2*n+1) = 3*a(2*n) - 2. - _Philippe Deléham_, Aug 23 2020

%p A122983 := n -> ceil(3^n/4); 'A122983(n)' \$ n=0..22; # _M. F. Hasler_, Feb 25 2008

%p a[ -1]:=1:a[0]:=1:a[1]:=3:for n from 2 to 50 do a[n]:=2*a[n-1]+3*a[n-2]-2 od: seq(a[n], n=-1..25); # _Zerinvary Lajos_, Apr 28 2008

%t CoefficientList[Series[(1 - 2 x - x^2)/((1 - x) (1 + x) (1 - 3 x)), {x, 0, 40}], x] (* _Harvey P. Dale_, Sep 03 2013 *)

%t LinearRecurrence[{3, 1, -3}, {1, 1, 3}, 40] (* _Harvey P. Dale_, Sep 03 2013 *)

%t Table[(2 + (-1)^n + 3^n)/4, {n, 0, 20}] (* _Eric W. Weisstein_, Jun 16 2017 *)

%t Table[Floor[3^n/4] + 1, {n, 0, 20}] (* _Eric W. Weisstein_, Jan 17 2018 *)

%t Floor[3^Range[0, 20]/4] + 1 (* _Eric W. Weisstein_, Jan 17 2018 *)

%o (PARI) A122983(n)=3^n\4+1 \\ _M. F. Hasler_, Feb 25 2008

%Y Cf. a(j+1) = A137822(2^j) and these are the record values of A137822.

%Y Cf. A054879 (bisection), A066443 (bisection). Row sums of A158303.

%K easy,nonn

%O 0,3

%A _Paul Barry_, Sep 22 2006

%E Extended and corrected (existing Maple code) by _M. F. Hasler_, Feb 25 2008

%E Description changed to formula by _Eric W. Weisstein_, Jun 16 2017

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 April 19 21:43 EDT 2021. Contains 343117 sequences. (Running on oeis4.)