n = (1 + sum (3k) from k=0 to x-1) / (2^(x+y) - 3^x)