Skip to main content
3 of 3
deleted 109 characters in body
user41805
  • 13.2k
  • 6
  • 42
  • 88

APL (Dyalog), 3 bytes

2|⍴

Try it online! (the test suite generates a range of numbers from 1 to 10000, converts them to a string, and then applies the train 2|⍴ on them).

Takes the input number as a string and returns its length mod 2. So 123 => 3 mod 2 => 1.

The sequence starts off like so:

1  1  1  1  1  1  1  1  1  0  0  0  0  0  0  ...

so this can be generalised like so: 9 1s 90 0s 900 1s ...

Multiplying this number by 9 gives us a Liouville number, which is proven to be transcendental.

user41805
  • 13.2k
  • 6
  • 42
  • 88