Java 8, 169 168 145 bytes
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;);}
Port of @Jacobinski C answer (after I golfed it a bit).
-23 bytes thanks to @Nevay.
Explanation:
Try it here. (It's a bit too slow near the end, so doesn't print the final number on TIO. It prints the final number locally in about 20 seconds, though.)
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
8
This problem is from anarchy golf. You should give it credit (even if you were the one who submitted it)
– xnor – 2017-10-17T18:18:32.6005Do they have to be printed in order? – H.PWiz – 2017-10-17T18:22:14.447
Yes ascending order – 0x45 – 2017-10-17T19:57:49.510
11I submitted this problem on anagol :) – Lynn – 2017-10-17T20:46:41.413
2Why isn’t every integer 0≤n<100 on this list? – DonielF – 2017-10-17T21:26:26.567
3@DonielF Because the integer has to be larger than or equal to 12, and because the forward differences must be positive. – Dennis – 2017-10-17T21:29:00.653
1@DonielF difference <= 0 rules them out – FrownyFrog – 2017-10-17T23:42:02.960