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.

Previous Showing 31-40 of 169 results. Next

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

Original entry on oeis.org

2, 4, 4, 7, 16, 7, 13, 49, 49, 12, 24, 169, 211, 144, 21, 44, 576, 1153, 889, 441, 37, 81, 1936, 6139, 7675, 3967, 1369, 65, 149, 6561, 31529, 63866, 55063, 17737, 4225, 114, 274, 22201, 165783, 502864, 728935, 397221, 78799, 12996, 200, 504, 75076, 867545
Offset: 1

Views

Author

R. H. Hardin Feb 13 2012

Keywords

Comments

Table starts
...2.....4......7.......13.........24..........44............81.............149
...4....16.....49......169........576........1936..........6561...........22201
...7....49....211.....1153.......6139.......31529........165783..........867545
..12...144....889.....7675......63866......502864.......4108471........33311703
..21...441...3967....55063.....728935.....8942469.....115505069......1476136671
..37..1369..17737...397221....8373905...159327093....3254925997.....65503023421
..65..4225..78799..2841311...95207761..2805723059...90497940567...2863087460903
.114.12996.350017.20294131.1080443638.49382253588.2513905109615.125050630010443

Examples

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

Crossrefs

Column 1 is A005251(n+3)
Column 2 is A188501
Row 1 is A000073(n+3)
Row 2 is A085697(n+1)

A335464 Number of compositions of n with a run of length > 2.

Original entry on oeis.org

0, 0, 0, 1, 1, 3, 8, 18, 39, 86, 188, 406, 865, 1836, 3874, 8135, 17003, 35413, 73516, 152171, 314151, 647051, 1329936, 2728341, 5587493, 11424941, 23327502, 47567628, 96879029, 197090007, 400546603, 813258276, 1649761070, 3343936929, 6772740076, 13707639491
Offset: 0

Views

Author

Gus Wiseman, Jul 06 2020

Keywords

Comments

A composition of n is a finite sequence of positive integers summing to n.
Also compositions contiguously matching the pattern (1,1,1).

Examples

			The a(3) = 1 through a(7) = 18 compositions:
  (111)  (1111)  (1112)   (222)     (1114)
                 (2111)   (1113)    (1222)
                 (11111)  (3111)    (2221)
                          (11112)   (4111)
                          (11121)   (11113)
                          (12111)   (11122)
                          (21111)   (11131)
                          (111111)  (13111)
                                    (21112)
                                    (22111)
                                    (31111)
                                    (111112)
                                    (111121)
                                    (111211)
                                    (112111)
                                    (121111)
                                    (211111)
                                    (1111111)
		

Crossrefs

Compositions contiguously avoiding (1,1) are A003242.
Compositions with some part > 2 are A008466.
Compositions by number of adjacent equal parts are A106356.
Compositions where each part is adjacent to an equal part are A114901.
Compositions contiguously avoiding (1,1,1) are A128695.
Compositions with adjacent parts coprime are A167606.
Compositions contiguously matching (1,1) are A261983.
Compositions with all equal parts contiguous are A274174.
Patterns contiguously matched by compositions are A335457.

Programs

  • Maple
    b:= proc(n, t) option remember; `if`(n=0, 1, add(`if`(abs(t)<>j,
           b(n-j, j), `if`(t=-j, 0, b(n-j, -j))), j=1..n))
        end:
    a:= n-> ceil(2^(n-1))-b(n, 0):
    seq(a(n), n=0..40);  # Alois P. Heinz, Jul 06 2020
  • Mathematica
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],MatchQ[#,{_,x_,x_,x_,_}]&]],{n,0,10}]
    (* Second program: *)
    b[n_, t_] := b[n, t] = If[n == 0, 1, Sum[If[Abs[t] != j,
         b[n - j, j], If[t == -j, 0, b[n - j, -j]]], {j, 1, n}]];
    a[n_] := Ceiling[2^(n-1)] - b[n, 0];
    a /@ Range[0, 40] (* Jean-François Alcover, May 21 2021, after Alois P. Heinz *)

Formula

a(n) = A011782(n) - A128695(n). - Alois P. Heinz, Jul 06 2020

Extensions

a(23)-a(35) from Alois P. Heinz, Jul 06 2020

A049864 a(n) = Sum_{k=0,1,2,...,n-4,n-2,n-1} a(k); a(n-3) is not a summand, with a(0)=a(1)=a(2)=1.

Original entry on oeis.org

1, 1, 1, 2, 4, 8, 15, 28, 52, 97, 181, 338, 631, 1178, 2199, 4105, 7663, 14305, 26704, 49850, 93058, 173717, 324288, 605368, 1130077, 2109583, 3938086, 7351463, 13723420, 25618337, 47823297, 89274637, 166654357, 311103754, 580756168, 1084132616, 2023815835
Offset: 0

Views

Author

Keywords

Comments

Number of binary sequences of length n-2 with no subsequence 0110. E.g., a(7)=28 because among the 32 (=2^5) binary sequences of length 5 only 01100,01101,00110 and 10110 contain the subsequence 0110. - Emeric Deutsch, May 04 2006
This is a_3(n) in the Doroslovacki reference. - Max Alekseyev, Jun 26 2007
Column 0 of A118890. - Emeric Deutsch, May 04 2006

Crossrefs

Programs

  • Maple
    (With a different offset:) a[0]:=1:a[1]:=2:a[2]:=4:a[3]:=8: for n from 4 to 35 do a[n]:=2*a[n-1]-a[n-3]+a[n-4] od: seq(a[n],n=0..35); # Emeric Deutsch, May 04 2006
  • Mathematica
    LinearRecurrence[{2,0,-1,1},{1,1,1,2},40] (* Harvey P. Dale, Sep 24 2013 *)

Formula

a(n) = 2*a(n-1) - a(n-3) + a(n-4).
G.f.: (1+z)*(1-z)^2/(1 - 2z + z^3 - z^4). - Emeric Deutsch, May 04 2006

Extensions

Edited by N. J. A. Sloane, Nov 16 2007, at the suggestion of Max Alekseyev

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

Original entry on oeis.org

2, 4, 4, 7, 16, 7, 13, 49, 49, 12, 24, 169, 241, 144, 21, 44, 576, 1393, 1171, 441, 37, 81, 1936, 7915, 11227, 5917, 1369, 65, 149, 6561, 44065, 105836, 95299, 30067, 4225, 114, 274, 22201, 248525, 981850, 1507355, 816667, 151981, 12996, 200, 504, 75076
Offset: 1

Views

Author

R. H. Hardin Feb 15 2012

Keywords

Comments

Table starts
...2.....4......7.......13.........24...........44.............81
...4....16.....49......169........576.........1936...........6561
...7....49....241.....1393.......7915........44065.........248525
..12...144...1171....11227.....105836.......981850........9196215
..21...441...5917....95299....1507355.....23471595......368714705
..37..1369..30067...816667...21722593....567046841....14960137403
..65..4225.151981..6951227..310484943..13575513917...600838995529
.114.12996.767377.59040685.4425513760.324280404464.24069606968809

Examples

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

Crossrefs

Column 1 is A005251(n+3)
Column 2 is A188501
Row 1 is A000073(n+3)
Row 2 is A085697(n+1)
Row 3 is A207089

A219421 T(n,k)=Unchanging value maps: number of nXk binary arrays indicating the locations of corresponding elements unequal to no horizontal or antidiagonal neighbor in a random 0..2 nXk array.

Original entry on oeis.org

1, 2, 1, 4, 7, 1, 7, 20, 21, 1, 12, 57, 93, 65, 1, 21, 160, 453, 436, 200, 1, 37, 454, 2121, 3617, 2043, 616, 1, 65, 1292, 9926, 28154, 28888, 9573, 1897, 1, 114, 3676, 46776, 218838, 372560, 230726, 44857, 5842, 1, 200, 10452, 220655, 1709703, 4775307
Offset: 1

Views

Author

R. H. Hardin Nov 19 2012

Keywords

Comments

Table starts
.1......2.........4...........7.............12................21
.1......7........20..........57............160...............454
.1.....21........93.........453...........2121..............9926
.1.....65.......436........3617..........28154............218838
.1....200......2043.......28888.........372560...........4775307
.1....616......9573......230726........4934366.........104434119
.1...1897.....44857.....1842766.......65352789........2284814260
.1...5842....210190....14717828......865523957.......49979133672
.1..17991....984904...117548611....11462977378.....1093274545336
.1..55405...4615043...938839259...151815415029....23915155162485
.1.170625..21625074..7498337380..2010639231109...523138192294728
.1.525456.101330329.59887849061.26628853182336.11443519356879492

Examples

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

Crossrefs

Column 2 is A218836
Column 3 is A218837
Column 4 is A218838
Row 1 is A005251(n+2)

A219441 T(n,k)=Unmatched value maps: number of nXk binary arrays indicating the locations of corresponding elements not equal to any horizontal, diagonal or antidiagonal neighbor in a random 0..1 nXk array.

Original entry on oeis.org

1, 2, 1, 4, 6, 1, 7, 18, 18, 1, 12, 39, 78, 47, 1, 21, 96, 281, 329, 134, 1, 37, 225, 1072, 1750, 1396, 373, 1, 65, 543, 4033, 10157, 11283, 5925, 1035, 1, 114, 1293, 15255, 57249, 98584, 72272, 25147, 2889, 1, 200, 3096, 57963, 326938, 844553, 952625
Offset: 1

Views

Author

R. H. Hardin Nov 20 2012

Keywords

Comments

Table starts
.1......2........4..........7...........12............21.............37
.1......6.......18.........39...........96...........225............543
.1.....18.......78........281.........1072..........4033..........15255
.1.....47......329.......1750........10157.........57249.........326938
.1....134.....1396......11283........98584........844553........7285283
.1....373.....5925......72272.......952625......12323337......160436482
.1...1035....25147.....465400......9230353.....180983751.....3553813654
.1...2889...106731....2995163.....89418051....2656615237....78682793897
.1...8050...452984...19264275....865738604...38958452805..1739719764661
.1..22420..1922547..123892153...8382034095..571246999054.38456568548417
.1..62477..8159665..796864416..81160468697.8377493560653
.1.174072.34631193.5125652937.785871654803

Examples

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

Crossrefs

Column 2 is A218759
Row 1 is A005251(n+2)
Row 2 is A219143
Row 3 is A219144

A220328 T(n,k)=Equals two maps: number of nXk binary arrays indicating the locations of corresponding elements equal to exactly two of their horizontal and antidiagonal neighbors in a random 0..1 nXk array.

Original entry on oeis.org

1, 1, 1, 2, 4, 1, 4, 16, 12, 1, 7, 48, 92, 37, 1, 12, 174, 572, 508, 114, 1, 21, 658, 4062, 6657, 2788, 351, 1, 37, 2482, 29467, 92093, 76627, 15316, 1081, 1, 65, 9229, 213225, 1335202, 2065264, 876714, 84196, 3329, 1, 114, 33982, 1540686, 18836493, 59893608
Offset: 1

Views

Author

R. H. Hardin Dec 10 2012

Keywords

Comments

Table starts
.1.....1.......2.........4..........7.........12.........21........37
.1.....4......16........48........174........658.......2482......9229
.1....12......92.......572.......4062......29467.....213225...1540686
.1....37.....508......6657......92093....1335202...18836493.265346645
.1...114....2788.....76627....2065264...59893608.1653121774
.1...351...15316....876714...46094354.2680626797
.1..1081...84196..10004541.1026529800
.1..3329..462940.114058230
.1.10252.2545492
.1.31572
.1

Examples

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

Crossrefs

Column 2 is A099098
Row 1 is A005251(n+1)

A275183 T(n,k)=Number of nXk 0..2 arrays with no element equal to any value at offset (-2,-1) (-1,0) or (-1,1) and new values introduced in order 0..2.

Original entry on oeis.org

1, 2, 1, 5, 4, 2, 14, 16, 7, 4, 41, 64, 25, 12, 8, 122, 256, 89, 41, 21, 16, 365, 1024, 317, 141, 85, 37, 32, 1094, 4096, 1129, 482, 353, 181, 65, 64, 3281, 16384, 4021, 1651, 1465, 914, 389, 114, 128, 9842, 65536, 14321, 5653, 6081, 4603, 2386, 834, 200, 256, 29525
Offset: 1

Views

Author

R. H. Hardin, Jul 19 2016

Keywords

Comments

Table starts
...1...2....5....14.....41.....122......365......1094.......3281........9842
...1...4...16....64....256....1024.....4096.....16384......65536......262144
...2...7...25....89....317....1129.....4021.....14321......51005......181657
...4..12...41...141....482....1651.....5653.....19356......66277......226937
...8..21...85...353...1465....6081....25241....104769.....434873.....1805057
..16..37..181...914...4603...23313...117916....596625....3018913....15274618
..32..65..389..2386..14643...90793...561044...3472521...21488129...132962186
..64.114..834..6228..46799..355258..2688402..20397794..154665843..1172975241
.128.200.1781.16249.149772.1392050.12931103.120384453.1120217646.10428404709
.256.351.3799.42451.479722.5466938.62408531.713359905.8156812360.93298660085

Examples

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

Crossrefs

Column 1 is A000079(n-2).
Column 2 is A005251(n+3).
Row 1 is A007051(n-1).
Row 2 is A000302(n-1).
Row 3 is A007484(n-1).

Formula

Empirical for column k:
k=1: a(n) = 2*a(n-1) for n>2
k=2: a(n) = 2*a(n-1) -a(n-2) +a(n-3)
k=3: a(n) = 4*a(n-1) -6*a(n-2) +5*a(n-3) -a(n-4) -a(n-5) for n>8
k=4: [order 9] for n>12
k=5: [order 16] for n>21
k=6: [order 34] for n>39
k=7: [order 67] for n>73
Empirical for row n:
n=1: a(n) = 4*a(n-1) -3*a(n-2)
n=2: a(n) = 4*a(n-1)
n=3: a(n) = 3*a(n-1) +2*a(n-2)
n=4: a(n) = 2*a(n-1) +4*a(n-2) +3*a(n-3) for n>4
n=5: a(n) = 2*a(n-1) +7*a(n-2) +8*a(n-3) for n>5
n=6: a(n) = 2*a(n-1) +12*a(n-2) +19*a(n-3) -4*a(n-4) -12*a(n-5) -16*a(n-6) for n>7
n=7: [order 9] for n>10

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

Original entry on oeis.org

1, 1, 1, 3, 7, 13, 25, 51, 103, 205, 409, 819, 1639, 3277, 6553, 13107, 26215, 52429, 104857, 209715, 419431, 838861, 1677721, 3355443, 6710887, 13421773, 26843545, 53687091, 107374183, 214748365, 429496729, 858993459, 1717986919, 3435973837, 6871947673
Offset: 0

Views

Author

Mogens Esrom Larsen (mel(AT)math.ku.dk)

Keywords

Comments

Equals INVERT transform of (1, 0, 2, 2, 2, ...). - Gary W. Adamson, Apr 28 2009
a(n) is the number of compositions (ordered partitions) of n into parts 1 (one kind), and parts >= 3 of three kinds (no parts 2). - Joerg Arndt, Apr 22 2025

References

  • Kenneth Edwards, Michael A. Allen, A new combinatorial interpretation of the Fibonacci numbers squared, Part II, Fib. Q., 58:2 (2020), 169-177.
  • M. E. Larsen, Summa Summarum, A. K. Peters, Wellesley, MA, 2007; see p. 38.

Crossrefs

Programs

  • Magma
    I:=[1, 1, 1]; [n le 3 select I[n] else 2*Self(n-1)-Self(n-2)+2*Self(n-3): n in [1..40]]; // Vincenzo Librandi, Jun 17 2012
    
  • Maple
    U:=n->(1/5)*(2^(n+1)+3*cos(n*Pi/2)+sin(n*Pi/2)); [seq(U(n),n=0..50)];
  • Mathematica
    CoefficientList[Series[(1-x)/(1-2*x+x^2-2*x^3),{x,0,40}],x] (* Vincenzo Librandi, Jun 17 2012 *)
    LinearRecurrence[{2,-1,2},{1,1,1},40] (* Harvey P. Dale, Jul 26 2016 *)
  • PARI
    a(n)=2^(n+1)\5+(n%4<2) \\ M. F. Hasler, Feb 22 2018
    
  • Python
    def A007909(n): return (2<Chai Wah Wu, Apr 22 2025

Formula

G.f.: (1-x)/(1-2*x+x^2-2*x^3).
a(n) = (1/5)*(2^(n+1)+3*cos(n*Pi/2)+sin(n*Pi/2)).
a(n) = Sum_{k=0..floor((n-1)/3)} binomial(n-k-1, 2*k)*2^k. - Paul Barry, Sep 16 2004
a(n) = (1/5)*(2^(n+1) + (-1)^[(n+1)/2] + 2*(-1)^[n/2]). - Ralf Stephan, Jun 09 2005
a(n) = 2*a(n-1)-a(n-2)+2*a(n-3). Sequence is identical to its half second differences from the second term; a(n)+a(n+2)=2^(n+1). - Paul Curtz, Dec 17 2007
a(n+1) = (2^n)*Sum_{k=1..n} (-1)^floor(k/2)/2^k. - Yalcin Aktar, Jul 20 2008

Extensions

Offset corrected by M. F. Hasler, Feb 22 2018

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

Original entry on oeis.org

2, 4, 4, 7, 16, 7, 12, 49, 49, 12, 21, 144, 240, 144, 20, 37, 441, 1103, 1112, 400, 33, 65, 1369, 5357, 7878, 4792, 1089, 54, 114, 4225, 26564, 59812, 51800, 20129, 2916, 88, 200, 12996, 130828, 467146, 607043, 330951, 82807, 7744, 143, 351, 40000, 641137
Offset: 1

Views

Author

R. H. Hardin Feb 13 2012

Keywords

Comments

Table starts
..2....4......7.......12........21..........37............65............114
..4...16.....49......144.......441........1369..........4225..........12996
..7...49....240.....1103......5357.......26564........130828.........641137
.12..144...1112.....7878.....59812......467146.......3619683.......27856426
.20..400...4792....51800....607043.....7354488......88342972.....1052865902
.33.1089..20129...330951...5963040...111550389....2067672443....37988878275
.54.2916..82807..2070564..57268342..1648854501...47015346159..1328156697136
.88.7744.337209.12830802.544455870.24096775331.1055711535814.45805591252624

Examples

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

Crossrefs

Column 1 is A000071(n+3)
Column 2 is A188516
Column 3 is A188757
Row 1 is A005251(n+3)
Row 2 is A188501
Row 3 is A188768
Previous Showing 31-40 of 169 results. Next