Fractions With Nontrivial Anomalous Cancellation

Fractions With Nontrivial Anomalous Cancellation

icarus
Dozens Demigod
icarus
Dozens Demigod
Joined: Apr 11 2006, 12:29 PM

Sep 13 2017, 09:00 PM #1

I was working on a sequence Neil Sloane wrote (OEIS A291094). This is a sequence that contains denominators of fractions thus. Let n and d be the numerator and the denominator of a fraction respectively such that I can "cancel" a digit D in both n and in d and have the result = n/d. Usually this doesn't work for obvious reasons. 14/48, cancelling the 4s does not leave us with 7/24 but instead with 1/8, which is why we don't cancel digits when we are trying to simplify fractions! Famously, decimal 16/64, cancelling the 6s, actually does work: it does equal 1/4 like it is "supposed to". This is called "anomalous cancellation."

There is a trivial condition, that is the cancellation of trailing zeros. This is discounted regarding what we're interested in.

This sequence ports nicely into the dozenal condition and it might entertain folks here recreationally. The decimal case 16/64 = 1/4 is famous meme-wise; in dozenal the meme would be 1b;/b6; = 1/6.

The Wolfram language (11.1) code I wrote follows.

Code: Select all

With[{b = 12}, 
  Apply[Join, 
   Parallelize@
    Table[Map[{#, m} &, #] &@
      Select[Range[b + 1, m - 1], 
       Function[k, 
        Function[{r, w, n, d}, 
             AnyTrue[
              Flatten@
               Map[Apply[Outer[Divide, #1, #2] &, #] &, 
                Transpose@
                 MapAt[# /. 0 -> Nothing &, 
                  Map[Function[x, 
                    Map[Map[FromDigits[#, b] &@ Delete[x, #] &, 
                    Position[x, #]] &, Intersection @@ {n, d}]], {n, 
                    d}], -1]], # == Divide @@ {k, m} &]] @@ {k/m, #, 
             First@ #, Last@ #} &@ Map[IntegerDigits[#, b] &, {k, m}] - 
         Boole[Mod[{k, m}, b] == {0, 0}]] ], {m, b, b^3}]]]
Here are the first gross/biqua of fractions that enjoy nontrivial anomalous cancellation.

Code: Select all

Dozenal fractions with nontrivial anomalous cancellation

All figures are dozenal after this sentence.

The trivial condition is that where N and D are both congruent to 0 (mod 10).

n = index.
N = Numerators of fractions with nontrivial anomalous cancellation.
D = Denominators of fractions with nontrivial anomalous cancellation.
    listed with multiplicity if multiple numerators are possible. 
r = ratio N/D

  n     N     D   r
-----------------------
  1    1b    b6   1/6  
  2    2b    b8   1/4  
  3    3b    b9   1/3  
  4    5b    ba   1/2  
  5    11   110   1/10 
  6    12   120   1/10 
  7    22   121   2/11 
  8    13   130   1/10 
  9    33   132   3/12 
  a    14   140   1/10 
  b    44   143   4/13 
 10    15   150   1/10 
 11    55   154   5/14 
 12    16   160   1/10 
 13    66   165   6/15 
 14    17   170   1/10 
 15    77   176   7/16 
 16    18   180   1/10 
 17    88   187   8/17 
 18    19   190   1/10 
 19    99   198   9/18 
 1a    1a   1a0   1/10 
 1b    aa   1a9   a/19 
 20    1b   1b0   1/10 
 21    b6   1b0   1/2  
 22    b7   1b2   1/2  
 23    2b   1b4   1/8  
 24    b8   1b4   1/2  
 25    3b   1b6   1/6  
 26    b9   1b6   1/2  
 27    5b   1b8   1/4  
 28    ba   1b8   1/2  
 29    7b   1b9   1/3  
 2a    bb   1ba   1/2  
 2b   101   202   1/2  
 30   102   204   1/2  
 31   103   206   1/2  
 32   104   208   1/2  
 33   105   20a   1/2  
 34    21   210   1/10 
 35    22   220   1/10 
 36   121   220   11/20
 37    23   230   1/10 
 38    33   231   3/21 
 39   132   231   12/21
 3a    24   240   1/10 
 3b    44   242   2/11 
 40   143   242   13/22
 41    25   250   1/10 
 42    55   253   5/23 
 43   154   253   14/23
 44    26   260   1/10 
 45    66   264   3/12 
 46   165   264   15/24
 47    27   270   1/10 
 48    77   275   7/25 
 49   176   275   16/25
 4a    28   280   1/10 
 4b    88   286   4/13 
 50   187   286   17/26
 51    29   290   1/10 
 52    99   297   9/27 
 53   198   297   18/27
 54    2a   2a0   1/10 
 55    aa   2a8   5/14 
 56   1a9   2a8   19/28
 57    2b   2b0   1/10 
 58    b8   2b0   1/3  
 59   1b4   2b0   2/3  
 5a    3b   2b3   1/9  
 5b    b9   2b3   1/3  
 60   1b6   2b3   2/3  
 61    5b   2b6   1/6  
 62    ba   2b6   1/3  
 63   1b8   2b6   2/3  
 64    8b   2b8   1/4  
 65    bb   2b9   1/3  
 66   1ba   2b9   2/3  
 67   15b   2ba   1/2  
 68   101   303   1/3  
 69   202   303   2/3  
 6a   102   306   1/3  
 6b   204   306   2/3  
 70   103   309   1/3  
 71   206   309   2/3  
 72    31   310   1/10 
 73    32   320   1/10 
 74    33   330   1/10 
 75   132   330   7/16 
 76   231   330   21/30
 77    34   340   1/10 
 78    44   341   4/31 
 79   143   341   13/31
 7a   242   341   22/31
 7b   139   346   7/16 
 80    35   350   1/10 
 81    55   352   5/32 
 82   154   352   8/17 
 83   253   352   23/32
 84    36   360   1/10 
 85    66   363   2/11 
 86   165   363   15/33
 87   264   363   24/33
 88    37   370   1/10 
 89    77   374   7/34 
 8a   176   374   9/18 
 8b   275   374   25/34
 90    38   380   1/10 
 91    88   385   8/35 
 92   187   385   17/35
 93   286   385   26/35
 94    39   390   1/10 
 95    99   396   3/12 
 96   198   396   a/19 
 97   297   396   27/36
 98    3a   3a0   1/10 
 99    aa   3a7   a/37 
 9a   1a9   3a7   19/37
 9b   2a8   3a7   28/37
 a0    3b   3b0   1/10 
 a1    b9   3b0   1/4  
 a2   1b6   3b0   1/2  
 a3   2b3   3b0   3/4  
 a4   1b7   3b2   1/2  
 a5    5b   3b4   1/8  
 a6    ba   3b4   1/4  
 a7   1b8   3b4   1/2  
 a8   2b6   3b4   3/4  
 a9    7b   3b6   1/6  
 aa   1b9   3b6   1/2  
 ab    bb   3b8   1/4  
 b0   1ba   3b8   1/2  
 b1   2b9   3b8   3/4  
 b2   13b   3b9   1/3  
 b3   1bb   3ba   1/2  
 b4   201   402   1/2  
 b5   101   404   1/4  
 b6   202   404   1/2  
 b7   303   404   3/4  
 b8   203   406   1/2  
 b9   102   408   1/4  
 ba   204   408   1/2  
 bb   306   408   3/4  
100   205   40a   1/2  
Quote
Like
Share

Double sharp
Dozens Demigod
Double sharp
Dozens Demigod
Joined: Sep 19 2015, 11:02 AM

Sep 14 2017, 02:49 PM #2

In the two-digit case, we are looking for solutions to (xb + y)/(zb + x) = y/z. As MathWorld notes, every proper divisor of the base b corresponds to one solution (and so prime bases have no solutions).

In the dozenal case, omega is prime, and so the divisor solutions (1b/b6 = 1/6, 2b/b8 = 1/4, 3b/b9 = 1/3, 5b/ba = 1/2) are the only solutions. In decimal, omega is composite, so while solutions do come this way (19/95 = 1/5, 49/95 = 1/2) they are not the only ones (16/64 = 1/4, 26/65 = 2/5). There are always an even number of solutions, unless the base is an even square (like 4, 16, or 36).
Quote
Like
Share

icarus
Dozens Demigod
icarus
Dozens Demigod
Joined: Apr 11 2006, 12:29 PM

Sep 14 2017, 03:29 PM #3

Precisely!

I have contributed the sequence that notes the smallest denominator d with an anomalous proper cancellation (OEIS A292289). Still have to finish the edit (b-file and chart). I will do the numerator this afternoon and have all cases for bases 2 <= b <= 120, generated overnight. Right now I am working on the number of denominators b < d <= b^2 + b (since primes p have smallest anomalous cancellation proper fraction "11/110" thus (p + 1)/(p^2 + p) = "1/10" = 1/p). From this I can sort how many two base-b digit proper anomalous fractions there are. I have a table similar to the one I am posting here that I will add to A292289 and A292288 once this data is done; it might take a day to generate despite parallelizing the function.

This is not the final document: the final will have 120 terms and the number of d < b^2 (two-digit proper fractions) and d <= b^2 + b.

Code: Select all

Least numerator of the proper fraction having the smallest denominator 
that has a nontrivial anomalous cancellation in base b >= 2.

A trivial anomalous cancellation involves digit k = 0 for numerator n and denominator d
both such that they are congruent to 0 &#40;mod b&#41;.

b = base and index
n = A292288&#40;b&#41; = smallest numerator that pertains to d
d = A292289&#40;b&#41; = smallest denominator that has a nontrivial anomalous cancellation in base b
n/d = simplified ratio of numerator n and denominator d. 
k = base-b digit cancelled in the numerator and denominator to arrive at n/d
b-n+1 = difference between base and numerator plus one.
b^2-d = difference between the square of the base and denominator.

 &nbsp;b &nbsp; &nbsp; n &nbsp; &nbsp; &nbsp; d &nbsp; n/d &nbsp; &nbsp; &nbsp; k &nbsp; b-n+1 &nbsp; b^2-d
-----------------------------------------------
 &nbsp;2 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p; 1/11 &nbsp; &nbsp; &nbsp;1 &nbsp; &nbsp; 0 &nbsp; &nbsp; -11
 12 &nbsp; &nbsp;23 &nbsp; &nbsp; 138 &nbsp; 1/6 &nbsp; &nbsp; &nbsp;11 &nbsp; &nbsp;10 &nbsp; &nbsp; &nbsp; 6
 13 &nbsp; &nbsp;14 &nbsp; &nbsp; 182 &nbsp; 1/13 &nbsp; &nbsp; &nbsp;1 &nbsp; &nbsp; 0 &nbsp; &nbsp; -13
 14 &nbsp; &nbsp;27 &nbsp; &nbsp; 189 &nbsp; 1/7 &nbsp; &nbsp; &nbsp;13 &nbsp; &nbsp;12 &nbsp; &nbsp; &nbsp; 7
 15 &nbsp; &nbsp;22 &nbsp; &nbsp; 110 &nbsp; 1/5 &nbsp; &nbsp; &nbsp; 7 &nbsp; &nbsp; 6 &nbsp; &nbsp; 115
 16 &nbsp; &nbsp;21 &nbsp; &nbsp; &nbsp;84 &nbsp; 1/4 &nbsp; &nbsp; &nbsp; 5 &nbsp; &nbsp; 4 &nbsp; &nbsp; 172
 17 &nbsp; &nbsp;18 &nbsp; &nbsp; 306 &nbsp; 1/17 &nbsp; &nbsp; &nbsp;1 &nbsp; &nbsp; 0 &nbsp; &nbsp; -17
 18 &nbsp; &nbsp;35 &nbsp; &nbsp; 315 &nbsp; 1/9 &nbsp; &nbsp; &nbsp;17 &nbsp; &nbsp;16 &nbsp; &nbsp; &nbsp; 9
 19 &nbsp; &nbsp;20 &nbsp; &nbsp; 380 &nbsp; 1/19 &nbsp; &nbsp; &nbsp;1 &nbsp; &nbsp; 0 &nbsp; &nbsp; -19
 20 &nbsp; &nbsp;39 &nbsp; &nbsp; 390 &nbsp; 1/10 &nbsp; &nbsp; 19 &nbsp; &nbsp;18 &nbsp; &nbsp; &nbsp;10
 21 &nbsp; &nbsp;29 &nbsp; &nbsp; 174 &nbsp; 1/6 &nbsp; &nbsp; &nbsp; 8 &nbsp; &nbsp; 7 &nbsp; &nbsp; 267
 22 &nbsp; &nbsp;34 &nbsp; &nbsp; 272 &nbsp; 1/8 &nbsp; &nbsp; &nbsp;12 &nbsp; &nbsp;11 &nbsp; &nbsp; 212
 23 &nbsp; &nbsp;24 &nbsp; &nbsp; 552 &nbsp; 1/23 &nbsp; &nbsp; &nbsp;1 &nbsp; &nbsp; 0 &nbsp; &nbsp; -23
 24 &nbsp; &nbsp;47 &nbsp; &nbsp; 564 &nbsp; 1/12 &nbsp; &nbsp; 23 &nbsp; &nbsp;22 &nbsp; &nbsp; &nbsp;12
 25 &nbsp; &nbsp;31 &nbsp; &nbsp; 155 &nbsp; 1/5 &nbsp; &nbsp; &nbsp; 6 &nbsp; &nbsp; 5 &nbsp; &nbsp; 470
 26 &nbsp; &nbsp;67 &nbsp; &nbsp; 402 &nbsp; 1/6 &nbsp; &nbsp; &nbsp;15 &nbsp; &nbsp;40 &nbsp; &nbsp; 274
 27 &nbsp; &nbsp;40 &nbsp; &nbsp; 360 &nbsp; 1/9 &nbsp; &nbsp; &nbsp;13 &nbsp; &nbsp;12 &nbsp; &nbsp; 369
 28 &nbsp; &nbsp;37 &nbsp; &nbsp; 259 &nbsp; 1/7 &nbsp; &nbsp; &nbsp; 9 &nbsp; &nbsp; 8 &nbsp; &nbsp; 525
 29 &nbsp; &nbsp;30 &nbsp; &nbsp; 870 &nbsp; 1/29 &nbsp; &nbsp; &nbsp;1 &nbsp; &nbsp; 0 &nbsp; &nbsp; -29
 30 &nbsp; &nbsp;59 &nbsp; &nbsp; 885 &nbsp; 1/15 &nbsp; &nbsp; 29 &nbsp; &nbsp;28 &nbsp; &nbsp; &nbsp;15
 31 &nbsp; &nbsp;32 &nbsp; &nbsp; 992 &nbsp; 1/31 &nbsp; &nbsp; &nbsp;1 &nbsp; &nbsp; 0 &nbsp; &nbsp; -31
 32 &nbsp; &nbsp;63 &nbsp; &nbsp;1008 &nbsp; 1/16 &nbsp; &nbsp; 31 &nbsp; &nbsp;30 &nbsp; &nbsp; &nbsp;16
 33 &nbsp; &nbsp;45 &nbsp; &nbsp; 405 &nbsp; 1/9 &nbsp; &nbsp; &nbsp;12 &nbsp; &nbsp;11 &nbsp; &nbsp; 684
 34 &nbsp; &nbsp;52 &nbsp; &nbsp; 624 &nbsp; 1/12 &nbsp; &nbsp; 18 &nbsp; &nbsp;17 &nbsp; &nbsp; 532
 35 &nbsp; &nbsp;87 &nbsp; &nbsp; 609 &nbsp; 1/7 &nbsp; &nbsp; &nbsp;17 &nbsp; &nbsp;51 &nbsp; &nbsp; 616
 36 &nbsp; &nbsp;43 &nbsp; &nbsp; 258 &nbsp; 1/6 &nbsp; &nbsp; &nbsp; 7 &nbsp; &nbsp; 6 &nbsp; &nbsp;1038
 37 &nbsp; &nbsp;38 &nbsp; &nbsp;1406 &nbsp; 1/37 &nbsp; &nbsp; &nbsp;1 &nbsp; &nbsp; 0 &nbsp; &nbsp; -37
 38 &nbsp; &nbsp;75 &nbsp; &nbsp;1425 &nbsp; 1/19 &nbsp; &nbsp; 37 &nbsp; &nbsp;36 &nbsp; &nbsp; &nbsp;19
 39 &nbsp; &nbsp;58 &nbsp; &nbsp; 754 &nbsp; 1/13 &nbsp; &nbsp; 19 &nbsp; &nbsp;18 &nbsp; &nbsp; 767
 40 &nbsp; &nbsp;53 &nbsp; &nbsp; 530 &nbsp; 1/10 &nbsp; &nbsp; 13 &nbsp; &nbsp;12 &nbsp; &nbsp;1070
 41 &nbsp; &nbsp;42 &nbsp; &nbsp;1722 &nbsp; 1/41 &nbsp; &nbsp; &nbsp;1 &nbsp; &nbsp; 0 &nbsp; &nbsp; -41
 42 &nbsp; &nbsp;83 &nbsp; &nbsp;1743 &nbsp; 1/21 &nbsp; &nbsp; 41 &nbsp; &nbsp;40 &nbsp; &nbsp; &nbsp;21
 43 &nbsp; &nbsp;44 &nbsp; &nbsp;1892 &nbsp; 1/43 &nbsp; &nbsp; &nbsp;1 &nbsp; &nbsp; 0 &nbsp; &nbsp; -43
 44 &nbsp; &nbsp;87 &nbsp; &nbsp;1914 &nbsp; 1/22 &nbsp; &nbsp; 43 &nbsp; &nbsp;42 &nbsp; &nbsp; &nbsp;22
 45 &nbsp; &nbsp;56 &nbsp; &nbsp; 504 &nbsp; 1/9 &nbsp; &nbsp; &nbsp;11 &nbsp; &nbsp;10 &nbsp; &nbsp;1521
 46 &nbsp; &nbsp;70 &nbsp; &nbsp;1120 &nbsp; 1/16 &nbsp; &nbsp; 24 &nbsp; &nbsp;23 &nbsp; &nbsp; 996
 47 &nbsp; &nbsp;48 &nbsp; &nbsp;2256 &nbsp; 1/47 &nbsp; &nbsp; &nbsp;1 &nbsp; &nbsp; 0 &nbsp; &nbsp; -47
 48 &nbsp; &nbsp;95 &nbsp; &nbsp;2280 &nbsp; 1/24 &nbsp; &nbsp; 47 &nbsp; &nbsp;46 &nbsp; &nbsp; &nbsp;24
 49 &nbsp; &nbsp;57 &nbsp; &nbsp; 399 &nbsp; 1/7 &nbsp; &nbsp; &nbsp; 8 &nbsp; &nbsp; 7 &nbsp; &nbsp;2002
 50 &nbsp; &nbsp;71 &nbsp; &nbsp;1065 &nbsp; 1/15 &nbsp; &nbsp; 21 &nbsp; &nbsp;20 &nbsp; &nbsp;1435
 51 &nbsp; 122 &nbsp; &nbsp;1037 &nbsp; 2/17 &nbsp; &nbsp; 20 &nbsp; &nbsp;70 &nbsp; &nbsp;1564
 52 &nbsp; &nbsp;69 &nbsp; &nbsp; 897 &nbsp; 1/13 &nbsp; &nbsp; 17 &nbsp; &nbsp;16 &nbsp; &nbsp;1807
 53 &nbsp; &nbsp;54 &nbsp; &nbsp;2862 &nbsp; 1/53 &nbsp; &nbsp; &nbsp;1 &nbsp; &nbsp; 0 &nbsp; &nbsp; -53
 54 &nbsp; 107 &nbsp; &nbsp;2889 &nbsp; 1/27 &nbsp; &nbsp; 53 &nbsp; &nbsp;52 &nbsp; &nbsp; &nbsp;27
 55 &nbsp; &nbsp;67 &nbsp; &nbsp; 670 &nbsp; 1/10 &nbsp; &nbsp; 12 &nbsp; &nbsp;11 &nbsp; &nbsp;2355
 56 &nbsp; &nbsp;71 &nbsp; &nbsp; 852 &nbsp; 1/12 &nbsp; &nbsp; 15 &nbsp; &nbsp;14 &nbsp; &nbsp;2284
 57 &nbsp; &nbsp;77 &nbsp; &nbsp;1155 &nbsp; 1/15 &nbsp; &nbsp; 20 &nbsp; &nbsp;19 &nbsp; &nbsp;2094
 58 &nbsp; &nbsp;88 &nbsp; &nbsp;1760 &nbsp; 1/20 &nbsp; &nbsp; 30 &nbsp; &nbsp;29 &nbsp; &nbsp;1604
 59 &nbsp; &nbsp;60 &nbsp; &nbsp;3540 &nbsp; 1/59 &nbsp; &nbsp; &nbsp;1 &nbsp; &nbsp; 0 &nbsp; &nbsp; -59
 60 &nbsp; 119 &nbsp; &nbsp;3570 &nbsp; 1/30 &nbsp; &nbsp; 59 &nbsp; &nbsp;58 &nbsp; &nbsp; &nbsp;30

Observations&#58;
1. For prime base p, &#40;p + 1&#41;/&#40;p^2 + p&#41; simplifies to 1/p by cancelling digit k = 1 
 &nbsp; in the numerator and denominator.
2. Smallest base b for which n/d, simplified, has a numerator greater than 1 is 51.
 &nbsp; The next terms are 77 and 92.
Quote
Like
Share