Moments of a Thue–Morse generating function