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.

A050231 a(n) is the number of n-tosses having a run of 3 or more heads for a fair coin (i.e., probability is a(n)/2^n).

This page as a plain text file.
%I A050231 #78 Jun 05 2025 10:43:00
%S A050231 0,0,1,3,8,20,47,107,238,520,1121,2391,5056,10616,22159,46023,95182,
%T A050231 196132,402873,825259,1686408,3438828,6999071,14221459,28853662,
%U A050231 58462800,118315137,239186031,483072832,974791728,1965486047,3960221519,7974241118,16047432332,32276862265
%N A050231 a(n) is the number of n-tosses having a run of 3 or more heads for a fair coin (i.e., probability is a(n)/2^n).
%C A050231 a(n-1) is the number of compositions of n with at least one part >= 4. - _Joerg Arndt_, Aug 06 2012
%D A050231 W. Feller, An Introduction to Probability Theory and Its Applications, Vol. 1, 2nd ed. New York: Wiley, p. 300, 1968.
%H A050231 T. D. Noe, <a href="/A050231/b050231.txt">Table of n, a(n) for n = 1..300</a>
%H A050231 David Broadhurst, <a href="http://arxiv.org/abs/1504.05303">Multiple Landen values and the tribonacci numbers</a>, arXiv:1504.05303 [hep-th], 2015.
%H A050231 Simon Cowell, <a href="http://arxiv.org/abs/1506.03580">A Formula for the Reliability of a d-dimensional Consecutive-k-out-of-n:F System</a>, arXiv preprint arXiv:1506.03580 [math.CO], 2015.
%H A050231 Erich Friedman, <a href="/A050231/a050231.gif">Illustration of initial terms</a>
%H A050231 T. Langley, J. Liese, and J. Remmel, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL14/Langley/langley2.html">Generating Functions for Wilf Equivalence Under Generalized Factor Order</a>, J. Int. Seq. 14 (2011) # 11.4.2.
%H A050231 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/Run.html">Run</a>
%H A050231 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (3,-1,-1,-2).
%F A050231 a(n) = 2^n - tribonacci(n+3), see A000073. - _Vladeta Jovovic_, Feb 23 2003
%F A050231 G.f.: x^3/((1-2*x)*(1-x-x^2-x^3)). - _Geoffrey Critzer_, Jan 29 2009
%F A050231 a(n) = 2 * a(n-1) + 2^(n-4) - a(n-4) since we can add T or H to a sequence of n-1 flips which has HHH, and H to one which ends in THH and does not have HHH among the first (n-4) flips. - _Toby Gottfried_, Nov 20 2010
%F A050231 a(n) = 3*a(n-1) - a(n-2) - a(n-3) - 2*a(n-4), a(0)=0, a(1)=0, a(2)=1, a(3)=3. - _David Nacin_, Mar 07 2012
%t A050231 LinearRecurrence[{3, -1, -1, -2}, {0, 0, 1, 3}, 50] (* _David Nacin_, Mar 07 2012 *)
%o A050231 (Python)
%o A050231 def a(n, adict={0:0, 1:0, 2:1, 3:3}):
%o A050231     if n in adict:
%o A050231         return adict[n]
%o A050231     adict[n]=3*a(n-1)-a(n-2)-a(n-3)-2*a(n-4)
%o A050231     return adict[n] # _David Nacin_, Mar 07 2012
%o A050231 (PARI) concat([0,0], Vec(1/(1-2*x)/(1-x-x^2-x^3)+O(x^99))) \\ _Charles R Greathouse IV_, Feb 03 2015
%o A050231 (Magma)
%o A050231 R<x>:= PowerSeriesRing(Integers(), 60);
%o A050231 [0,0] cat Coefficients(R!( x^3/((1-2*x)*(1-x-x^2-x^3)) )); // _G. C. Greubel_, Jun 01 2025
%o A050231 (SageMath)
%o A050231 def A050231_list(prec):
%o A050231     P.<x>= PowerSeriesRing(QQ, prec)
%o A050231     return P( x^3/((1-2*x)*(1-x-x^2-x^3)) ).list()
%o A050231 a=A050231_list(41); a[1:] # _G. C. Greubel_, Jun 01 2025
%Y A050231 Cf. A000073, A008466, A050232, A050233.
%Y A050231 Column 4 of A109435.
%K A050231 nonn,nice,easy
%O A050231 1,4
%A A050231 _Eric W. Weisstein_