sub f{ #23456789 123456789 123456789 123456789 123456789 123456789 $_=1x$_[0];for$n(1..sqrt$_[0]){m[^.{$n}.]g;s[\G(.{$n}).][${1}0]g;} } f(pop); ++$i and $1 and print $i while m[(.)]g;