|
|
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".
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 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
|
|
|
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). (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
|
|
MAPLE
|
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 *)
|
|
PROG
|
(Python)
|
|
CROSSREFS
|
|
|
KEYWORD
|
easy,nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
Extended and corrected (existing Maple code) by M. F. Hasler, Feb 25 2008
|
|
STATUS
|
approved
|
|
|
|