This site is supported by donations to The OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A171861 Expansion of x*(1+x+x^2) / ( (x-1)*(x^3+x^2-1) ). 21
 1, 2, 4, 6, 9, 13, 18, 25, 34, 46, 62, 83, 111, 148, 197, 262, 348, 462, 613, 813, 1078, 1429, 1894, 2510, 3326, 4407, 5839, 7736, 10249, 13578, 17988, 23830, 31569, 41821, 55402, 73393, 97226, 128798, 170622, 226027, 299423, 396652, 525453, 696078, 922108 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,2 COMMENTS Number of wins in Penney's game if the two players start HHT and TTT and HHT beats TTT. HHT beats TTT 70% of the time. - Geoffrey Critzer, Mar 01 2014 LINKS G. C. Greubel, Table of n, a(n) for n = 1..1000 Wikipedia, Penney's game Index entries for linear recurrences with constant coefficients, signature (1,1,0,-1). FORMULA a(n) = a(n-1) +a(n-2) -a(n-4) = A000931(n+10)-3 = A134816(n+6)-3 = A078027(n+12)-3. a(n) = A164315(n-1). - Alois P. Heinz, Oct 12 2017 EXAMPLE a(n) enumerates length n+2 sequences on {H,T} that end in HHT but do not contain the contiguous subsequence TTT. a(3)=4 because we have: TTHHT, THHHT, HTHHT, HHHHT. a(4)=6 because we have: TTHHHT, THTHHT, THHHHT, HTTHHT, HTHHHT, HHHHHT. - Geoffrey Critzer, Mar 01 2014 MAPLE A171861 := proc(n) option remember; if n <=4 then op(n, [1, 2, 4, 6]); else procname(n-1)+procname(n-2)-procname(n-4) ; end if; end proc: MATHEMATICA nn=44; CoefficientList[Series[x(1+x+x^2)/(1-x-x^2+x^4), {x, 0, nn}], x] (* Geoffrey Critzer, Mar 01 2014 *) PROG (PARI) a(n)=([0, 1, 0, 0; 0, 0, 1, 0; 0, 0, 0, 1; -1, 0, 1, 1]^(n-1)*[1; 2; 4; 6])[1, 1] \\ Charles R Greathouse IV, Oct 03 2016 CROSSREFS Related sequences are A000045 (HHH beats HHT, HTT beats TTH), A006498 (HHH beats HTH), A023434 (HHH beats HTT), A000930 (HHH beats THT, HTH beats HHT), A000931 (HHH beats TTH), A077868 (HHT beats HTH), A002620 (HHT beats HTT), A000012 (HHT beats THH), A004277 (HHT beats THT), A070550 (HTH beats HHH), A000027 (HTH beats HTT), A097333 (HTH beats THH), A040000 (HTH beats TTH), A068921 (HTH beats TTT), A054405 (HTT beats HHH), A008619 (HTT beats HHT), A038718 (HTT beats THT), A128588 (HTT beats TTT). Cf. A164315 (essentially the same sequence). Sequence in context: A177189 A026906 A164315 * A039900 A039902 A081659 Adjacent sequences:  A171858 A171859 A171860 * A171862 A171863 A171864 KEYWORD easy,nonn AUTHOR Ed Pegg Jr, Oct 16 2010 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.

Last modified October 22 22:34 EDT 2019. Contains 328335 sequences. (Running on oeis4.)