a(0) = a(1) = 1 since there is only one endofunction for n=0 or 1 and the equation is satisfied trivially. For n=2, each endofunction f on {1,2} is represented by [f(1),f(2)]. The list of a(2) = 6 pairs (f,g) which satisfy the equation is ([1,1], [1,1]), ([1,1], [1,2]), ([1,2], [1,2]), ([1,2], [2,1]), ([2,2], [1,2]), ([2,2], [2,2]). - Michael Somos, Mar 26 2014