cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A050227 Triangle of number of n-tosses having a run of r or more heads for a fair coin with r=1 to n across and n=1, 2, ... down.

This page as a plain text file.
%I A050227 #23 Jun 05 2025 10:13:43
%S A050227 1,3,1,7,3,1,15,8,3,1,31,19,8,3,1,63,43,20,8,3,1,127,94,47,20,8,3,1,
%T A050227 255,201,107,48,20,8,3,1,511,423,238,111,48,20,8,3,1,1023,880,520,251,
%U A050227 112,48,20,8,3,1,2047,1815,1121,558,255,112,48,20,8,3,1,4095,3719
%N A050227 Triangle of number of n-tosses having a run of r or more heads for a fair coin with r=1 to n across and n=1, 2, ... down.
%D A050227 W. Feller, An Introduction to Probability Theory and Its Applications, Vol. 1, 2nd ed. New York: Wiley, p. 300, 1968.
%H A050227 T. D. Noe, <a href="/A050227/b050227.txt">Rows n=1..100 of triangle, flattened</a>
%H A050227 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/CoinTossing.html">Coin Tossing.</a>
%H A050227 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/Run.html">Run.</a>
%e A050227 Triangle begins:
%e A050227    1;
%e A050227    3,  1;
%e A050227    7,  3, 1;
%e A050227   15,  8, 3, 1;
%e A050227   31, 19, 8, 3, 1
%e A050227   ...
%t A050227 Clear[fib]; fib[n_, n_] = 1; fib[n_, k_] /; k > n = 0; fib[n_, k_] := fib[n, k] = If[k == 1, 1, Sum[fib[m, k], {m, n - k , n - 1}]]; Table[ 2^n - fib[n + k + 1 , k], {n, 1, 12}, {k, 1, n}] // Flatten (* _Jean-François Alcover_, Jan 15 2013 *)
%Y A050227 Cf. A008466, A119706 (row sums?).
%Y A050227 Cf. A050231, A050232, A050233.
%K A050227 nonn,nice,tabl
%O A050227 1,2
%A A050227 _Eric W. Weisstein_