Define P(n,X) by the recursion P(1,X) = 1, P(n+1,X) = (P(n,X)+X)^2; then a(1) = 0 and for n > 1 a(n) is the coefficient of X^(2^(n-2)) in P(n,X) of degree 2^(n-1).
P(1,X) = 1 then P(2,X) = (1+X)^2 = X^2+2X+1, the coefficient of X^(2^(2-2)) = X is 2 = a(2). P(4,X) = x^8+12*x^7+58*x^6+146*x^5+207*x^4+166*x^3+71*x^2+14*x+1 and the coefficient of X^(2^(4-2)) = X^4 is 207 = a(4).