diff options
| author | Adrien Hopkins <adrien.p.hopkins@gmail.com> | 2023-09-04 18:51:26 -0500 |
|---|---|---|
| committer | Adrien Hopkins <adrien.p.hopkins@gmail.com> | 2023-09-04 18:54:13 -0500 |
| commit | a663fa77cde6ad48f29abd6973211c179ff32464 (patch) | |
| tree | 757345be6e80e5742d4fe63dd6ebf5b7d66f7a08 /factors/digit_map.go | |
| parent | 5978972b06fb5e29723e4bab61bdfee74b42b126 (diff) | |
Increase detail of digit map neighbours
It now distinguishes between omega (factors of r - 1), alpha (factors of
r + 1) and the rest. The previous categorization determined whether or
not totatives and semitotatives have simple patterns; this new
categorization determines which simple patterns they follow)
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 } |
