Java的8,169个 168 145字节
v->{byte[]a;for(int i=9,d,l;++i<1e9;System.out.print(l<1?i+"\n":""))for(a=(i+"").getBytes(),d=0,l=a.length;--l>0&&d*(d^(d=a[l]-a[l-1]))<1&d>0;);}
@Jacobinski C答案的端口(我打了一下球)。
-23个字节感谢@Nevay。
说明:
在这里尝试。(快结束时有点太慢,因此不会在TIO上打印最终号码。不过,它会在大约20秒内在本地打印最终号码。)
v->{ // Method with empty unused parameter and no return-type
byte[]a; // Byte-array
for(int i=9, // Index integer, starting at 9
d, // Difference-integer
l; // Length integer
++i<1e9; // Loop (1) from 10 to 1,000,000,000 (exclusive)
System.out.print( // After every iteration: print:
l<1? // If `l` is 0:
i+"\n" // The current integer + a new-line
: // Else:
"")) // Nothing
for(a=(i+"").getBytes(), // Convert the current item as String to a byte-array
d=0, // Reset the previous integer to 0
l=a.length; // Set `l` to the length of the byte-array
--l>0 // Inner loop (2) from `l-1` down to 0 (exclusive)
&&d*(d^(d=a[l]-a[l-1]))<1
// As long as the previous difference is either 0
// or the current diff is not equal to the previous diff
&d>0; // and the current diff is larger than 0
); // End of inner loop (2)
// End of loop (1) (implicit / single-line body)
} // End of method