OK Don. I finally understood: the elements b_i are >2 only if p_i=7 mod 8... Sorry, that is really easy. Also thank you for the twin "glitches" in the ~A sequence. My program was not efficient enough to find them. Anyway, it looks that you found these sequences somewhat interesting.... Ferenc