[go: up one dir, main page]

login
A300649
Number of same-trees of weight 2n + 1 in which all outdegrees are odd and all leaves greater than 1.
3
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,5
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.
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.
EXAMPLE
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).
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}]
PROG
(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
KEYWORD
nonn
AUTHOR
Gus Wiseman, Mar 10 2018
STATUS
approved