a(n) = 2^(n-1), for n <= 6; a(n) = 2^a(n-3) + 2*a(n-3) + 1, for n > 6

EXAMPLE

For n=6, the maximum result is generated from the initial term X (X (X (X (X X)))). For n=10, the maximum result is generated from the initial term X (X X) (X (X X) (X (X (X X)))).