Computing terms of A200544 and related sequences (http://oeis.org/A200544)