Dividing by full reptend primes

6 posts / 0 new
Last post
#1 5 November, 2017 - 04:17
Joined: 6 years 1 month ago

Dividing by full reptend primes

Many of us interested in mental calculation are familiar with the trick for dividing the numbers 1 through 6 by 7. You first memorize the sequence 142857. Depending on the number you’re dividing, you choose a new starting point, and repeat the sequence endlessly from there. For example, 4 divided by 7 is 0.57142857142857142857... and so on.

Numbers that have this quality are known as full reptend primes, and 7 isn’t the only one. The numbers 17, 19, 23, 29, 47, and more all work this same way. They all have a portion which endlessly repeats, and you use the same sequence, and just choose an appropriate starting point, based on the number you’re dividing.

They also have another interesting quality in common. The first half of the repeating segment, when added to the last half of the repeating segment, will give you a number consisting of all 9s. For example:

142 + 857 = 999

05882532 + 94117467 = 99999999

052631578 + 947368421 = 999999999

So, the first challenge for dividing by full reptend primes is memorizing the sequence, and the second challenge is figuring out where to start. The 9 feature described above helps when memorizing. If you can memorize the first half of the number, you can memorize, or at least work out, the second half of the number.

There are other subtle patterns that help, too. You can always find sub-segments of the repeating portion that are multiples of each other (because of the properties of full reptend primes. What do I mean?

14 doubles is 28, and that doubled is 56
The sequence for 7ths is 14 28 57, which is that sequence, but with a 1 added to the last number.

0588 times four is 2532
The sequence for 17ths is 0588 2532 9411 7647, which is that sequence for the first half, and the 9s complement for the rest.

05263 times three is 15789
The sequence for 19ths is 0 5263 1578 9 4736 8421, which is that sequence for the first half, and the 9s compliment for the rest.

So, patterns like these can help you memorize the sequences. More importantly for mental division, they can help you memorize these sequences as numbers themselves (as opposed to using mnemonics). Once you’ve memorized the patterns, though, how do you choose the right starting point?

Kinma, in earlier posts, has discussed the mental means of dividing by numbers ending in 9, and dividing by numbers ending in 1. I’ve written up the 9s version as Leapfrog Division and the 1s version as Leapfrog Division II.

For full reptend primes such as 19, 29, 59, and 61, This is easy enough, but what about the others? Think about these division problems as fractions with a numerator and a denominator. With a denominator of 17, you could multiply the numerator and denominator by 3, so you’re dividing by 51. Alternatively, you could multiply both parts by 7, so you’re dividing by 119.

All full reptend primes which don’t already end in a 1 or a 9 can be multiplied by 3 or 7 to scale them into a number when ends in 3 or 9. 23rds can be multiplied by 3 to be dealt with as 69ths. 47ths can be tripled to be dealt with as 141sts, and so on.

If you’ve memorized the sequences well enough, you only need to use these techniques to determine the first 2 digits. That’s enough information to identify the starting point, and you can continue the memorized pattern from there.

Let’s try an example with 19ths. What is 13/19? Working with the mental approach, we can quickly determine that the first two digits after the decimal point are 68. Recalling the sequence for 19ths, we can quickly from here that the answer should be 0.68421052631578947368...

Note that this approach can give you the first two digits slowly (because you’re calculating), and then give the rest quickly (because you’re recalling). This can be played as if your cakcaulating ability is speeding up as you go.

5 November, 2017 - 04:28
Joined: 6 years 1 month ago

There’s another approach that works well for determining the first two digits when dividing by a 1- or 2-digit full reptend prime, but it only works for those numbers which can be scaled to an integer from 95 to 105. So, this works for 17ths (which can be multiplied by 6 to becomes 102nds), 19ths (which can be multiplied by 5 to become 95ths), and 97ths, but it won’t work for the other full reptend primes.

The technique to which I’m referring is taught as Secrets of the Mathematical Ninja: Converting Awkward Fractions to Decimals. Even though it’s an estimation technique, it’s accurate enough to give you the first 2 decimals, which is all you need as your starting point.

5 November, 2017 - 10:19
Joined: 6 years 1 month ago

You can look at the inverse of all full reptend primes as being the sum of a geometric series:

r=0.14, a=0.02

r=0.0588, a=0.0004

r=0.05263, a=0.00003

r=0.043478, a=0.000006

8 November, 2017 - 06:05
Joined: 5 years 9 months ago

First of all, great set of posts, GM. love it!
Here are my thoughts on helping to remember the sequences..

greymatters wrote:


05263 times three is 15789

The sequence for 19ths is 0 5263 1578 9 4736 8421, which is that sequence for the first half, and the 9s compliment for the rest.

The starting sequence '5263' can be quickly generated using mental calculation. Because, like you say:

greymatters wrote:

19ths (which can be multiplied by 5 to become 95ths)

Using \( \dfrac{5}{100-5} \) we get:


For people new to this kind of calculation, if you start dividing 500 by 95, you can start dividing 500 by 100 (= 5R0) and then realize that 500/95 = 5r25. See my old posts about division if this makes no sense to you.
The next step is realizing that when you start with 5 and end with a remainder of 25 that each step is the previous one, times 5.
Realizing that, you can quickly generate 5, 25, 125, 625, etc.

Also, with \( \dfrac{1}{17} = \dfrac{6}{100 + 2} \)

+ ...
- ...


9 November, 2017 - 10:01
Joined: 6 years 1 month ago

Thanks, Kinma! I love the addition and subtraction approach!

Here's some more intriguing links:
Cycles of Digits (PDF)
A Cyclic Number Loop

In these numbers, finding the starting point is one of the important parts. Inspired by this discussion and this video, I've come across a rather interesting way to find the starting point.

First, let's start with full reptend primes ending in 9, such as 19, 29, and 59. The first step in finding the starting point is simply by looking at the units digit of the numerator (or dividend, depending on how you're thinking about this). So, if you're working with 12/19, then 12 is the numerator, and the units digit of the numerator is 2. This tells us that the answer will start at a digit after a 2.

In our example case, there's a problem. The sequence for 19ths is 052631578947368421, and that means the starting digit could be a 6 (note the 26 just after the 5) or it could be a 1 (note the 21 at the end!). How do we solve this problem?

Well, there's 2 ways to solve this. The first is consider the size of the division problem. 12/19 is obviously over 1/2, so have an answer that starts with 0.1 doesn't make any sense. Having the fraction start at 0.6 makes much more sense. Therefore, 12/19 must be 0.63157894736821052... and so on.

The other way is to use the trick for dividing by numbers ending in 9 to get the second digit (so you only use this once!), as discussed in Kinma's posts on this board, and on my blog here. Since we're talking about 19ths in this example, you'd divide the numerator by 2. For 29ths, you'd divide the numerator by 3, and for 59ths, you'd divide the numerator by 6.

So, with 12/19, we know the starting number of the fraction will come after a 2, but we want to know the next digit. In this approach, we divide 12 by 2 to get 6 (don't worry about any remainders). This tells us that the starting digit will be the 6 that follows a 2. Once again, we get 0.63157894736821052... as our answer.

This is great, but what about divisors that don't end in 9? For those, you have to determine what number you can multiply by, so as to get a denominator ending in 9.

For 7ths, you should multiply by 7, scaling the problem up to 49ths (Note that this approach is used in this video).

For 17ths, you also multiply by 7, so that you're working with 119ths.

For 23rds, multiply by 3, so you're dealing with 69ths.

For 47, you must multiply by 7, and you'll be dealing with 329ths.

For 61, you must multiply by 9 to work with 549ths.

For 97, you'll have to multiply by 7 to get 679ths.

20 November, 2017 - 05:58
Joined: 5 years 9 months ago

Grey Matters I have got a treat for you; I think.
You wrote:


For 97, you'll have to multiply by 7 to get 679ths.

This seems complicated. For me, division by 97 is a lot easier compared to division by 679. If you do your excellent Leapfrog, then you still have to divide by 68.

How about we do the Leapfrog using 97 directly?
In Leapfrog, if it were division by 99 we would use division by 10, so let's do this now as well.
However; since 100-99 equals 1 and 100-97 equals 3 we have to introduce a factor of three at some point (and sometimes a carry).

Let's take 13/97 using division by 10:
13/10 = 1r3

Now to calculate the remainder we do the usual leapfrog of the remainder 3 (becoming the tens digit) and concatenate 3 times the 1. 3 times 1 = 3 giving us 33.

33/10 = 3r3

Again, the remainder of 3 leapfrogs to the front as the tens digit and the 3 (times 3 equaling 9) becomes the singles digit, giving 39.

Answer so far: 133 r 39.

39/10 = 3r9
The remainder of 9 leapfrogs to the front as the tens digit and the 3 (times 3 equaling 9) becomes the singles digit, giving 99.

Now we need to introduce an extra step. 99 is bigger than 97, so we can lower the remainder and add one to the answer. In other words: 3 with a remainder of 99 equals 4 with a remainder of 2.

2/10 = 0r2

Answer so far: 1340 r 2

20/10 = 2r0 => leapfrog => factor 3 gives a remainder of 6.
Answer so far: 1340 r 6

60/10 = 6r0 => 6r18
Answer so far: 13406 r 18

18/10 = 1 r 8 => 1r83
Answer so far: 134061 r 83

83/10 = 8r3.
Here we need to pay special attention. The 3 leapfrogs to the tens digit. 8x3 = 24. 24.
So we get: 3[24]. We carry the 2 and get: 54.
Answer so far: 1340618 r 54

54/10 = 5r4 => 4[15] = 55
Answer so far: 13406185 r 55

55/10 = 5r5 => 5[15] = 65
Answer so far: 134061855 r 65

65/10 = 6r5 => 5[18] = 68
Answer so far: 1340618556 r 68

68/10 = 6r8 => 8[18] = 98. 6r98 = 7r1

Answer so far: 13406185567 r 1

Download our free ebook! Just click the "Sign up" button below to create an account, and we'll send you a free ebook with tips on how to get started.

Related content: