http://list.seqfan.eu/pipermail/seqfan/2010-May/004656.html We considered the pairs d(m)=a, d(m+1)=a in A161460. To some degree this is unfinished business, as documented in the PDF file linked to, so I am hesitant to enter into the territory of the very general d(m)= a, d(m+1) = something else . RJM