#!/usr/bin/python3 from decimal import Decimal from itertools import count def calc(d): return int((-1 + (1+4*d)**.5) / 2) def correct(d): return int((-1 + (1+4*Decimal(str(d))).sqrt()) / 2) cnt = 0 for k in count(912345678): d = k*k + k - 1 if not 1 <= d <= 10**18: continue if calc(d) != correct(d): print(d) cnt += 1 if cnt == 100000: break