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.