Have you generated the first few terms that fit your definition with its various restrictions, and seen if these are sequences already present in the OEIS? William Keith