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.

User: David Neil McGrath

David Neil McGrath's wiki page.

David Neil McGrath has authored 18 sequences. Here are the ten most recent ones:

A260710 Expansion of 1/(1 - x - x^2 - x^4 + x^5 + x^7).

Original entry on oeis.org

1, 1, 2, 3, 6, 9, 16, 25, 43, 69, 116, 188, 313, 511, 846, 1386, 2288, 3756, 6191, 10174, 16756, 27552, 45357, 74604, 122787, 201996, 332414, 546901, 899946, 1480699, 2436459, 4008858, 6596366, 10853563, 17858788, 29384804, 48350401, 79555943, 130902711
Offset: 0

Author

David Neil McGrath, Jul 30 2015

Keywords

Comments

This sequence counts partially ordered partitions of (n) into parts 1,2,3,4 where the order (position) of adjacent pairs of numbers (1,2);(2,3);(3,4) is unimportant. Alternatively the order of the complementary pairs (1,4);(1,3);(2,4) is important.

Examples

			There are 25 partially ordered partitions of 7, i.e., a(7) = 25. These are (43=34),(421=412),(124=214),(241),(142),(4111),(1411),(1141),(1114),(331),(313),(133),(1132=1123),(2131=1231),(1312=1321),(2311=3211),(31111),(13111),(11311),(11131),(11113),(2221=four),(22111=ten),(211111=six),(1111111).
		

Programs

  • Magma
    I:=[1,1,2,3,6,9,16]; [n le 7 select I[n] else Self(n-1)+Self(n-2)+Self(n-4)-Self(n-5)-Self(n-7): n in [1..40]]; // Vincenzo Librandi, Aug 04 2015
    
  • Mathematica
    LinearRecurrence[{1, 1, 0, 1, -1, 0, -1}, {1, 1, 2, 3, 6, 9, 16}, 50] (* Vincenzo Librandi, Aug 04 2015 *)
  • PARI
    Vec(1/(1 - x - x^2 - x^4 + x^5 + x^7) + O(x^50)) \\ Michel Marcus, Aug 06 2015

Formula

G.f: 1/(1 - x - x^2 - x^4 + x^5 + x^7).
a(n) = a(n-1) + a(n-2) + a(n-4) - a(n-5) - a(n-7).
Construct the matrix array T(n,j) = [A^*j]*[S^*(j-1)] where A=(1,1,0,1,-1,0,-1) and S=(0,1,0,...) (A063524). [* is convolution operation] Define S^*0=I with I=(1,0,...). a(n) = Sum_{j=1..n} T(n,j).

A260917 Expansion of 1/(1 - x - x^2 - x^3 + x^6 + x^7).

Original entry on oeis.org

1, 1, 2, 4, 7, 13, 23, 41, 74, 132, 236, 422, 754, 1348, 2409, 4305, 7694, 13750, 24573, 43915, 78481, 140255, 250652, 447944, 800528, 1430636, 2556712, 4569140, 8165581, 14592837, 26079086, 46606340, 83290915, 148850489, 266013023, 475396009, 849587598, 1518311204, 2713397556, 4849154954, 8666000202
Offset: 0

Author

David Neil McGrath, Aug 04 2015

Keywords

Comments

This sequence counts the partially ordered partitions of (n) into parts 1,2,3,4 where the order (position) of adjacent pairs (1,3);(3,4);(2,4) is unimportant. Alternatively the order of complementary pairs (1,2);(1,4);(2,3) is important.

Examples

			a(7)=41; the corresponding partitions (cf. comment) are: (43), (241=421), (124=142), (412), (214), (4111), (1411), (1141), (1114), (331=313=133), (322), (232), (223), (3112=1312=1132), (2113=2131=2311), (1213=1231), (3121=1321), (3211), (1123), (31111=13111=11311=11131=11113), (2221)=four, (22111)=ten, (211111)=six, (1111111).
		

Crossrefs

Programs

  • Magma
    I:=[1,1,2,4,7,13,23]; [n le 7 select I[n] else Self(n-1) + Self(n-2) + Self(n-3) - Self(n-6) - Self(n-7): n in [1..45]]; // Vincenzo Librandi, Aug 07 2015
  • Mathematica
    CoefficientList[Series[1/(1 - x - x^2 - x^3 + x^6 + x^7), {x, 0, 50}], x] (* Vincenzo Librandi, Aug 07 2015 *)
    LinearRecurrence[{1,1,1,0,0,-1,-1},{1,1,2,4,7,13,23},50] (* Harvey P. Dale, Aug 21 2021 *)
  • PARI
    Vec(1/(1 - x - x^2 - x^3 + x^6 + x^7) + O(x^50)) \\ Michel Marcus, Aug 06 2015
    

Formula

a(n) = a(n-1) + a(n-2) + a(n-3) - a(n-6) - a(n-7).
G.f.: 1/((1 - x)*(1 - x^2 - 2*x^3 - 2*x^4 - 2*x^5 - x^6)).

A258000 Expansion of 1/(1-x-x^2-x^3-x^4+x^5+x^6+x^7-x^9).

Original entry on oeis.org

1, 1, 2, 4, 8, 14, 26, 48, 89, 164, 302, 557, 1028, 1896, 3496, 6448, 11893, 21935, 40455, 74613, 137613, 253807, 468108, 863354, 1592327, 2936808, 5416499, 9989915, 18424893, 33981939, 62674564, 115593785, 213195313, 393206621, 725210344, 1337541166
Offset: 0

Author

David Neil McGrath, May 16 2015

Keywords

Comments

This sequence counts partially ordered partitions of (n) into parts (1,2,3,4) in which only the position (order) of the 1's are important. The 1's behave as placeholders for unordered 2's,3's and 4's.

Examples

			a(6)=26; these are (42,24=one),(411),(141),(114),(33),(321,231=one),(123,132=one),(312),(213),(3111=four),(222),(2211),(1122),(2112),(1221),(1212),(2121),(21111=five),(111111).
		

Programs

  • Magma
    I:=[1,1,2,4,8,14,26,48,89]; [n le 9 select I[n] else Self(n-1)+Self(n-2)+Self(n-3)+Self(n-4)-Self(n-5)-Self(n-6)-Self(n-7)+Self(n-9): n in [1..40]]; // Vincenzo Librandi, May 19 2015
  • Mathematica
    LinearRecurrence[{1, 1, 1, 1, -1, -1, -1, 0, 1}, {1, 1, 2, 4, 8, 14, 26, 48, 89}, 50] (* Vincenzo Librandi, May 19 2015 *)
  • PARI
    Vec(1/(-x^9+x^7+x^6+x^5-x^4-x^3-x^2-x+1) + O(x^100)) \\ Colin Barker, May 17 2015
    

Formula

a(n) = a(n-1) + a(n-2) + a(n-3) + a(n-4) - a(n-5) - a(n-6) - a(n-7) + a(n-9)
G.f.: 1/(1-x-x^2-x^3-x^4+x^5+x^6+x^7-x^9).

Extensions

More terms from Vincenzo Librandi, May 19 2015

A257932 Expansion of 1/(1-x-x^2-x^3+x^5+x^7).

Original entry on oeis.org

1, 1, 2, 4, 7, 12, 22, 38, 67, 118, 207, 363, 638, 1119, 1964, 3447, 6049, 10615, 18629, 32691, 57369, 100676, 176674, 310041, 544085, 954802, 1675561, 2940405, 5160051, 9055258, 15890871, 27886534, 48937456, 85879249, 150707576, 264473359, 464118392, 814471000, 1429296968
Offset: 0

Author

David Neil McGrath, May 13 2015

Keywords

Comments

This sequence counts partially ordered partitions of (n) into parts (1,2,3,4) where the position (order) of 3's is unimportant.

Examples

			a(6)=22; these are (42),(24),(411),(141),(114),(33),(321=231=213),(312=132=123),(3111=1311=1131=1113),(222),(2211),(1122),(1221),(2112),(2121),(1212),(21111),(12111),(11211),(11121),(11112),(111111).
		

Programs

  • Maple
    f:= gfun:-rectoproc({a(n) = a(n-1) + a(n-2) + a(n-3) - a(n-5) - a(n-7), seq(a(i)=[1, 1, 2, 4, 7, 12,22][i+1],i=0..6)},a(n),remember):
    map(f, [$0..50]); # Robert Israel, Apr 26 2017
  • Mathematica
    LinearRecurrence[{1, 1, 1, 0, -1, 0, -1}, {1, 1, 2, 4, 7, 12, 22}, 39] (* Robert P. P. McKone, Feb 08 2021 *)
  • PARI
    Vec(1/((x-1)*(x+1)*(x^2+x+1)*(x^3-x^2+2*x-1)) + O(x^100)) \\ Colin Barker, May 17 2015

Formula

a(n) = a(n-1) + a(n-2) + a(n-3) - a(n-5) - a(n-7).
G.f.: 1 / ((x-1)*(x+1)*(x^2+x+1)*(x^3-x^2+2*x-1)). - Colin Barker, May 17 2015

A257934 Expansion of 1/(1-x-x^2-x^3-x^4+x^5+x^6+x^7).

Original entry on oeis.org

1, 1, 2, 4, 8, 14, 26, 48, 89, 163, 300, 552, 1016, 1868, 3436, 6320, 11625, 21381, 39326, 72332, 133040, 244698, 450070, 827808, 1522577, 2800455, 5150840, 9473872, 17425168, 32049880, 58948920, 108423968, 199422769, 366795657, 674642394, 1240860820, 2282298872, 4197802086, 7720961778
Offset: 0

Author

David Neil McGrath, May 13 2015

Keywords

Comments

This sequence counts partially ordered partitions of (n) into parts (1,2,3,4) in which the position (order) of the 4's are unimportant. For example the permutations of (43421) are counted as permutations of (321)=6.

Examples

			a(6)=26; these are (42=24),(411=141=114),(33),(321=six),(3111=four),(222),(2211=six),(21111=five),(111111).
		

Crossrefs

Programs

  • PARI
    Vec(1 / ((x-1)*(x+1)*(x^2+1)*(x^3+x^2+x-1)) + O(x^100)) \\ Colin Barker, May 17 2015

Formula

a(n)= a(n-1) + a(n-2) + a(n-3) + a(n-4) - a(n-5) - a(n-6) - a(n-7).
G.f.: 1 / ((x-1)*(x+1)*(x^2+1)*(x^3+x^2+x-1)). - Colin Barker, May 17 2015

Extensions

Missing term (6320) inserted by Colin Barker, May 17 2015

A257792 Expansion of 1/(1-x-x^2-x^3-x^5+x^8-x^9).

Original entry on oeis.org

1, 1, 2, 4, 7, 14, 26, 49, 92, 174, 328, 618, 1166, 2197, 4143, 7811, 14726, 27764, 52344, 98687, 186058, 350784, 661347, 1246865, 2350768, 4432000, 8355837, 15753609, 29700940, 55996428, 105572414, 199040101, 375258649, 707490872, 1333862213, 2514786376
Offset: 0

Author

David Neil McGrath, May 08 2015

Keywords

Comments

This sequence counts partially ordered partitions of (n) in two distinct ways. It partitions (n) into parts containing (1,2,3,5,9) where the adjacent order of 3's and 5's are unimportant, example (1), and it partitions (n) into parts containing (1,2,3,4,5,6) where the adjacent order of the odd numbers is unimportant, example (2). The sign "=" is used within a bracket to indicate that the arrangements are counted as one.

Examples

			Example (1):Partial order of (n) into parts (1,2,3,5,9) where the adjacent order of 3's and 5's is unimportant. a(8)=92 These are (53=35)=1,(521)=6,(5111)=4,(332)=3,(3311)=6,(3221)=12,(32111)=20,(311111)=6,(2222)=1,(22211)=10,(221111)=15,(2111111)=7,(11111111)=1.
Example (2):Partial order of (n) into parts (1,2,3,4,5,6) where the adjacent order of all odd numbers (i.e. 1,3,5) is unimportant. a(6)=26 These are (6),(51=15),(42),(24),(411),(141),(114),(33),(321),(123),(231=213),(312=132),(3111=1311=1131=1113),(222),(2211),(1122),(1221),(2112),(2121),(1212),(21111),(12111),(11211),(11121),(11112),(111111).
		

Programs

  • Magma
    I:=[1,1,2,4,7,14,26,49,92]; [n le 9 select I[n] else Self(n-1)+Self(n-2)+Self(n-3)+Self(n-5)-Self(n-8)+Self(n-9): n in [1..40]]; // Vincenzo Librandi, May 09 2015
    
  • Mathematica
    CoefficientList[Series[1/(1 - x - x^2 - x^3 - x^5 + x^8 - x^9), {x, 0, 80}], x] (* Vincenzo Librandi, May 09 2015 *)
    LinearRecurrence[{1,1,1,0,1,0,0,-1,1},{1,1,2,4,7,14,26,49,92},36] (* Ray Chandler, Jul 14 2015 *)
  • Sage
    m = 40; L. = PowerSeriesRing(ZZ, m); f = 1/(1-x-x^2-x^3-x^5+x^8-x^9); print(f.coefficients()) # Bruno Berselli, May 12 2015

Formula

G.f.: 1/(1-x-x^2-x^3-x^5+x^8-x^9).
a(n) = a(n-1) + a(n-2) + a(n-3) + a(n-5) - a(n-8) + a(n-9).

Extensions

More terms from Vincenzo Librandi, May 09 2015

A257863 Expansion of 1/(1 - x - x^2 + x^5 - x^6).

Original entry on oeis.org

1, 1, 2, 3, 5, 7, 12, 18, 29, 45, 72, 112, 178, 279, 441, 693, 1094, 1721, 2714, 4273, 6735, 10607, 16715, 26329, 41485, 65352, 102965, 162209, 255560, 402613, 634306, 999306, 1574368, 2480323, 3907638, 6156268, 9698906, 15280112, 24073063, 37925860, 59750293
Offset: 0

Author

David Neil McGrath, May 11 2015

Keywords

Comments

This sequence counts partially ordered partitions of (n) into parts (1,2,3,4) where only the position (order) of the 4's are important. The 4's behave like placeholders for the unordered 1's, 2's and 3's. (See example.)

Examples

			a(8)=29 These are (44),(341),(143),(431=413),(314=134),(422),(242),(224),(4211=4121=4112),(2114=1214=1124),(1421=1412),(2141=1241),(2411),(1142),(41111),(14111),(11411),(11141),(11114),(332=323=233),(3311=1133=1331=3113=1313=3131),(3221=twelve),(32111=twenty),(311111=six),(2222),(22211=ten),(221111=fifteen),(2111111=seven),(11111111)
		

Programs

  • Magma
    [n le 6 select NumberOfPartitions(n-1) else Self(n-1)+Self(n-2)-Self(n-5)+Self(n-6): n in [1..50]]; // Vincenzo Librandi, May 12 2015
    
  • Mathematica
    RecurrenceTable[{a[n] == a[n - 1] + a[n - 2] - a[n - 5] + a[n - 6], a[1] == 1, a[2] == 1, a[3] == 2, a[4] == 3, a[5] == 5, a[6] == 7}, a, {n, 43}] (* Michael De Vlieger, May 11 2015 *)
    CoefficientList[Series[1/(1 - x - x^2 + x^5 - x^6), {x, 0, 80}], x] (* or *) LinearRecurrence[{1, 1, 0, 0, -1, 1}, {1, 1, 2, 3, 5, 7}, 50] (* Vincenzo Librandi, May 12 2015 *)
  • Sage
    m = 50; L. = PowerSeriesRing(ZZ, m); f = 1/(1-x-x^2+x^5-x^6); print(f.coefficients()) # Bruno Berselli, May 12 2015

Formula

G.f.: 1/(1-x-x^2+x^5-x^6).
a(n) = a(n-1) + a(n-2) - a(n-5) + a(n-6).

A254685 Number of partially ordered partitions of n into parts less than or equal to 3, in which the order of adjacent 2's and 3's is unimportant.

Original entry on oeis.org

1, 1, 2, 4, 7, 12, 22, 39, 69, 123, 219, 389, 692, 1231, 2189, 3893, 6924, 12314, 21900, 38949, 69270, 123195, 219100, 389665, 693011, 1232506, 2191987, 3898404, 6933232, 12330612, 21929742, 39001599, 69363549, 123361658, 219396194, 390191659, 693947912
Offset: 0

Author

David Neil McGrath, May 04 2015

Keywords

Comments

Also number of compositions of n into parts 1, 2, 3, and 5.

Examples

			a(7)=39. These are (331),(313),(133),(322=232=223),(3211=2311),(1123=1132),(1231=1321),(3112),(2113),(1312),(1213),(3121),(2131),(31111),(13111),(11311),(11131),(11113),(2221),(2212),(2122),(1222),(22111),(21211),(12211),(12121),(11221),(11212),(11122),(12112),(21112),(21121),(211111),(121111),(112111),(111211),(111121),(111112),(1111111).
		

Crossrefs

Cf. A001399.

Programs

  • Magma
    I:=[1,2,4,7,12]; [n le 5 select I[n] else Self(n-1)+Self(n-2)+Self(n-3)-Self(n-5): n in [1..40]]; // Vincenzo Librandi, May 06 2015
  • Mathematica
    CoefficientList[Series[1/(x^5 - x^3 - x^2 - x + 1), {x, 0, 40}], x] (* Vincenzo Librandi, May 06 2015 *)

Formula

G.f.: 1/(x^5 - x^3 - x^2 - x + 1).
a(n) = a(n-1) + a(n-2) + a(n-3) - a(n-5).

Extensions

Corrected g.f. and more terms from Vincenzo Librandi, May 06 2015
a(0) added and g.f. adapted from Alois P. Heinz, May 08 2015

A245369 Number of compositions of n into parts 3, 5 and 8.

Original entry on oeis.org

1, 0, 0, 1, 0, 1, 1, 0, 3, 1, 1, 5, 1, 5, 7, 2, 13, 9, 8, 25, 12, 26, 41, 22, 64, 62, 56, 130, 96, 146, 233, 174, 340, 391, 376, 703, 661, 862, 1327, 1211, 1905, 2379, 2449, 3935, 4251, 5216, 7641, 7911, 11056, 14271, 15576, 22632, 26433, 31848, 44544, 49920, 65536, 85248, 97344, 132712, 161601, 194728, 262504, 308865
Offset: 0

Author

David Neil McGrath, Aug 23 2014

Keywords

Examples

			a(19)=25. The compositions of 19 into parts 3, 5, and 8 are the permutations of (883) (these are 3!/2!=3), (8533) (these are 4!/2!=12), and (55333) (these are 5!/3!2!=10).
		

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{0,0,1,0,1,0,0,1},{1,0,0,1,0,1,1,0},70] (* Harvey P. Dale, Sep 05 2022 *)
  • PARI
    Vec( 1/(1-x^3-x^5-x^8) +O(x^66) ) \\ Joerg Arndt, Aug 25 2014

Formula

G.f.: 1/(1-x^3-x^5-x^8).
a(n) = a(n-3) + a(n-5) + a(n-8).

A245370 Number of compositions of n into parts 3, 5 and 9.

Original entry on oeis.org

1, 0, 0, 1, 0, 1, 1, 0, 2, 2, 1, 3, 3, 3, 6, 5, 6, 11, 10, 13, 19, 19, 27, 35, 37, 52, 65, 74, 100, 121, 145, 192, 230, 282, 365, 440, 548, 695, 843, 1058, 1327, 1621, 2035, 2535, 3119, 3910, 4851, 5997, 7503, 9297, 11528, 14389, 17829, 22150, 27596, 34208, 42536, 52928, 65655, 81660, 101525, 126020, 156738, 194776, 241888
Offset: 0

Author

David Neil McGrath, Aug 24 2014

Keywords

Examples

			a(28)=100 The compositions of n into parts 3,5 and 9 are the permutations of (9955)(these are 4!/2!2!=6), (555553) (these are 6!/5!=6), (955333) (these are 6!/3!2!=60), (55333333) (these are 8!/6!2!=28).
		

Crossrefs

Programs

  • PARI
    Vec( 1/(1-x^3-x^5-x^9) +O(x^66) ) \\ Joerg Arndt, Aug 24 2014

Formula

G.f.: 1/(1-x^3-x^5-x^9).
a(n) = a(n-3) + a(n-5) + a(n-9).