Lots of remainder 1s

13 n \frac{13}n has a remainder of 1 for 5 of the 13 integers n n from 1 to 13.

What is the smallest integer a a such that a n \frac an has remainder 1 for exactly 6 of the a a integers n n from 1 to a ? a?


The answer is 65.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

1 solution

Scott Farrar
Sep 19, 2017

13/n having remainder 1 is equivalent to 13 = 1 mod n.

As we see in the gif,

  • 13 = 1 mod 2
  • 13 = 1 mod 3
  • 13 = 1 mod 4
  • 13 = 1 mod 6
  • 13 = 1 mod 12

We may notice that for each n in our range, 13 = 1 mod n implies 12 = 0 mod n.
More generally, for each n and a, a = 1 mod n implies (a-1) = 0 mod n.

Each of the instances of remainder 1s correspond to a divisor of 12, and we further cover all divisors of 12, except for "1".
For example, 13/6 has remainder 1 if and only if 12/6 has remainder 0, but while 12/1 has remainder 0, 13/1 does not have remainder 1 due to the special nature of dividing by 1.

#(Remainder 1s of a) = #(divisors of (a-1)) - 1
The number of instances of remainder 1 of a is equal to the number of divisors of (a-1) minus 1, since the divisor of 1 itself does not count.

Thus, as we are looking for a number with six instances of "remainder 1" we can equivalently look for the smallest number with seven divisors. This unfortunately is not easy, however we may shorten our search by noting a special case: The number of divisors is odd if and only if the number is square. Since if a = b*c then both b and c are divisors, adding 2 to the count. however if b = c, only one gets added to the count.

We use brute force to test square numbers until we hit 7 divisors.

  • 4 has 3 divisors
  • 9 has 3 divisors
  • 16 has 5 divisors
  • 25 has 3 divisors
  • 36 has 9 divisors
  • 49 has 3 divisors
  • 64 has 7 divisors

Thus 65 /n will have six instances of remainder 1.

(note, we also found 17 and 37 as the lowest numbers having 4 remainder 1s and 8 remainder 1s, respectively)

What program did you use in the gif?

Thành Đạt Lê - 3 years, 8 months ago

Log in to reply

This comes from a prototype I worked on, see the report here: https://www.khanacademy.org/research/reports/cantor

Scott Farrar - 3 years, 8 months ago

You can get it faster. For a number N = Prod( p i^k i ), where p i are primes, the number of divisors is Prod( (k i+1) ). As 7 is prime, only one prime p_i exists. Among all numbers p^(7-1), the smallest is 2^6 = 64.

Andrey Zharkikh - 3 years, 8 months ago

Not a mathematician in any sense, but what about 31 Mods 2, 3, 5, 6, 10, 15 Thanks

Carl Cullum - 3 years, 8 months ago

Log in to reply

You forgot 30: 31 mod 30 = 1

Andrey Zharkikh - 3 years, 8 months ago

25 mods 2,3,4,6,12,24...?

Francis Kong - 3 years, 7 months ago

Log in to reply

My mistake: the problem was intended to ask for a number with "exactly 6" cases of remainder 1.

25 is correct for "at least 6".

Scott Farrar - 3 years, 6 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...