#iterator #binary #pattern #evil-numbers

thue_morse

A library for generating Thue-Morse number sequences for different bases. You can also specifically create evil numbers and odious numbers.

1 unstable release

Uses new Rust 2024

0.1.1 Mar 19, 2025
0.1.0 Mar 19, 2025

#605 in Math

Download history 244/week @ 2025-03-19 2/week @ 2025-03-26

246 downloads per month

MIT/Apache

10KB
229 lines

thue_morse

A library for calculating the Thue-Morse sequence number given a specific index. You can also specifically create evil numbers and odious numbers.

Usage

Create a ThueMorseProvider for a specific base and then a ThueMorseIterator can be created from that instance using the into_iter function. Create an EvilNumberIterator or OdiousNumberIterator instance to generate evil numbers or odious numbers respectively.

No runtime deps