OFFSET
1,3
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..5590
FORMULA
a(1) = 1; a(n+1) = Sum_{d|n} a(n/d)^d.
L.g.f.: -log(Product_{n>=1} (1 - a(n)*x^n)^(1/n)) = Sum_{n>=1} a(n+1)*x^n/n. - Ilya Gutkovskiy, Apr 29 2019
EXAMPLE
The tree shown below left counts, because the left subtree has 3 nodes and so does the right subtree and a similar condition holds for the subtrees. The tree shown on the right is not counted, because the left subtree has 3 nodes, while the right subtree has 4.
O..........O...O...O
|..........|....\./.
O...O...O..O.....O..
.\...\./....\....|..
.O...O......O...O..
..\./........\./...
...O..........O....
MAPLE
a:= proc(n) option remember; `if`(n<2, n, add(
a((n-1)/d)^d, d=numtheory[divisors](n-1)))
end:
seq(a(n), n=1..45); # Alois P. Heinz, Sep 08 2018
MATHEMATICA
a[1] = 1;
a[n_] := a[n] = Sum[a[(n-1)/d]^d, {d, Divisors[n-1]}];
Array[a, 45] (* Jean-François Alcover, Oct 28 2020 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Franklin T. Adams-Watters, Jan 17 2007
STATUS
approved