0
\$\begingroup\$

This question already has an answer here:

You should write a program or function which receives no input and outputs a stream of digits.

  • The stream should contain at least once every positive integer number which does not contain the digit sequence 42. E.g. The string 1231 contains the integers 1 12 123 1231 2 23 231 3 31 (and 1 again)

  • The stream should not contain the digit sequence 42.

  • If your interpreter can't handle infinite output gracefully you can add code to only print the first n digits. This added code does not count to your score.

  • Note that the stream 203204205... contains 42.

  • No randomness should be used.

This is code-golf so the shortest entry wins.

\$\endgroup\$

marked as duplicate by randomra, Fatalize code-golf Jan 19 '17 at 13:16

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • \$\begingroup\$ This is basically this with an additional substring check. \$\endgroup\$ – Fatalize Jan 19 '17 at 13:10
  • \$\begingroup\$ @Fatalize Right, now it seems too simple. I forgot that skipping the number is not a problem. \$\endgroup\$ – randomra Jan 19 '17 at 13:15