Esthetic numbers: Difference between revisions

Content added Content deleted
m (J: eliminate useless rank specification)
Line 3,050: Line 3,050:
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.
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:
For example, we 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=: </./|:0 1,10 10#:(#~ isesthetic)10+i.90
<lang J>graph=: </./|:0 1,10 10#:(#~ isesthetic)10+i.90