Postgresql Index Scan Vs Sequence And Pattern Math Solver