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

A300647 Number of same-trees of weight n in which all outdegrees are odd.

Original entry on oeis.org

1, 1, 2, 1, 2, 2, 2, 1, 10, 2, 2, 2, 2, 2, 42, 1, 2, 10, 2, 2, 138, 2, 2, 2, 34, 2, 1514, 2, 2, 42, 2, 1, 2058, 2, 162, 10, 2, 2, 8202, 2, 2, 138, 2, 2, 207370, 2, 2, 2, 130, 34, 131082, 2, 2, 1514, 2082, 2, 524298, 2, 2, 42, 2, 2, 14725738, 1, 8226, 2058, 2
Offset: 1

Views

Author

Gus Wiseman, Mar 10 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 equal and sum to n.

Examples

			The a(9) = 10 odd same-trees:
9,
(333),
(33(111)), (3(111)3), ((111)33)
(3(111)(111)), ((111)3(111)), ((111)(111)3),
((111)(111)(111)), (111111111).
		

Crossrefs

Programs

  • Mathematica
    a[n_]:=1+Sum[a[n/d]^d,{d,Select[Rest[Divisors[n]],OddQ]}];
    Array[a,80]
  • PARI
    a(n) = if (n==1, 1, 1+sumdiv(n, d, if ((d > 1) && (d % 2), a(n/d)^d))); \\ Michel Marcus, Mar 10 2018

Formula

a(n) = 1 + Sum_d a(n/d)^d where the sum is over odd divisors of n greater than 1.

A300649 Number of same-trees of weight 2n + 1 in which all outdegrees are odd and all leaves greater than 1.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 3, 1, 1, 3, 1, 2, 10, 1, 1, 3, 3, 1, 3, 1, 1, 62, 1, 2, 3, 1, 3, 3, 1, 1, 158, 3, 1, 3, 1, 1, 254, 3, 1, 1514, 1, 3, 3, 1, 3, 3, 3, 1, 2078, 1, 1, 2461, 1, 1, 3, 1, 3, 8222, 3, 2, 3, 34, 1, 3, 1, 3, 390782, 1, 1, 3, 3, 3, 2198, 1, 1
Offset: 0

Views

Author

Gus Wiseman, Mar 10 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 equal and sum to n.

Examples

			The a(13) = 10 odd same-trees with all leaves greater than 1:
27,
(999),
(99(333)), (9(333)9), ((333)99),
(9(333)(333)), ((333)9(333)), ((333)(333)9),
((333)(333)(333)), (333333333).
		

Crossrefs

Programs

  • Mathematica
    a[n_]:=If[n===1,1,Sum[a[n/d]^d,{d,Select[Rest[Divisors[n]],OddQ]}]];
    Table[a[n],{n,1,100,2}]
  • PARI
    f(n) = if (n==1, 1, sumdiv(n, d, if ((d > 1) && (d % 2), f(n/d)^d)));
    a(n) = f(2*n+1); \\ Michel Marcus, Mar 10 2018

Formula

a(1) = 1; a(n > 1) = Sum_d a(n/d)^d where the sum is over odd divisors of n greater than 1.

A300650 Number of orderless same-trees of weight 2n + 1 in which all outdegrees are odd and all leaves greater than 1.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 3, 1, 1, 3, 1, 2, 6, 1, 1, 3, 3, 1, 3, 1, 1, 19, 1, 2, 3, 1, 3, 3, 1, 1, 21, 3, 1, 3, 1, 1, 28, 3, 1, 68, 1, 3, 3, 1, 3, 3, 3, 1, 25, 1, 1, 71, 1, 1, 3, 1, 3, 27, 3, 2, 3, 8, 1, 3, 1, 3, 1656, 1, 1, 3, 3, 3, 43, 1, 1, 31, 3, 1, 3, 3, 1
Offset: 0

Views

Author

Gus Wiseman, Mar 10 2018

Keywords

Comments

An orderless same-tree of weight n > 0 is either a single node of weight n, or a finite multiset of two or more orderless same-trees whose weights are all equal and sum to n.

Examples

			The a(13) = 6 orderless same-trees: 27, (999), (99(333)), (9(333)(333)), ((333)(333)(333)), (333333333).
		

Crossrefs

Programs

  • Mathematica
    a[n_]:=If[n===1,1,Sum[Binomial[a[n/d]+d-1,d],{d,Select[Rest[Divisors[n]],OddQ]}]];
    Table[a[n],{n,1,100,2}]
  • PARI
    f(n) = if (n==1, 1, sumdiv(n, d, if ((d > 1) && (d % 2), binomial(f(n/d)+d-1, d))));
    a(n) = f(2*n+1); \\ Michel Marcus, Mar 10 2018

Formula

a(1) = 1; a(n > 1) = Sum_d binomial(a(n/d) + d - 1, d) where the sum is over odd divisors of n greater than 1.
Showing 1-3 of 3 results.