Esthetic numbers: Difference between revisions

Content added Content deleted
m (J: more efficient implementation of stretch goal.)
Line 3,048: Line 3,048:
(Result e not displayed here -- it's the same as <tt>next^:8]1</tt> below.)
(Result e not displayed here -- it's the same as <tt>next^:8]1</tt> below.)


But, it's much more efficient to generating sequences of digits from a base digit, rather than generating sequential integers discarding those which are not suitable:
But, it's much more efficient to generate sequences of digits from a base digit, rather than generating sequential integers discarding those which are not suitable:


<lang J>graph=: </./|:/:~~.10 10#:(#~ isesthetic)100+i.900
<lang J>graph=: </./|:/:~~.10 10#:(#~ isesthetic)100+i.900