Esthetic numbers: Difference between revisions

m
Line 3,048:
(Result e not displayed here -- it's the same as <tt>next^:8]1</tt> below.)
 
But, it's much more efficient to generate sequences of digits from a base digit, rather than generating sequential integers and discarding those which are not suitable:.
 
For example, can generate a directed graph, from one digit to the one or two viable adjacent digits, and then build up a result based on all viable values of the rightmost digit of the current list of partially built candidates:
 
<lang J>graph=: </./|:/:~~.10 10#:(#~ isesthetic)100+i.900
6,962

edits