An anomalous cancellation or accidental cancellation is a particular kind of arithmetic procedural error that gives a numerically correct answer. An attempt is made to reduce a fraction by cancelling individual digits in the numerator and denominator. This is not a legitimate operation, and does not in general give a correct answer, but in some rare cases the result is numerically the same as if a correct procedure had been applied. The trivial cases of cancelling trailing zeros or where all of the digits are equal are ignored.
Examples of anomalous cancellations which still produce the correct result include (these and their inverses are all the cases in base 10 with the fraction different from 1 and with two digits):
The article by Boas analyzes two-digit cases in bases other than base 10, e.g., = and its inverse are the only solutions in base 4 with two digits.
An example of anomalous cancellation with more than two digits is =, and an example with different numbers of digits is =.
When the base is prime, no two-digit solutions exist. This can be proven by contradiction: suppose a solution exists. Without loss of generality, we can say that this solution is
a||b | = | |
c||a |
b | |
c |
, {\rmbase} p,
where the double vertical line indicates digit concatenation. Thus, we have
ap+b | = | |
cp+a |
b | |
c |
\implies(a-b)cp=b(a-c)
But
p>a,b,a-c
p
p
b(a-c)
a=c
a=b
a=b
a||a | = | |
c||a |
a | |
c |
\implies
a||a | = | |
a||a |
a | |
a |
=1
Another property is that the numbers of solutions in a base
n
n
a||b | = | |
c||a |
b | |
c |
Then, doing the same manipulation, we get
an+b | = | |
cn+a |
b | |
c |
\implies(a-b)cn=b(a-c)
Suppose that
a>b,c
a,b,c\toa,a-c,a-b
(a-b)2n=b2
n
n=k2
ak=(k+1)b
k,(k+1)
a=(k+1)x,b=kx
a,b<k2
x=1,2,3,\ldots,k-1
n=k2
The question in a bit more generality was studied by Satvik Saha, Sohom Gupta, Sayan Dutta and Sourin Chatterjee.[1] The number of solutions in different bases are listed in OEIS A366412.