implementation of OEIS sequences