## Teaser 2790: Factoidels

**From The Sunday Times, 13th March 2016** [link]

In order to introduce the class to “lowest common denominators”, Amelia’s teacher asked them to find the lowest number with the property that each of 1, 2, 3, 4 and 5 divided exactly into it. They correctly calculated the answer as 60, and the teacher called this the “factoidel” of 5. He went on to demonstrate that the factoidel of 6 was also 60. Being keen, Amelia investigated factoidels at home and then told the teacher that she had found the highest set of four consecutive numbers whose factoidels are all different (at least she had cleverly checked well into the billions).

What were those four consecutive numbers?

[teaser2790]

## Jim Randell 2:47 pm

on4 November 2019 Permalink |It’s easy enough to write a program that looks for sequences of 4 consecutive distinct “factoidels”. And this finds the supposed “largest” solution very quickly, but how do we know when to stop looking?

The sequence of “factoidels” is:

If we consider the ratio of consecutive terms:

then:

(See OEIS A014963) [ @oeis.org ]

To find 4 consecutive terms in

A[]that are all different, we need to find 3 consecutive terms inB[]that are non-unity. i.e. three consecutive integers that are powers of primes.So suppose the numbers we are looking for are:

(n, n + 1, n + 2).If

nis even, i.e.n = 2^k, then(n + 2)is also even, and must be a power of two:The only solution is

k = 1, (n, n + 1, n + 2) = (2, 3, 4), which give the following terms from the sequences:If

nis odd, thenn + 1 = 2^k.k = 1gives no sequence inB[].If

k = 2we have(n, n + 1, n + 2) = (3, 4, 5), which gives the following terms:If

k =3we have(n, n + 1, n + 2) = (7, 8, 9), which gives the following terms:In general for

k ≥ 4we have(n, n + 1, n + 2) = (2^k – 1, 2^k, 2^k + 1).Catalan’s Conjecture(now a proved theorem) [ @wikipedia.org ] tells us that the only two consecutive numbers that are non-trivial powers are 8 and 9, so there is only a solution if(2^k – 1)and(2^k + 1)are both primes (otherwise we have another consecutive pair of non-trivial powers).But all twin primes apart from (3, 5) are of the form

(6n – 1, 6n + 1), so we won’t find a larger solution no matter how far we go.Hence the three solutions found above are the only solutions, and it is sufficient to check up to

n = 9Run:[ @repl.it ]Solution:The four consecutive numbers are: 6, 7, 8, 9.Even without all the maths, computationally, with a simple prime test, we can very quickly (less than a second) verify that there are no twin primes of the form

(2^k ± 1)for2 < k ≤ 50. And this is certainly enough to replicate Amelia’s checks.LikeLike