diff options
Diffstat (limited to 'factors/digit_map.go')
| -rw-r--r-- | factors/digit_map.go | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/factors/digit_map.go b/factors/digit_map.go index e78cce0..db562db 100644 --- a/factors/digit_map.go +++ b/factors/digit_map.go @@ -12,9 +12,18 @@ type TotativeType uint8 const ( // This number does not have any totative factors Regular TotativeType = iota + // This number's totative part is divisible by (r - 1) + // - this gives it the simplest possible decimal expansion + // for a non-regular (1 digit repeating) and a simple divisibility + // test (sum digits, like 3 or 9 in decimal) + Omega + // This number's totative part is divisible by (r + 1) + // - this makes it slightly more complicated than omega + Alpha // This number's totative part is divisible by (r^2 - 1) - // - this makes it easier to work with - Neighbour + // but not (r + 1) or (r - 1) + // - these totatives straddle the line between simple and complex + Pseudoneighbour // This number's totative part is not divisible by (r^2 - 1) // - it will not be nice to work with Opaque @@ -56,7 +65,11 @@ func (dt DigitType) String() string { tString = "0" case Regular: tString = "R" - case Neighbour: + case Omega: + tString = "ω" + case Alpha: + tString = "α" + case Pseudoneighbour: tString = "N" case Opaque: tString = "P" @@ -100,8 +113,12 @@ func calcTotativeType(totative, radix uint) TotativeType { return Zero case totative == 1: return Regular + case (radix-1)%totative == 0: + return Omega + case (radix+1)%totative == 0: + return Alpha case (radix*radix-1)%totative == 0: - return Neighbour + return Pseudoneighbour default: return Opaque } |
