sqrt2 = (1,1):[(2*n+d,n+d)|(d,n)<-sqrt2]
p057 = length.filter (f.snd).zip [..1000] $sqrt2
where f (x,y) = (length.show)x > (length.show) y

そのまんまですなぁ