table 7*ceil[n/7]+(n-1)+ceil[(1/3)*floor[3/n]](1-n) from 1 to 23