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

A300797 Number of strict trees of weight 2n + 1 in which all outdegrees and all leaves are odd.

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 4, 6, 11, 17, 34, 59, 118, 213, 424, 799, 1606, 3072, 6216, 12172, 24650, 48710, 99333, 198237, 405526, 815267, 1673127, 3387165, 6974702, 14179418, 29285048, 59841630, 123848399, 253927322, 526936694, 1084022437, 2253778793, 4649778115
Offset: 0

Views

Author

Gus Wiseman, Mar 13 2018

Keywords

Comments

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

Examples

			The a(7) = 6 strict trees: 15, (11 3 1), (9 5 1), (7 5 3), ((7 3 1) 3 1), ((5 3 1) 5 1).
		

Crossrefs

Programs

  • Mathematica
    a[n_]:=a[n]=If[OddQ[n],1,0]+Sum[Times@@a/@ptn,{ptn,Select[IntegerPartitions[n],Length[#]>1&&OddQ[Length[#]]&&UnsameQ@@#&]}];
    Table[a[n],{n,1,60,2}]
  • PARI
    seq(n)={my(v=vector(n)); for(n=1, n, v[n] = 1 + polcoef(prod(k=1, n-1, 1 + v[k]*x^(2*k-1) + O(x^(2*n))) - 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

Extensions

a(30)-a(37) from Alois P. Heinz, Mar 13 2018

A318485 Number of p-trees of weight 2n + 1 in which all outdegrees are odd.

Original entry on oeis.org

1, 1, 2, 5, 13, 37, 107, 336, 1037, 3367, 10924, 36438, 121045, 412789, 1398168, 4831708, 16636297, 58084208, 202101971, 712709423, 2502000811, 8880033929, 31428410158, 112199775788, 399383181020, 1433385148187, 5128572792587, 18481258241133
Offset: 0

Views

Author

Gus Wiseman, Aug 27 2018

Keywords

Comments

A p-tree of weight n with odd outdegrees is either a single node (if n = 1) or a finite odd-length sequence of at least 3 p-trees with odd outdegrees whose weights are weakly decreasing and sum to n.

Examples

			The a(4) = 13 p-trees of weight 9 with odd outdegrees:
  ((((ooo)oo)oo)oo)
  (((ooo)(ooo)o)oo)
  (((ooo)oo)(ooo)o)
  ((ooo)(ooo)(ooo))
  (((ooooo)oo)oo)
  (((ooo)oooo)oo)
  ((ooooo)(ooo)o)
  (((ooo)oo)oooo)
  ((ooo)(ooo)ooo)
  ((ooooooo)oo)
  ((ooooo)oooo)
  ((ooo)oooooo)
  (ooooooooo)
		

Crossrefs

Programs

  • Mathematica
    b[n_]:=b[n]=If[n>1,0,1]+Sum[Times@@b/@y,{y,Select[IntegerPartitions[n],Length[#]>1&&OddQ[Length[#]]&]}];
    Table[b[n],{n,1,20,2}]
  • PARI
    seq(n)={my(v=vector(n)); v[1]=1; for(n=2, n, v[n] = 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 27 2018
Showing 1-2 of 2 results.