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.

A238644 Number of binary words on {H,T} that end in THTH but do not contain the contiguous subsequence HTHH.

This page as a plain text file.
%I A238644 #22 Feb 16 2025 08:33:21
%S A238644 0,0,0,0,1,2,3,6,11,19,34,62,112,202,365,659,1189,2146,3874,6993,
%T A238644 12623,22786,41131,74245,134019,241917,436683,788254,1422873,2568420,
%U A238644 4636240,8368850,15106563,27268770,49222700,88851613,160385536,289511009,522594658,943332613,1702804277
%N A238644 Number of binary words on {H,T} that end in THTH but do not contain the contiguous subsequence HTHH.
%C A238644 In the Penney game THTH beats HTHH 9 times out of 14 yet the expected wait time for THTH is 20 while that for HTHH is only 18.
%H A238644 Penney Ante, <a href="http://bact.mathcircles.org/files/2009/files/Summer2010/PenneyAnte.pdf">Counterintuitive Probabilities in Coin Tossing</a>, Bay Area Circle for Teachers Summer Workshop. [broken link]
%H A238644 Raymond S. Nickerson, <a href="https://www.semanticscholar.org/paper/Penney-Ante%3A-Counterintuitive-Probabilities-in-Coin-Nickerson/d93bad9355acb800b0ffcf4ea85e46b43145a640">Penney Ante: Counterintuitive Probabilities in Coin Tossing</a>, 2008.
%H A238644 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/CoinTossing.html">Coin Tossing</a>
%H A238644 Wikipedia, <a href="http://en.wikipedia.org/wiki/Penney&#39;s_game">Penney's game</a>
%H A238644 <a href="/index/Rec#order_06">Index entries for linear recurrences with constant coefficients</a>, signature (2,-1,1,0,0,1).
%F A238644 G.f.: G(x) = (x^4 + x^7)/(1 - 2x + x^2 - x^3 - x^6).  We note G(1/2) = 9/14.
%e A238644 a(7)=6 because we have: TTTTHTH, THTTHTH, THHTHTH, HTTTHTH, HHTTHTH, HHHTHTH.
%t A238644 nn=40;CoefficientList[Series[(x^4+x^7)/(1-2x+x^2-x^3-x^6),{x,0,nn}],x]
%t A238644 LinearRecurrence[{2,-1,1,0,0,1},{0,0,0,0,1,2,3,6},50]
%Y A238644 Cf. A171861.
%K A238644 nonn
%O A238644 0,6
%A A238644 _Geoffrey Critzer_, Mar 01 2014