formula to get common difference - Search