Sunday 17 March 2024

Triple Seven


Triple seven is often associated with a jackpot when it comes up while playing on poker machines so it's interesting to note when this frequency of sevens occurs in numbers associated with my diurnal age. Today I turned 27377 days old:

How many numbers are there, up to one million let's say, with the property that:
  • their digits must contain three 7s
  • the number itself is divisible by 7
  • the other prime factors have digit sums that are divisible by 7
It turns out that there are only 69 such numbers and they are (permalink):

27377, 28777, 67277, 72737, 77357, 77791, 77917, 79177, 154777, 157787, 172277, 177527, 179767, 197477, 227717, 272797, 280777, 287077, 329777, 347767, 367577, 373877, 447727, 448777, 455777, 477673, 507577, 507787, 644777, 677761, 702737, 702877, 706727, 707791, 717227, 717731, 717857, 720377, 726677, 727517, 727783, 732977, 736757, 737387, 737597, 757379, 760277, 764477, 767473, 770273, 771547, 772037, 774557, 776447, 777091, 777203, 777833, 778337, 779107, 782747, 785771, 791077, 827477, 879277, 896777, 917077, 917707, 977137, 977879

The number associated with my diurnal age, 27377, just happens to be the first of them. I won't list the factorisation of all of the above numbers but I will list those up to 100,000:
  • \(27377 = 7 \times 3911\)
  • \(28777 = 7 \times 4111\)
  • \(67277 = 7^2 \times 1373\)
  • \(72737 = 7 \times 10391\)
  • \(77357 = 7 \times 43 \times 257\)
  • \(77791 = 7 \times 11113\)
  • \(77917 = 7 \times 11131\)
  • \(79177 = 7\times 11311\)
There are variations possible of course. One could simply require that the number contain three 7s and be divisible by 7. In this case, there are 2070 such numbers in the range up to one million with the smallest of them being 777 and the largest of them being 997787 (permalink). 

Alternatively, we look for numbers containing four 7s instead of three. In this case there are only nine such numbers in the range up to one million and they are 772177, 777217, 777721, 777847, 777973, 778477, 784777, 875777 and 977767 (permalink).

While my focus began with the digit 7 and its threefold repetition within a number, it's easy to modify the earlier algorithm so that it tests for the digit 5. In this case the constraints on the numbers are:
  • their digits must contain three 5s
  • the number itself is divisible by 5
  • the other prime factors have digit sums that are divisible by 5
In the range up to one million there are 426 such numbers, the first being 1555 and the last being 998555 (permalink). As with the 7s, the three 5s do no need to be sequential, although they are sequential in these two examples. Their details are as follows:$$ \begin{align} 1555 &= 5 \times 311 \\ 998555 &= 5 \times 41 \times 4871 \end{align}$$We can only test the digits 5 and 7 using this algorithm. The other prime factors cannot have digit sums that are divisible by 2, 3, 4, 6, 8 or 9 because then they would not be prime and the digits 0 and 1 are obviously excluded.

No comments:

Post a Comment