login
This site is supported by donations to The OEIS Foundation.

 

Logo

Invitation: celebrating 50 years of OEIS, 250000 sequences, and Sloane's 75th, there will be a conference at DIMACS, Rutgers, Oct 9-10 2014.

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 (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

Table of n, a(n) for n=1..42.

Wikipedia, Penney's game

FORMULA

a(n)= +a(n-1) +a(n-2) -a(n-4) = A000931(n+10)-3 = A134816(n+6)-3 = A078027(n+12)-3 .

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 *)

CROSSREFS

Related sequences are A000045 (HHH beats HHT), A006498 (HHH beats HTH), A023434 (HHH beats HTT), A000930 (HHH beats THT), A000931 (HHH beats TTH), A077868 (HHT beats HTH), A002620 (HHT beats HTT), A000012 (HHT beats THH), A004277 (HHT beats THT), A070550 (HTH beats HHH), A000930 (HTH beats HHT), 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), A000045 (HTT beats TTH), A128588 (HTT beats TTT).

Sequence in context: A088575 A177189 A026906 * 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 | Transforms | Superseeker | Recent | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified August 1 12:00 EDT 2014. Contains 245118 sequences.