|
|
A167821
|
|
a(n) is the number of n-tosses having a run of 3 or more heads or a run of 3 or more tails for a fair coin (i.e., probability is a(n)/2^n).
|
|
5
|
|
|
0, 0, 2, 6, 16, 38, 86, 188, 402, 846, 1760, 3630, 7438, 15164, 30794, 62342, 125904, 253782, 510758, 1026684, 2061730, 4136990, 8295872, 16627166, 33311646, 66716028, 133582106, 267406998, 535206832, 1071049286, 2143127030, 4287918140, 8578528818
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,3
|
|
COMMENTS
|
A167821(n) is the difference between A000918(n), the number of branches of a complete binary tree of n levels, and the number of recursive calls needed to compute the (n+1)-th Fibonacci number F(n+1) as defined in A019274: A167821(n) = A000918(n) - A019274(n+1). - Denis Lorrain, Jan 14 2012
Partial sums of A027934 multiplied term by term by 2 (as shown by the second formula), i.e., partial sums of row sums of A108617. - J. M. Bergot, Oct 02 2012, clarified by R. J. Mathar, Oct 05 2012
|
|
LINKS
|
|
|
FORMULA
|
G.f.: (2 x^2)/(1 - 3 x + x^2 + 2 x^3);
a(n) = 2^n - 2*Fibonacci(n+1).
a(n) = 3*a(n-1) - a(n-2) - 2*a(n-3). - G. C. Greubel, Jun 27 2016
|
|
MATHEMATICA
|
CoefficientList[Series[(2 x^2)/(1 - 3 x + x^2 + 2 x^3), {x, 0, 30}], x]
Table[2^n - 2*Fibonacci[n + 1], {n, 1, 31}]
LinearRecurrence[{3, -1, -2}, {0, 0, 2}, 50] (* G. C. Greubel, Jun 27 2016 *)
|
|
PROG
|
|
|
CROSSREFS
|
|
|
KEYWORD
|
easy,nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|