
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(0), b(2), b(6), b(20), b(60), b(182), b(546), b(1640),...
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 [1].
From then on, each parent node [k] is attached to k child nodes with
labels congruent to 1(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..4 of the tree are as follows;
the path from the root node is given, followed by child nodes in [].
GEN.0: [1];
GEN.1: 1>[3];
GEN.2: 13>[1,4,7];
GEN.3:
131>[3]
134>[3,6,9,12]
137>[3,6,9,12,15,18,21];
GEN.4:
1313>[1,4,7]
1343>[1,4,7]
1346>[1,4,7,10,13,16]
1349>[1,4,7,10,13,16,19,22,25]
13412>[1,4,7,10,13,16,19,22,25,28,31,34]
1373>[1,4,7]
1376>[1,4,7,10,13,16]
1379>[1,4,7,10,13,16,19,22,25]
13712>[1,4,7,10,13,16,19,22,25,28,31,34]
13715>[1,4,7,10,13,16,19,22,25,28,31,34,37,40,43]
13718>[1,4,7,10,13,16,19,22,25,28,31,34,37,40,43,46,49,52]
13721>[1,4,7,10,13,16,19,22,25,28,31,34,37,40,43,46,49,52,55,58,61] .
Note: the sum of the labels in generation n equals a(n+1) and
the largest term in generation n = (3^(n+1) + (1)^(n+1)  2)/4 + 1.
