|
|
A347789
|
|
a(n) is the number of times that only 2 pegs have disks on them during the optimal solution to a Towers of Hanoi problem with n disks.
|
|
22
|
|
|
0, 2, 4, 8, 12, 20, 28, 44, 60, 92, 124, 188, 252, 380, 508, 764, 1020, 1532, 2044, 3068, 4092, 6140, 8188, 12284, 16380, 24572, 32764, 49148, 65532, 98300, 131068, 196604, 262140, 393212, 524284, 786428, 1048572, 1572860, 2097148, 3145724, 4194300, 6291452
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
Zero together with the partial sum of the even terms of A016116. - Omar E. Pol, Sep 14 2021
For n >= 2, a(n+1) is the number of n X n arrays of 0's and 1's with every 2 X 2 square having density exactly 1. - David desJardins, Oct 27 2022
|
|
LINKS
|
|
|
FORMULA
|
a(n) = (3+(n mod 2))*(2^floor(n/2)) - 4.
G.f.: 2*x^2*(1+x)/((1-x)*(1-2*x^2)).
a(n) = a(n-1) + 2*a(n-2) - 2*a(n-3) for n > 3. (End)
|
|
MAPLE
|
a:= proc(n) option remember;
`if`(n<3, 2*n-2, 2*(a(n-2)+2))
end:
|
|
MATHEMATICA
|
|
|
PROG
|
(PARI) a(n) = (3+(n % 2))*(2^(n\2)) - 4; \\ Michel Marcus, Sep 14 2021
(Python)
def a(n): return (3 + n%2) * 2**(n//2) - 4
|
|
CROSSREFS
|
The following sequences are all essentially the same, in the sense that they are simple transformations of each other, with A029744 = {s(n), n>=1}, the numbers 2^k and 3*2^k, as the parent: A029744 (s(n)); A052955 (s(n)-1), A027383 (s(n)-2), A354788 (s(n)-3), A347789 (s(n)-4), A209721 (s(n)+1), A209722 (s(n)+2), A343177 (s(n)+3), A209723 (s(n)+4); A060482, A136252 (minor differences from A354788 at the start); A354785 (3*s(n)), A354789 (3*s(n)-7). The first differences of A029744 are 1,1,1,2,2,4,4,8,8,... which essentially matches eight sequences: A016116, A060546, A117575, A131572, A152166, A158780, A163403, A320770. The bisections of A029744 are A000079 and A007283. - N. J. A. Sloane, Jul 14 2022
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|