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

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A122983 a(n) = (2 + (-1)^n + 3^n)/4. 19
1, 1, 3, 7, 21, 61, 183, 547, 1641, 4921, 14763, 44287, 132861, 398581, 1195743, 3587227, 10761681, 32285041, 96855123, 290565367, 871696101, 2615088301, 7845264903, 23535794707, 70607384121, 211822152361, 635466457083 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
COMMENTS
Old definition was: "Binomial transform of aeration of A081294".
Binomial transform is A063376.
A122983 = (1,1,3,7,1,1,3,7,...) mod 10. - M. F. Hasler, Feb 25 2008
Equals row sums of triangle A158301. - Gary W. Adamson, Mar 15 2009
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
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.
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
Also the domination number of the n-Hanoi graph. - Eric W. Weisstein, Jun 16 2017
Also the matching number of the n-Sierpinski sieve graph. - Eric W. Weisstein, Jun 17 2017
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
Also the lower matching number (=independent domination number) of the n-Hanoi graph. - Eric W. Weisstein, Aug 01 2023
LINKS
Ji Young Choi, A Generalization of Collatz Functions and Jacobsthal Numbers, J. Int. Seq., Vol. 21 (2018), Article 18.5.4.
Alexander Diaz-Lopez, Pamela E. Harris, Erik Insko, and Darleen Perez-Lavin, Peaks Sets of Classical Coxeter Groups, arXiv preprint, arXiv:1505.04479 [math.GR], 2015.
A. M. Hinz, S. Klavžar, U. Milutinović, and C. Petr, The Tower of Hanoi - Myths and Maths, Birkhäuser 2013. See page 99. Book's website
Uri Levy, The Magnetic Tower of Hanoi, arXiv:1003.0225 [math.CO], 2010.
Eric Weisstein's World of Mathematics, Domination Number
Eric Weisstein's World of Mathematics, Hanoi Graph
Eric Weisstein's World of Mathematics, Lower Independence Number
Eric Weisstein's World of Mathematics, Matching Number
Eric Weisstein's World of Mathematics, Sierpinski Sieve Graph
FORMULA
From Paul Barry, Jun 14 2007: (Start)
G.f.: (1-2*x-x^2)/((1-x)*(1+x)*(1-3*x));
a(n) = 3^n/4+(-1)^n/4+1/2;
E.g.f.: cosh(x)^2*exp(x). (End)
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
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
a(2*n) = 3*a(2*n-1); a(2*n+1) = 3*a(2*n) - 2. - Philippe Deléham, Aug 23 2020
MAPLE
A122983 := n -> ceil(3^n/4); 'A122983(n)' $ n=0..22; # M. F. Hasler, Feb 25 2008
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
MATHEMATICA
CoefficientList[Series[(1 - 2 x - x^2)/((1 - x) (1 + x) (1 - 3 x)), {x, 0, 40}], x] (* Harvey P. Dale, Sep 03 2013 *)
LinearRecurrence[{3, 1, -3}, {1, 1, 3}, 40] (* Harvey P. Dale, Sep 03 2013 *)
Table[(2 + (-1)^n + 3^n)/4, {n, 0, 20}] (* Eric W. Weisstein, Jun 16 2017 *)
Table[Floor[3^n/4] + 1, {n, 0, 20}] (* Eric W. Weisstein, Jan 17 2018 *)
Floor[3^Range[0, 20]/4] + 1 (* Eric W. Weisstein, Jan 17 2018 *)
PROG
(PARI) A122983(n)=3^n\4+1 \\ M. F. Hasler, Feb 25 2008
(Python)
def A122983(n): return (1 if n&1 else 3)+3**n>>2 # Chai Wah Wu, Apr 12 2023
CROSSREFS
Cf. a(j+1) = A137822(2^j) and these are the record values of A137822.
Cf. A054879 (bisection), A066443 (bisection). Row sums of A158303.
Sequence in context: A056779 A183113 A102877 * A351822 A005355 A182399
KEYWORD
easy,nonn
AUTHOR
Paul Barry, Sep 22 2006
EXTENSIONS
Extended and corrected (existing Maple code) by M. F. Hasler, Feb 25 2008
Description changed to formula by Eric W. Weisstein, Jun 16 2017
STATUS
approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 19 04:26 EDT 2024. Contains 370952 sequences. (Running on oeis4.)