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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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

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(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

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

CROSSREFS

Cf. A008466, A050231.

Sequence in context: A074082 A212383 A097813 * A093041 A156616 A265758

Adjacent sequences:  A167818 A167819 A167820 * A167822 A167823 A167824

KEYWORD

easy,nonn

AUTHOR

V.J. Pohjola, Nov 13 2009

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 April 23 07:51 EDT 2019. Contains 322381 sequences. (Running on oeis4.)