login
This site is supported by donations to The OEIS Foundation.

 

Logo

Annual Appeal: Please make a donation to keep the OEIS running. In 2017 we replaced the server with a faster one, added 20000 new sequences, and reached 7000 citations (often saying "discovered thanks to the OEIS").
Other ways to donate

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A122983 a(n) = (2 + (-1)^n + 3^n)/4. 16
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

LINKS

M. F. Hasler, Table of n, a(n) for n = 0..199.

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, 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ć, 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, Matching Number

Eric Weisstein's World of Mathematics, Hanoi Graph

Eric Weisstein's World of Mathematics, Sierpinski Sieve Graph

Index entries for linear recurrences with constant coefficients, signature (3,1,-3).

FORMULA

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). - Paul Barry, Jun 14 2007

a(0)=1, a(1)=1, a(2)=3, a(n) = 3*a(n-1) + a(n-2) - 3*a(n-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

MAPLE

BB := n->if n=0 then 1; elif n=1 then 1; else (3*BB(n-2)+2*BB(n-1)) fi: L:=[]: for k from 0 to 22 do L:=[op(L), ceil(BB(k)/2)]: od: L; # Zerinvary Lajos, Mar 19 2007, corrected by M. F. Hasler, Feb 25 2008

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

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 * A005355 A182399 A025235

Adjacent sequences:  A122980 A122981 A122982 * A122984 A122985 A122986

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 | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified December 10 00:30 EST 2018. Contains 318032 sequences. (Running on oeis4.)