I used Antti's hint about the inverse Somos transform and the inverse Euler transform matching each other at prime indices to construct a decent algorithm to calculate the Somos and inverse Somos transforms. For a sequence a[] Let b[n] = SUM ( L(n/d, a[d]) ), d|n where L(n, z) is the number of Lyndon words (aperiodic necklaces) with n beads of z colors = 1/n SUM ( mu(n/d)*z^d ), d|n [Note that z is not necessarily an integer, but n is a nonnegative integer.] I call b[] the inverse Witt transform of a[] and a[] the Witt transform of b[]. The Somos transform is now just the Euler transform of the inverse Witt transform. With this formula, it is easy to see that if a[1] = 0 or 1 then a[] and b[] will match at all prime indices for essentially the same reason that if q[] is the Moebius transform of p[] and p[1] = 0 then p[] and q[] will match at all prime indices. Why the Witt transform? A006177 Witt vector *2!/2! is the Witt transform of A022553 a[ n ] = (1/2n) sum_{d|n} \mu(n/d) {2d \choose d} A006178 Witt vector *3!/3! is the Witt transform of A022553 a[ n ] = 1/(6n) * sum over d|n of {mu(n/d) * (3d)! / d!^3} A006178 Witt vector *3!/3! is the Witt transform of A022553 a[ n ] = 1/(6n) * sum over d|n of {mu(n/d) * (3d)! / d!^3} A006179 Witt vector *4!/4! is the Witt transform of A029809 1/(24n) * sum over d|n of {mu(n/d) * (4d)! / d!^4}