# Primary Bulb
The child bulb of the period 1 cardioid at internal angle pq has external angles:
(.¯b0b1…bq−301,.¯b0b1…bq−310)
where
b0b1…=map(∈(1−pq,1))∘iterate(+pq)$pq
# 1 Haskell Code
import Data.Fixed (mod')
import Data.List (genericTake)
import Data.Ratio (denominator)
type InternalAngle = Rational
type ExternalAngle = ([Bool], [Bool])
primaryBulb
:: InternalAngle
-> (ExternalAngle, ExternalAngle)
primaryBulb pq
= ( ([], bs ++ [False, True])
, ([], bs ++ [True, False])
)
where
q = denominator pq
bs
= genericTake (q - 2)
. map (\x -> 1 - pq < x && x < 1)
. iterate (\x -> (x + pq) `mod'` 1)
$ pq
# 2 Examples
Consider the bulb at internal angle pq=25:
r0=25∉(1−25,1)∴
Therefore the external angles for the \frac{2}{5} bulb are:
\left( .\overline{01001}, .\overline{01010} \right)