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-8 of 8 results.

A300443 Number of binary enriched p-trees of weight n.

Original entry on oeis.org

1, 1, 2, 3, 8, 15, 41, 96, 288, 724, 2142, 5838, 17720, 49871, 151846, 440915, 1363821, 4019460, 12460721, 37374098, 116809752, 353904962, 1109745666, 3396806188, 10712261952, 33006706419, 104357272687, 323794643722, 1027723460639, 3204413808420, 10193485256501
Offset: 0

Views

Author

Gus Wiseman, Mar 05 2018

Keywords

Comments

A binary enriched p-tree of weight n is either a single node of weight n, or an ordered pair of binary enriched p-trees with weakly decreasing weights summing to n.

Examples

			The a(4) = 8 binary enriched p-trees: 4, (31), (22), ((21)1), ((11)2), (2(11)), (((11)1)1), ((11)(11)).
		

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember;
          1+add(a(j)*a(n-j), j=1..n/2)
        end:
    seq(a(n), n=0..40);  # Alois P. Heinz, Mar 06 2018
  • Mathematica
    j[n_]:=j[n]=1+Sum[Times@@j/@y,{y,Select[IntegerPartitions[n],Length[#]===2&]}];
    Array[j,40]
    (* Second program: *)
    a[n_] := a[n] = 1 + Sum[a[j]*a[n-j], {j, 1, n/2}];
    a /@ Range[0, 40] (* Jean-François Alcover, May 12 2021, after Alois P. Heinz *)
  • PARI
    seq(n)={my(v=vector(n)); for(n=1, n, v[n] = 1 + sum(k=1, n\2, v[k]*v[n-k])); concat([1], v)} \\ Andrew Howroyd, Aug 26 2018

Formula

a(n) = 1 + Sum_{x + y = n, 0 < x <= y < n} a(x) * a(y).

A301364 Regular triangle where T(n,k) is the number of enriched p-trees of weight n with k leaves.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 1, 2, 4, 5, 1, 2, 6, 11, 12, 1, 3, 10, 26, 38, 34, 1, 3, 13, 39, 87, 117, 92, 1, 4, 19, 69, 181, 339, 406, 277, 1, 4, 23, 95, 303, 707, 1198, 1311, 806, 1, 5, 30, 143, 514, 1430, 2970, 4525, 4522, 2500, 1, 5, 35, 184, 762, 2446, 6124, 11627
Offset: 1

Views

Author

Gus Wiseman, Mar 19 2018

Keywords

Comments

An enriched p-tree of weight n > 0 is either a single node of weight n, or a finite sequence of two or more enriched p-trees with weakly decreasing weights summing to n.

Examples

			Triangle begins:
  1
  1   1
  1   1   2
  1   2   4   5
  1   2   6  11  12
  1   3  10  26  38  34
  1   3  13  39  87 117  92
  1   4  19  69 181 339 406 277
  ...
The T(5,4) = 11 enriched p-trees: (((21)1)1), ((2(11))1), (((11)2)1), ((211)1), ((21)(11)), (((11)1)2), ((111)2), ((21)11), (2(11)1), ((11)21), (2111).
		

Crossrefs

Programs

  • Mathematica
    eptrees[n_]:=Prepend[Join@@Table[Tuples[eptrees/@ptn],{ptn,Select[IntegerPartitions[n],Length[#]>1&]}],n];
    Table[Length[Select[eptrees[n],Count[#,_Integer,{-1}]===k&]],{n,8},{k,n}]
  • PARI
    A(n)={my(v=vector(n)); for(n=1, n, v[n] = y + polcoef(1/prod(k=1, n-1, 1 - v[k]*x^k + O(x*x^n)), n)); apply(p->Vecrev(p/y), v)}
    { my(T=A(10)); for(n=1, #T, print(T[n])) } \\ Andrew Howroyd, Aug 26 2018

A301368 Regular triangle where T(n,k) is the number of binary enriched p-trees of weight n with k leaves.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 2, 3, 2, 1, 2, 4, 5, 3, 1, 3, 7, 12, 12, 6, 1, 3, 9, 19, 28, 25, 11, 1, 4, 14, 36, 65, 81, 63, 24, 1, 4, 16, 48, 107, 172, 193, 136, 47, 1, 5, 22, 75, 192, 369, 522, 522, 331, 103, 1, 5, 25, 96, 284, 643, 1108, 1420, 1292, 750, 214, 1, 6
Offset: 1

Views

Author

Gus Wiseman, Mar 19 2018

Keywords

Comments

A binary enriched p-tree of weight n is either a single node of weight n, or an ordered pair of binary enriched p-trees with weakly decreasing weights summing to n.

Examples

			Triangle begins:
  1
  1   1
  1   1   1
  1   2   3   2
  1   2   4   5   3
  1   3   7  12  12   6
  1   3   9  19  28  25  11
  1   4  14  36  65  81  63  24
  1   4  16  48 107 172 193 136  47
  1   5  22  75 192 369 522 522 331 103
  ...
The T(6,3) = 7 binary enriched p-trees: ((41)1), ((32)1), (4(11)), ((31)2), ((22)2), (3(21)), ((21)3).
		

Crossrefs

Programs

  • Mathematica
    bintrees[n_]:=Prepend[Join@@Table[Tuples[bintrees/@ptn],{ptn,Select[IntegerPartitions[n],Length[#]===2&]}],n];
    Table[Length[Select[bintrees[n],Count[#,_Integer,{-1}]===k&]],{n,13},{k,n}]
  • PARI
    A(n)={my(v=vector(n)); for(n=1, n, v[n] = y + sum(k=1, n\2, v[k]*v[n-k])); apply(p->Vecrev(p/y), v)}
    { my(T=A(10)); for(n=1, #T, print(T[n])) } \\ Andrew Howroyd, Aug 26 2018

A300866 Signed recurrence over binary strict trees: a(n) = 1 - Sum_{x + y = n, 0 < x < y < n} a(x) * a(y).

Original entry on oeis.org

1, 1, 1, 0, 1, 0, 0, 1, 0, 0, 1, -1, 1, 1, -2, 3, -1, -3, 8, -8, 1, 14, -26, 22, 10, -59, 90, -52, -74, 238, -291, 80, 417, -930, 915, 124, -1991, 3483, -2533, -2148, 9011, -12596, 5754, 14350, -37975, 42735, -4046, -77924, 154374, -133903, -56529, 376844, -591197, 355941, 522978, -1706239
Offset: 0

Views

Author

Gus Wiseman, Mar 13 2018

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_]:=a[n]=1-Sum[a[k]*a[n-k],{k,1,(n-1)/2}];
    Array[a,40]
  • PARI
    seq(n)={my(v=vector(n)); for(n=1, n, v[n] = 1 - sum(k=1, (n-1)\2, v[k]*v[n-k])); concat([1], v)} \\ Andrew Howroyd, Aug 27 2018

A300865 Signed recurrence over binary enriched p-trees: a(n) = (-1)^(n-1) + Sum_{x + y = n, 0 < x <= y < n} a(x) * a(y).

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 2, 2, 4, 6, 10, 16, 27, 46, 77, 131, 224, 391, 672, 1180, 2050, 3626, 6344, 11276, 19863, 35479, 62828, 112685, 200462, 360627, 644199, 1162296, 2083572, 3768866, 6777314, 12289160, 22158106, 40255496, 72765144, 132453122, 239936528, 437445448
Offset: 1

Views

Author

Gus Wiseman, Mar 13 2018

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_]:=a[n]=(-1)^(n-1)+Sum[a[k]*a[n-k],{k,1,n/2}];
    Array[a,50]

A300652 Number of enriched p-trees of weight 2n + 1 in which all outdegrees and all leaves are odd.

Original entry on oeis.org

1, 2, 4, 12, 40, 136, 496, 1952, 7488, 30368, 123456, 512384, 2129664, 9068672, 38391552, 165642752, 713405952, 3109135872, 13528865792, 59591322624, 261549260800, 1159547047936, 5131968999424, 22883893137408, 101851069587456, 456703499042816, 2042949493276672
Offset: 0

Views

Author

Gus Wiseman, Mar 10 2018

Keywords

Comments

An enriched p-tree of weight n > 0 is either a single node of weight n, or a finite sequence of at least two enriched p-trees whose weights are weakly decreasing and sum to n.

Examples

			The a(3) = 12 trees:
7,
(511), (331),
((111)31), (3(111)1), ((311)11), (31111),
((111)(111)1), (((111)11)11), ((11111)11), ((111)1111), (1111111).
		

Crossrefs

Programs

  • Mathematica
    r[n_]:=r[n]=If[OddQ[n],1,0]+Sum[Times@@r/@y,{y,Select[IntegerPartitions[n],Length[#]>1&&OddQ[Length[#]]&]}];
    Table[r[n],{n,1,40,2}]
  • PARI
    seq(n)={my(v=vector(n)); for(n=1, n, v[n] = 1 + polcoef(1/prod(k=1, n-1, 1 - v[k]*x^(2*k-1) + O(x^(2*n))) - 1/prod(k=1, n-1, 1 + v[k]*x^(2*k-1) + O(x^(2*n))), 2*n-1)/2); v} \\ Andrew Howroyd, Aug 26 2018

Formula

a(n) = (1 - (-1)^n)/2 + Sum_y Product_{i in y} a(i) where the sum is over all non-singleton integer partitions of n with an odd number of parts.

A301365 Regular triangle where T(n,k) is the number of strict trees of weight n with k leaves.

Original entry on oeis.org

1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 2, 2, 1, 0, 1, 2, 4, 4, 1, 0, 1, 3, 7, 9, 7, 1, 0, 1, 3, 10, 19, 20, 11, 1, 0, 1, 4, 15, 35, 51, 43, 16, 1, 0, 1, 4, 18, 55, 104, 123, 84, 22, 1, 0, 1, 5, 25, 84, 196, 298, 284, 153, 29, 1, 0, 1, 5, 30, 120, 331, 624, 783, 614, 260, 37
Offset: 1

Views

Author

Gus Wiseman, Mar 19 2018

Keywords

Comments

A strict tree of weight n > 0 is either a single node of weight n, or a finite sequence of two or more strict trees with strictly decreasing weights summing to n.

Examples

			Triangle begins:
  1
  1   0
  1   1   0
  1   1   1   0
  1   2   2   1   0
  1   2   4   4   1   0
  1   3   7   9   7   1   0
  1   3  10  19  20  11   1   0
  1   4  15  35  51  43  16   1   0
The T(7,3) = 7 strict trees: ((51)1), ((42)1), ((41)2), ((32)2), (4(21)), ((31)3), (421).
		

Crossrefs

Programs

  • Mathematica
    strtrees[n_]:=Prepend[Join@@Table[Tuples[strtrees/@ptn],{ptn,Select[IntegerPartitions[n],Length[#]>1&&UnsameQ@@#&]}],n];
    Table[Length[Select[strtrees[n],Count[#,_Integer,{-1}]===k&]],{n,12},{k,n}]
  • PARI
    A(n)={my(v=vector(n)); for(n=1, n, v[n] = y + polcoef(prod(k=1, n-1, 1 + v[k]*x^k + O(x*x^n)), n)); vector(n, k, Vecrev(v[k]/y, k))}
    my(T=A(10));for(n=1, #T, print(T[n])) \\ Andrew Howroyd, Aug 26 2018

A301366 Regular triangle where T(n,k) is the number of same-trees of weight n with k leaves.

Original entry on oeis.org

1, 1, 1, 1, 0, 1, 1, 1, 2, 2, 1, 0, 0, 0, 1, 1, 1, 1, 5, 3, 3, 1, 0, 0, 0, 0, 0, 1, 1, 1, 2, 6, 12, 14, 12, 6, 1, 0, 1, 0, 3, 0, 3, 0, 2, 1, 1, 0, 0, 1, 7, 10, 10, 5, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 3, 7, 21, 41, 58, 100, 100, 94, 48, 20
Offset: 1

Views

Author

Gus Wiseman, Mar 19 2018

Keywords

Comments

A same-tree of weight n > 0 is either a single node of weight n, or a finite sequence of two or more same-trees whose weights are all the same and sum to n.

Examples

			Triangle begins:
1
1   1
1   0   1
1   1   2   2
1   0   0   0   1
1   1   1   5   3   3
1   0   0   0   0   0   1
1   1   2   6  12  14  12   6
1   0   1   0   3   0   3   0   2
1   1   0   0   1   7  10  10   5   3
1   0   0   0   0   0   0   0   0   0   1
1   1   3   7  21  41  58 100 100  94  48  20
The T(8,4) = 6 same-trees: (4(2(11))), (4((11)2)), ((22)(22)), ((2(11))4), (((11)2)4), (2222).
		

Crossrefs

Programs

  • Mathematica
    sametrees[n_]:=Prepend[Join@@Table[Tuples[sametrees/@ptn],{ptn,Select[IntegerPartitions[n],Length[#]>1&&SameQ@@#&]}],n];
    Table[Length[Select[sametrees[n],Count[#,_Integer,{-1}]===k&]],{n,12},{k,n}]
  • PARI
    A(n)={my(v=vector(n)); for(n=1, n, v[n] = x + sumdiv(n, d, v[n/d]^d)); apply(p -> Vecrev(p/x), v)}
    {my(v=A(16)); for(n=1, #v, print(v[n]))} \\ Andrew Howroyd, Aug 20 2018
Showing 1-8 of 8 results.