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.

Showing 1-10 of 19 results. Next

A171861 Expansion of x*(1+x+x^2) / ( (x-1)*(x^3+x^2-1) ).

Original entry on oeis.org

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
Offset: 1

Views

Author

Ed Pegg Jr, Oct 16 2010

Keywords

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

Examples

			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
		

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

Programs

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

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

A003410 Expansion of (1+x)(1+x^2)/(1-x-x^3).

Original entry on oeis.org

1, 2, 3, 5, 7, 10, 15, 22, 32, 47, 69, 101, 148, 217, 318, 466, 683, 1001, 1467, 2150, 3151, 4618, 6768, 9919, 14537, 21305, 31224, 45761, 67066, 98290, 144051, 211117, 309407, 453458, 664575, 973982, 1427440, 2092015, 3065997, 4493437, 6585452, 9651449
Offset: 0

Views

Author

Keywords

Comments

From Emeric Deutsch, Feb 15 2010: (Start)
a(n) is the number of binary words of length n that have no pair of adjacent 1's and have no 0000 subwords. Example: a(4)=7 because we have 0101, 1010, 0010, 1001, 0100, 0001, and 1000.
a(n) = A171855(n,0). (End)
a(n) is the number of solus bitstrings of length n with no runs of 4 zeros. - Steven Finch, Mar 25 2020

References

  • R. K. Guy, personal communication.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Essentially the same as A058278 and A097333, partial sums and first differences of A058278, first and second differences of itself and A038718. Equals A038718(n+1) + 1, n>0.
Cf. A171855. - Emeric Deutsch, Feb 15 2010

Programs

  • Maple
    G:=series((1+x)*(1+x^2)/(1-x-x^3),x=0,42): 1,seq(coeff(G,x^n),n=1..38);
    A003410:=-(1+z)*(1+z**2)/(-1+z+z**3); # Simon Plouffe in his 1992 dissertation
  • Mathematica
    Join[{1}, LinearRecurrence[{1, 0, 1}, {2, 3, 5}, 80]] (* Vladimir Joseph Stephan Orlovsky, Feb 11 2012 *)
    CoefficientList[Series[((1+x)(1+x^2))/(1-x-x^3),{x,0,50}],x] (* Harvey P. Dale, Jul 07 2025 *)
  • PARI
    a(n)=([0,1,0; 0,0,1; 1,0,1]^n*[1;2;3])[1,1] \\ Charles R Greathouse IV, Mar 25 2020

Formula

a(n) = a(n-1) + a(n-3) for n>3, see also A000930. - Reinhard Zumkeller, Oct 26 2005
For n>1, a(n) = 2*A000930(n) + A000930(n-2). - Gerald McGarvey, Sep 10 2008
a(n) = A058278(n+4) = A097333(n+1) for n >= 1. - Jianing Song, Aug 11 2023

Extensions

More terms from Emeric Deutsch, Dec 11 2004

A207442 T(n,k)=Number of nXk 0..1 arrays avoiding 0 0 1 and 0 1 0 horizontally and 0 0 1 and 1 0 0 vertically.

Original entry on oeis.org

2, 4, 4, 6, 16, 6, 9, 36, 36, 9, 14, 81, 108, 81, 14, 21, 196, 323, 333, 196, 22, 31, 441, 1058, 1360, 1144, 484, 35, 46, 961, 3223, 6092, 6525, 4048, 1225, 56, 68, 2116, 9515, 25689, 41092, 32393, 14743, 3136, 90, 100, 4624, 28426, 105690, 243981, 287176
Offset: 1

Views

Author

R. H. Hardin Feb 17 2012

Keywords

Comments

Table starts
..2....4.....6......9.......14........21.........31..........46............68
..4...16....36.....81......196.......441........961........2116..........4624
..6...36...108....323.....1058......3223.......9515.......28426.........84486
..9...81...333...1360.....6092.....25689.....105690......439332.......1821924
.14..196..1144...6525....41092....243981....1414091.....8282682......48412066
.22..484..4048..32393...287176...2405923...19685415...162644898....1341574108
.35.1225.14743.165626..2078416..24609889..284247216..3316383098...38630942068
.56.3136.54250.855471.15205846.254583643.4151434555.68394049216.1125157869978

Examples

			Some solutions for n=4 k=3
..1..1..0....0..0..0....0..1..1....0..1..1....1..0..0....0..1..1....1..1..1
..0..0..0....0..1..1....1..1..1....1..1..0....0..0..0....0..0..0....1..1..1
..1..1..0....0..0..0....0..0..0....0..1..1....1..0..0....0..1..1....0..1..1
..0..0..0....0..1..1....1..1..1....1..1..0....0..0..0....0..1..1....1..1..0
		

Crossrefs

Column 1 is A001611(n+2)
Column 2 is Column 1 squared
Row 1 is A038718(n+2)
Row 2 is A207069

A207068 T(n,k)=Number of nXk 0..1 arrays avoiding 0 0 1 and 0 1 0 horizontally and 0 0 1 and 1 0 1 vertically.

Original entry on oeis.org

2, 4, 4, 6, 16, 6, 9, 36, 36, 8, 14, 81, 102, 64, 10, 21, 196, 288, 216, 100, 12, 31, 441, 896, 720, 390, 144, 14, 46, 961, 2499, 2688, 1485, 636, 196, 16, 68, 2116, 6634, 8799, 6398, 2709, 966, 256, 18, 100, 4624, 17848, 27063, 23856, 13132, 4536, 1392, 324, 20, 147
Offset: 1

Views

Author

R. H. Hardin Feb 14 2012

Keywords

Comments

Table starts
..2...4....6....9....14.....21.....31......46.......68......100.......147
..4..16...36...81...196....441....961....2116.....4624....10000.....21609
..6..36..102..288...896...2499...6634...17848....47192...122200....315315
..8..64..216..720..2688...8799..27063...84502...257584...762900...2246895
.10.100..390.1485..6398..23856..82739..291364...997288..3297100..10818024
.12.144..636.2709.13132..54684.210118..818892..3093184.11234900..40417797
.14.196..966.4536.24304.111426.468348.1992996..8204200.32364700.126207438
.16.256.1392.7128.41664.208026.947298.4356936.19360144.82226100.344542569

Examples

			Some solutions for n=4 k=3
..0..1..1....1..1..1....0..1..1....0..0..0....0..1..1....0..0..0....1..0..0
..1..1..0....1..1..0....1..0..0....1..0..0....0..1..1....0..1..1....0..0..0
..1..1..0....1..0..0....1..0..0....0..0..0....0..1..1....0..0..0....0..0..0
..1..0..0....1..0..0....1..0..0....0..0..0....0..1..1....0..0..0....0..0..0
		

Crossrefs

Column 2 is A016742
Column 3 is A086113
Row 1 is A038718(n+2)

Formula

Empirical for column k:
k=1: a(n) = 2*n
k=2: a(n) = 4*n^2
k=3: a(n) = 2*n^3 + 6*n^2 - 2*n
k=4: a(n) = (3/4)*n^4 + (15/2)*n^3 + (15/4)*n^2 - 3*n
k=5: a(n) = (7/30)*n^5 + 7*n^4 + (21/2)*n^3 - (56/15)*n
k=6: a(n) = (7/120)*n^6 + (147/40)*n^5 + (49/3)*n^4 + (91/8)*n^3 - (707/120)*n^2 - (91/20)*n
k=7: a(n) = (31/2520)*n^7 + (62/45)*n^6 + (4867/360)*n^5 + (2015/72)*n^4 + (1271/180)*n^3 - (4991/360)*n^2 - (713/140)*n

A207242 T(n,k)=Number of nXk 0..1 arrays avoiding 0 0 0 and 0 1 1 horizontally and 0 0 1 and 0 1 0 vertically.

Original entry on oeis.org

2, 4, 4, 6, 16, 6, 9, 36, 36, 9, 13, 81, 102, 81, 14, 18, 169, 283, 287, 196, 21, 25, 324, 699, 987, 882, 441, 31, 34, 625, 1526, 2884, 3866, 2491, 961, 46, 46, 1156, 3355, 7165, 13876, 13494, 6759, 2116, 68, 62, 2116, 6888, 17929, 40838, 58026, 44730, 18528
Offset: 1

Views

Author

R. H. Hardin Feb 16 2012

Keywords

Comments

Table starts
..2....4.....6......9.....13......18.......25.......34........46........62
..4...16....36.....81....169.....324......625.....1156......2116......3844
..6...36...102....283....699....1526.....3355.....6888.....13954.....27816
..9...81...287....987...2884....7165....17929....40646.....90602....196548
.14..196...882...3866..13876...40838...122197...323039....839664...2118081
.21..441..2491..13494..58026..197256...683257..2037721...5952936..16732138
.31..961..6759..44730.228110..886959..3510185.11662500..37779767.116530737
.46.2116.18528.150608.919413.4132837.18982182.71594896.262849612.914523558

Examples

			Some solutions for n=4 k=3
..0..1..0....0..1..0....1..1..1....0..0..1....1..0..0....0..0..1....0..1..0
..0..1..0....1..1..1....1..1..1....0..0..1....0..0..1....1..1..0....1..0..0
..0..1..0....1..0..1....0..1..0....0..0..1....1..0..1....1..1..0....1..1..0
..0..1..0....0..0..1....0..1..0....0..0..1....1..0..1....1..0..0....0..1..0
		

Crossrefs

Column 1 is A038718(n+2)
Column 2 is A207069
Row 1 is A171861(n+1)
Row 2 is A207025

A207269 T(n,k)=Number of nXk 0..1 arrays avoiding 0 0 0 and 0 1 1 horizontally and 0 1 1 and 1 0 1 vertically.

Original entry on oeis.org

2, 4, 4, 6, 16, 6, 9, 36, 36, 9, 13, 81, 82, 81, 14, 18, 169, 217, 193, 196, 21, 25, 324, 499, 611, 488, 441, 31, 34, 625, 1014, 1602, 1910, 1087, 961, 46, 46, 1156, 2141, 3513, 5904, 5132, 2305, 2116, 68, 62, 2116, 4188, 8327, 14184, 18055, 13067, 4932, 4624, 100, 83
Offset: 1

Views

Author

R. H. Hardin Feb 16 2012

Keywords

Comments

Table starts
..2....4....6.....9.....13.....18......25......34.......46.......62.......83
..4...16...36....81....169....324.....625....1156.....2116.....3844.....6889
..6...36...82...217....499...1014....2141....4188.....8150....15670....29517
..9...81..193...611...1602...3513....8327...17568....36988....76723...153865
.14..196..488..1910...5904..14184...38911...90670...211626...485438..1060958
.21..441.1087..5132..18055..45520..140295..349415...877101..2164569..5025447
.31..961.2305.13067..52240.135686..467686.1233127..3284096..8655283.21076355
.46.2116.4932.33937.156473.417772.1623957.4556171.12881467.36421182.93059536

Examples

			Some solutions for n=4 k=3
..1..1..1....1..1..1....1..0..0....0..0..1....1..1..1....0..1..0....1..1..1
..1..1..1....0..0..1....1..1..1....1..0..0....1..1..0....1..0..0....1..0..1
..1..0..1....0..0..1....1..0..0....0..1..0....1..0..0....0..0..1....1..0..1
..0..0..1....0..1..0....1..0..0....0..0..1....1..0..0....0..1..0....0..1..0
		

Crossrefs

Column 1 is A038718(n+2)
Column 2 is A207069
Row 1 is A171861(n+1)
Row 2 is A207025

A207426 T(n,k)=Number of nXk 0..1 arrays avoiding 0 0 0 and 0 1 0 horizontally and 0 0 1 and 0 1 0 vertically.

Original entry on oeis.org

2, 4, 4, 6, 16, 6, 9, 36, 36, 9, 15, 81, 114, 81, 14, 25, 225, 361, 351, 196, 21, 40, 625, 1425, 1521, 1162, 441, 31, 64, 1600, 5625, 8463, 6889, 3633, 961, 46, 104, 4096, 20550, 47089, 55361, 29929, 11067, 2116, 68, 169, 10816, 75076, 241087, 444889, 341329
Offset: 1

Views

Author

R. H. Hardin Feb 17 2012

Keywords

Comments

Table starts
..2....4.....6......9.......15........25.........40...........64...........104
..4...16....36.....81......225.......625.......1600.........4096.........10816
..6...36...114....361.....1425......5625......20550........75076........282494
..9...81...351...1521.....8463.....47089.....241087......1234321.......6520459
.14..196..1162...6889....55361....444889....3210938.....23174596.....174570082
.21..441..3633..29929...341329...3892729...39698733....404854641....4315250265
.31..961.11067.127449..2048823..32936121..474552171...6837470721..102807481767
.46.2116.33994.546121.12436631.283215241.5755114104.116947584576.2485504480392

Examples

			Some solutions for n=4 k=3
..0..1..1....1..1..0....0..1..1....1..1..0....1..0..0....0..1..1....1..1..1
..1..1..0....0..0..1....0..1..1....1..0..1....0..0..1....1..0..0....1..1..1
..1..1..1....0..1..1....0..1..1....1..0..1....1..0..1....1..0..1....1..1..1
..1..0..1....0..1..1....0..1..1....0..0..1....1..0..0....1..0..1....1..1..1
		

Crossrefs

Column 1 is A038718(n+2)
Column 2 is A207069
Row 1 is A006498(n+2)
Row 2 is A189145(n+2)

A207729 T(n,k)=Number of nXk 0..1 arrays avoiding 0 0 0 and 0 1 0 horizontally and 0 1 1 and 1 0 1 vertically.

Original entry on oeis.org

2, 4, 4, 6, 16, 6, 9, 36, 36, 9, 15, 81, 78, 81, 14, 25, 225, 169, 189, 196, 21, 40, 625, 611, 441, 490, 441, 31, 64, 1600, 2209, 2163, 1225, 1113, 961, 46, 104, 4096, 6016, 10609, 8575, 2809, 2449, 2116, 68, 169, 10816, 16384, 33063, 60025, 27931, 6241, 5474, 4624
Offset: 1

Views

Author

R. H. Hardin Feb 19 2012

Keywords

Comments

Table starts
..2....4....6.....9.....15......25.......40.......64........104.........169
..4...16...36....81....225.....625.....1600.....4096......10816.......28561
..6...36...78...169....611....2209.....6016....16384......51840......164025
..9...81..189...441...2163...10609....33063...103041.....418263.....1697809
.14..196..490..1225...8575...60025...211680...746496....4078944....22287841
.21..441.1113..2809..27931..277729..1029231..3814209...27996255...205492225
.31..961.2449..6241..88243.1247689..4799749.18464209..184732327..1848226081
.46.2116.5474.14161.288813.5890329.23473944.93547584.1307760792.18282014521

Examples

			Some solutions for n=4 k=3
..0..0..1....1..1..0....1..1..0....1..1..1....1..1..1....1..1..1....1..0..0
..1..1..1....1..1..1....1..0..1....0..0..1....0..1..1....1..1..1....1..1..0
..0..0..1....1..0..0....1..0..0....0..0..1....0..1..1....1..1..0....1..0..0
..0..0..1....1..0..0....1..0..0....1..1..0....1..1..1....1..0..0....1..0..0
		

Crossrefs

Column 1 is A038718(n+2)
Column 2 is A207069
Row 1 is A006498(n+2)
Row 2 is A189145(n+2)

A207123 T(n,k)=Number of nXk 0..1 arrays avoiding 0 0 1 and 0 1 0 horizontally and 0 0 1 and 0 1 1 vertically.

Original entry on oeis.org

2, 4, 4, 6, 16, 6, 9, 36, 36, 9, 14, 81, 102, 81, 12, 21, 196, 288, 289, 144, 16, 31, 441, 896, 1024, 612, 256, 20, 46, 961, 2499, 4096, 2560, 1296, 400, 25, 68, 2116, 6634, 14161, 12288, 6400, 2340, 625, 30, 100, 4624, 17848, 45796, 49861, 36864, 13200, 4225, 900
Offset: 1

Views

Author

R. H. Hardin Feb 15 2012

Keywords

Comments

Table starts
..2...4....6.....9.....14......21......31.......46........68........100
..4..16...36....81....196.....441.....961.....2116......4624......10000
..6..36..102...288....896....2499....6634....17848.....47192.....122200
..9..81..289..1024...4096...14161...45796...150544....481636....1493284
.12.144..612..2560..12288...49861..186822...712756...2628872....9322638
.16.256.1296..6400..36864..175561..762129..3374569..14348944...58201641
.20.400.2340.13200..87744..475984.2330037.11635558..55554808..251535759
.25.625.4225.27225.208849.1290496.7123561.40119556.215091556.1087086841

Examples

			Some solutions for n=4 k=3
..0..1..1....0..1..1....1..0..1....0..0..0....1..0..1....0..0..0....1..1..0
..0..0..0....0..1..1....0..0..0....0..1..1....0..1..1....0..1..1....0..0..0
..0..1..1....0..1..1....0..0..0....0..0..0....0..0..0....0..0..0....0..0..0
..0..0..0....0..1..1....0..0..0....0..0..0....0..0..0....0..1..1....0..0..0
		

Crossrefs

Column 1 is A002620(n+2)
Column 2 is A030179(n+2)
Row 1 is A038718(n+2)
Row 2 is A207069
Row 3 is A207070

A207564 T(n,k)=Number of nXk 0..1 arrays avoiding 0 0 1 and 0 1 0 horizontally and 0 1 1 and 1 1 0 vertically.

Original entry on oeis.org

2, 4, 4, 6, 16, 6, 9, 36, 36, 9, 14, 81, 92, 81, 14, 21, 196, 241, 221, 196, 22, 31, 441, 720, 636, 618, 484, 35, 46, 961, 1889, 2234, 2135, 1690, 1225, 56, 68, 2116, 4719, 6315, 9568, 6709, 4861, 3136, 90, 100, 4624, 12102, 16812, 32823, 36426, 23276, 13900
Offset: 1

Views

Author

R. H. Hardin Feb 18 2012

Keywords

Comments

Table starts
..2....4.....6.....9.....14......21.......31........46........68........100
..4...16....36....81....196.....441......961......2116......4624......10000
..6...36....92...241....720....1889.....4719.....12102.....30414......74588
..9...81...221...636...2234....6315....16812.....47596....129150.....337186
.14..196...618..2135...9568...32823...106833....378104...1270366....4115246
.22..484..1690..6709..36426..138017...493471...1980774...7259428...25276248
.35.1225..4861.23276.160652..738515..3275898..16648464..77299468..346860730
.56.3136.13900.78733.666212.3451393.17232331.100565794.513390118.2498101416

Examples

			Some solutions for n=4 k=3
..1..0..1....1..0..1....1..1..0....1..0..0....0..1..1....1..1..1....0..0..0
..1..0..1....0..1..1....0..0..0....0..0..0....1..1..1....1..1..1....1..1..1
..1..0..1....1..0..1....1..0..1....1..0..1....0..1..1....1..1..1....0..0..0
..1..1..1....0..1..1....0..0..0....0..0..0....1..1..1....1..1..1....0..0..0
		

Crossrefs

Column 1 is A001611(n+2)
Column 2 is A207436
Row 1 is A038718(n+2)
Row 2 is A207069
Row 3 is A207414
Showing 1-10 of 19 results. Next