

A167821


a(n) is the number of ntosses 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

G. C. Greubel, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (3, 1, 2).


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(n1)  a(n2)  2*a(n3).  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

(MAGMA) [2^n2*Fibonacci(n+1): n in [1..40]]; // Vincenzo Librandi, Jun 28 2016


CROSSREFS

Cf. A008466, A050231.
Sequence in context: A212383 A333881 A097813 * A093041 A156616 A330886
Adjacent sequences: A167818 A167819 A167820 * A167822 A167823 A167824


KEYWORD

easy,nonn


AUTHOR

V.J. Pohjola, Nov 13 2009


STATUS

approved



