Motivated by the discovery that the eighth root of the theta series of the E 8 lattice and the 24th root of the theta series of the Leech lattice both have integer coefficients, we investigate the question of when an arbitrary element f ∈ R (where R = 1 + x Z 〚 x 〛 ) can be written as f = g n for g ∈ R , n ⩾ 2 . Let P n : = { g n | g ∈ R } and let μ n : = n ∏ p | n p . We show among other things that (i) for f ∈ R , f ∈ P n ⇔ f ( mod μ n ) ∈ P n , and (ii) if f ∈ P n , there is a unique g ∈ P n with coefficients mod μ n / n such that f ≡ g n ( mod μ n ) . In particular, if f ≡ 1 ( mod μ n ) then f ∈ P n . The latter assertion implies that the theta series of any extremal even unimodular lattice in R n (e.g. E 8 in R 8 ) is in P n if n is of the form 2 i 3 j 5 k ( i ⩾ 3 ). There do not seem to be any exact analogues for codes, although we show that the weight enumerator of the rth order Reed–Muller code of length 2 m is in P 2 r (and similarly that the theta series of the Barnes–Wall lattice B W 2 m is in P 2 m ). We give a number of other results and conjectures, and establish a conjecture of Paul D. Hanna that there is a unique element f ∈ P n ( n ⩾ 2 ) with coefficients restricted to the set { 1 , 2 , … , n } .