Divisor 21871

Prime Number:
Yes!
Divisibility test:
The "Allan Test"
Test Discovered by:
Matt Parker
Date:
11/11/2024

The "Allan Test" for Divisibility by 21871

To determine if any number is divisible by 21871, apply the "Allan Test":

  1. If your number ("X") has 8 digits or more, separate the last (smallest) 7 digits from the rest. This makes two smaller numbers, call them Left and Right (note: don't add in trailing zeros to L). If there are fewer than 8 digits, L = 0 and therefore R = X.
  2. Multiply L by 4953 and add to R.
  3. Take that result and cross off its final digit (units). Take this new number and subtract 2187 times the digit you just crossed off. Call this final result "Y".
  4. Y will be much smaller than X, but we have preserved divisibility by 21871. That is, your original number is divisible by 21871 if (and only if) Y is. Now that it's much smaller, with basic knowledge of your 21871-times tables, it should be easy to visually see if Y is divisible by 21871. If the Y is still much larger than 21871, the above process can be repeated until it does reduce to within small multiples of 21871.

Easy!