def islychrelnumber(n): p = n for i in range(50): rp = int(''.join(reversed(str(p)))) p = p+rp if ispalindrome(p): return False return True
#! /usr/bin/env python from eulerutils import ispalindrome print max(((x*y,x,y) for x in xrange(100,1000) for y in xrange(100,1000) if ispalindrome(x*y)))