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.

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

This page as a plain text file.
%I A050232 #73 Jun 05 2025 10:42:35
%S A050232 0,0,0,1,3,8,20,48,111,251,558,1224,2656,5713,12199,25888,54648,
%T A050232 114832,240335,501239,1042126,2160676,4468664,9221281,18989899,
%U A050232 39034824,80103276,164126496,335808927,686182387,1400438814,2854992080,5814293120,11829648225,24046855887,48840756608
%N A050232 a(n) is the number of n-tosses having a run of 4 or more heads for a fair coin (i.e., probability is a(n)/2^n).
%C A050232 a(n-1) is the number of compositions of n with at least one part >= 5. - _Joerg Arndt_, Aug 06 2012
%D A050232 W. Feller, An Introduction to Probability Theory and Its Applications, Vol. 1, 2nd ed. New York: Wiley, p. 300, 1968.
%H A050232 T. D. Noe, <a href="/A050232/b050232.txt">Table of n, a(n) for n = 1..300</a>
%H A050232 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 A050232 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 A050232 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/Run.html">Run</a>
%H A050232 <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (3,-1,-1,-1,-2).
%F A050232 a(n) = 2^n - tetranacci(n+4), see A000078. - _Vladeta Jovovic_, Feb 23 2003
%F A050232 G.f.: x^4/((1-2*x)*(1-x-x^2-x^3-x^4)). - _Geoffrey Critzer_, Jan 29 2009
%F A050232 a(n) = 3*a(n-1) - a(n-2) - a(n-3) - a(n-4) - 2*a(n-5). - _Wesley Ivan Hurt_, Apr 23 2021
%t A050232 Flatten[With[{tetrnos=LinearRecurrence[{1,1,1,1},{0,1,1,2},50]}, Table[ 2^n- Take[tetrnos,{n+3}],{n,40}]]] (* _Harvey P. Dale_, Dec 02 2011 *)
%t A050232 LinearRecurrence[{3,-1,-1,-1,-2}, {0,0,0,1,3}, 31] (* _Ray Chandler_, Aug 03 2015 *)
%o A050232 (Python)
%o A050232 def a(n, adict={0:0, 1:0, 2:0, 3:1, 4:3}):
%o A050232     if n in adict:
%o A050232         return adict[n]
%o A050232     adict[n]=3*a(n-1) - a(n-2) - a(n-3) - a(n-4) - 2*a(n-5)
%o A050232     return adict[n] # _David Nacin_, Mar 07 2012
%o A050232 (PARI) a(n)=([0,1,0,0,0; 0,0,1,0,0; 0,0,0,1,0; 0,0,0,0,1; -2,-1,-1,-1,3]^(n-1)*[0;0;0;1;3])[1,1] \\ _Charles R Greathouse IV_, Feb 09 2017
%o A050232 (Magma)
%o A050232 R<x>:= PowerSeriesRing(Integers(), 50);
%o A050232 [0,0,0] cat Coefficients(R!( x^4/((1-2*x)*(1-x-x^2-x^3-x^4)) )); // _G. C. Greubel_, Jun 01 2025
%o A050232 (SageMath)
%o A050232 def A050232_list(prec):
%o A050232     P.<x>= PowerSeriesRing(QQ, prec)
%o A050232     return P( x^4/((1-2*x)*(1-x-x^2-x^3-x^4)) ).list()
%o A050232 a=A050232_list(41); a[1:] # _G. C. Greubel_, Jun 01 2025
%Y A050232 Cf. A000078, A008466, A050231, A050233.
%Y A050232 Column 5 of A109435.
%K A050232 nonn,nice,easy
%O A050232 1,5
%A A050232 _Eric W. Weisstein_