
EXAMPLE

Let b(n) = A005704(n) = number of partitions of 3n into powers of 3,
then the initial terms of this sequence begin:
b(0), b(1), b(5), b(16), b(50), b(151), b(455), b(1366),...
APPLICATION: SPECIAL TERNARY TREE.
a(n) = number of nodes in generation n of the following tree.
Start at generation 0 with a single root node labeled [2].
From then on, each parent node [k] is attached k child nodes with
labels congruent to 2(mod 3) for even n, or 3(mod 3) for odd n,
within the range {1..3k}, for generation n >= 0.
The initial generations 0..3 of the tree begin as follows;
the path from the root node is given, followed by child nodes in [].
GEN.0: [2];
GEN.1: 2>[3,6];
GEN.2:
23>[2,5,8]
26>[2,5,8,11,14,17];
GEN.3:
232>[3,6]
235>[3,6,9,12,15]
238>[3,6,9,12,15,18,21,24]
262>[3,6]
265>[3,6,9,12,15]
268>[3,6,9,12,15,18,21,24]
2611>[3,6,9,12,15,18,21,24,27,30,33]
2614>[3,6,9,12,15,18,21,24,27,30,33,36,39,42]
2617>[3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,48,51] .
Note: largest node label in generation n is A037480(n) + 1,
and the sum of the labels in generation n equals a(n+1).
