Mario: Check Neil Sloane’s sequence A006862. It contains several references which you may find helpful. Best, Harvey