Re:A happy numeric coincidence
by kazinator on Wednesday January 02, 2019 @05:57PM
(#18811162)
TXR lisp:
[ Parent
| on HN ]
Using successive multiplication instead of exponent operation:
6> (each ((x (range 2 1000)))
(each ((y (range 1 100)) ;; needed just for the put-line
(z [giterate true (op * x) x]))
(when (= x (sum (digits z)))
(put-line `@x @y`))))
(Makes no difference; run time is vastly dominated by the contribution of the (sum (digits z)) business.)