Showing posts with label 3. Show all posts
Showing posts with label 3. Show all posts

Wednesday, 8 April 2026

Average of Three Primes Squared

The number associated with my diurnal age today is 28129 and it is a member of OEIS A075893:


     A075893: average of three successive primes squared with \(n > 3\) 
   
             
    \( \dfrac{\text{prime} (n)^2+ \text{prime}(n+1)^2+\text{prime}(n+2)^2)}{3}\)

The initial terms are:

65, 113, 193, 273, 393, 577, 777, 1057, 1337, 1633, 1913, 2289, 2833, 3337, 3897, 4417, 4953, 5537, 6153, 7017, 8073, 9177, 10073, 10753, 11313, 12033, 13593, 15353, 17353, 18417, 20097, 21441, 23217, 24673, 26369, 28129, 29953, 31577, 33761, 35497, 37513, 38553

The OEIS comments state that:

Unlike the average of three successive primes, the average of three successive primes (greater than 3) squared is always integral.

I asked Gemini why this was so:

The reason the average of the squares of three successive primes (greater than 3) is always an integer is based on a fascinating pattern about how primes behave when divided by 3.

In fact, this rule doesn't just apply to successive primes—it applies to any three primes greater than 3. Here is the step-by-step mathematical breakdown of why this happens.

1. All Primes Greater Than 3 Avoid Multiples of 3

By definition, a prime number is only divisible by 1 and itself. This means that any prime number strictly greater than 3 cannot be a multiple of 3.

If we divide any number by 3, we can only ever get one of three possible remainders: 0, 1, or 2.

  • Because primes greater than 3 are not divisible by 3, they will never have a remainder of 0.
  • Therefore, any prime number p > 3 must leave a remainder of either 1 or 2 when divided by 3.

In algebra, this means every prime p > 3 can be written in one of two ways, where k is an integer:

  • p = 3k + 1 (leaves a remainder of 1)
  • p = 3k + 2 (leaves a remainder of 2, which can also be written as p = 3k - 1)

2. Squaring the Primes

Now, let's look at what happens when we square these prime numbers.

Case A: The prime is 3k + 1
p2 = (3k + 1)2
p2 = 9k2 + 6k + 1

We can factor out a 3 from the first two terms:
p2 = 3(3k2 + 2k) + 1

Because 3(3k2 + 2k) is a multiple of 3, the entire expression leaves a remainder of 1 when divided by 3.

Case B: The prime is 3k - 1
p2 = (3k - 1)2
p2 = 9k2 - 6k + 1

Again, factor out a 3 from the first two terms:
p2 = 3(3k2 - 2k) + 1

Just like the first case, this leaves a remainder of 1 when divided by 3.

The Key Rule: No matter which type of prime you have, as long as it is greater than 3, its square will always be exactly 1 more than a multiple of 3.

3. Averaging Three Squared Primes

Let p1, p2, and p3 be any three primes greater than 3. Based on our rule above, we can express their squares as:

  • p12 = 3a + 1
  • p22 = 3b + 1
  • p32 = 3c + 1

Now, add them together to find the sum:
Sum = (3a + 1) + (3b + 1) + (3c + 1)
Sum = 3a + 3b + 3c + 3

We can factor out a 3 from the entire sum:
Sum = 3(a + b + c + 1)

Since the sum of the three squared primes is a perfect multiple of 3, dividing that sum by 3 to find the average will always result in a clean integer:
Average = 3(a + b + c + 1) / 3 = a + b + c + 1

Because a, b, and c are integers, the average itself is guaranteed to be an integer.

Saturday, 24 February 2024

Thinning the Ranks

Every now and again I encounter a number associated with my diurnal age that seems to have no interesting properties from my perspective. In such cases, I have to be a little creative and such is the case for the number: 27355. After a little thought, I experimented with home primes and asked the question: how many iterations of factorise and concatenate are required to reach a home prime. Well, it turns out that three iterations are required:$$ \begin{align} 27355 &= 5 \times 5471 \rightarrow 55471 \\ 55471 &=13 \times 17 \times 251 \rightarrow 1317251 \\1317251 &=13 \times 19 \times 5333 \rightarrow 13195333 \end{align}$$Now in the range up to 40,000, there are well over 3,000 composite numbers with this property so it's hardly very special. These numbers belong to OEIS A046423:


 A046423

Numbers requiring 3 steps to reach a prime under the prime factor concatenation procedure.


However, I noticed that the home prime for 27355 had exactly half of its digits equal to 3. It occurred to me to investigate how many composite numbers in the range up to 40,000 and belonging to OEIS A046423 had at least half their digits equal to 3. It turned out that there were only 191 numbers (permalink). This is what I meant by "thinning the ranks". It's interesting to investigate the frequency for other digits that comprise at least half of the digits of the home prime. Here are the statistics:

  • 0 --> no numbers
  • 1 --> 120 numbers
  • 2 --> 2 numbers
  • 3 --> 191 numbers
  • 4 --> 3 numbers
  • 5 --> 2 numbers
  • 6 --> no numbers
  • 7 --> 69 numbers
  • 8 --> no numbers
  • 9 --> 11 numbers
The algorithm is easily modified to accommodate different size iterations. Here are some more statistics for different numbers of iterations involving the digit 3 in the range up to 40,000 (permalink):

  • 1 iteration --> 600 numbers
  • 2 iterations --> 441 numbers
  • 3 iterations --> 191 numbers
  • 4 iterations --> 105 numbers
  • 5 iterations --> 48 numbers
  • 6 iterations --> 34 numbers
  • 7 iterations --> 12 numbers
  • 8 iterations --> 6 numbers
  • 9 iterations --> no numbers
So as can be seen, any number can be made more special by imposing more conditions. For example, the numbers that require 8 iterations to reach a home prime that has at least half of its digits equal to 3 are 4017, 4242, 4667, 7474, 31355 and 39309 with the following details (permalink):

  • 4017 --> 3337715393
  • 4242 --> 23393307373
  • 4667 --> 33433193
  • 7474 --> 23393307373
  • 31355 --> 3332943503
  • 39309 --> 3337715393
The very next number after 27355 provides another excellent opportunity to thin the ranks. This is because 27356 is only one step removed from its home prime:$$27356 \rightarrow 227977$$Now 16.8% of numbers in the range up to 40,000 have this property so again its hardly special. However, 27356 has the property that its home prime contains three occurrences of the digit "7". Only 139 or 0.348 % of the numbers have this property (see permalink). Again the algorithm is easily modified to accommodate other digits. Here are the statistics:

  • digit 0 occurs 3 times --> no numbers
  • digit 1 occurs 3 times --> 440 numbers
  • digit 2 occurs 3 times --> 645 numbers
  • digit 3 occurs 3 times --> 565 numbers
  • digit 4 occurs 3 times --> 4 numbers
  • digit 5 occurs 3 times --> 83 numbers
  • digit 6 occurs 3 times --> 1 number
  • digit 7 occurs 3 times --> 139 numbers
  • digit 8 occurs 3 times --> 1 number
  • digit 9 occurs 3 times --> 23 numbers
Yes another example is provided by OEIS A187073:


 A187073

Composite square-free numbers whose average prime factor is a prime number.



In the range up to 40,000, there are 1609 such numbers. How can we thin this sequence out? Well, firstly let's consider only sphenic numbers. This immediately cuts the number to 594. Now how many of these follow a 1-2-3 progression in terms of the lengths of their prime factors? Only 308. Still too many? Let's apply the condition that the prime factors can have no digits in common. This leaves us with only 13 and these numbers are:

  • 15369 = 3 * 47 * 109 with prime average of 53
  • 15515 = 5 * 29 * 107 with prime average of 47
  • 17135 = 5 * 23 * 149 with prime average of 59
  • 22865 = 5 * 17 * 269 with prime average of 97
  • 24215 = 5 * 29 * 167 with prime average of 67
  • 26619 = 3 * 19 * 467 with prime average of 163
  • 29949 = 3 * 67 * 149 with prime average of 73
  • 32809 = 7 * 43 * 109 with prime average of 53
  • 33065 = 5 * 17 * 389 with prime average of 137
  • 33909 = 3 * 89 * 127 with prime average of 73
  • 36879 = 3 * 19 * 647 with prime average of 223
  • 37639 = 7 * 19 * 283 with prime average of 103
  • 39759 = 3 * 29 * 457 with prime average of 163
                        Notice that all these numbers, while conforming to the requirement of OEIS A187073, are sphenic, have factors in a 1-2-3 progression with no digits in common between any of the factors.

                        Tuesday, 20 February 2024

                        Digits 3 to 9 in Conway's Game of Life

                        In my previous post, I looked at the behaviour of the digits 0, 1 and 2 under the rules of Conway's Game of Life. Today I'll look at the digits 3, 4, 5, 6, 7, 8 and 9. Let's start with the digit 3. See Figure 1.


                        Figure 1: 3 in the shape of an 11-omino

                        After about 50 steps it ends up in the form shown in Figure 2. There are two ships, two blocks, two beehives and one blinker.


                        Figure 2: three types of still life and one blinker

                        Now let's look at the digit 4 shown in Figure 3. It completely disappears after 12 steps or generations, so there's no final state that needs to shown.


                        Figure 3: the digit 4 in the shape of an octomino
                        It disappears after 12 generations

                        The digit 5 is shown in Figure 4 and after three steps or generations it changes into the shapes shown in Figure 5. It's really the same shape as the digit 2 and so the outcomes are basically the same, just differently orientated.


                        Figure 4: the digit 5 in the shape of an 11-omino


                        Figure 5: final state of 5 produces two boats

                        The digit 6 shown in Figure 6 has by far the most complicated behaviour of all the digits. After well over a thousand generations it turns into what is shown in Figure 7.


                        Figure 6: the digit 6 in the shape of a 12-omino


                        Figure 7: the complicated final state of the digit 6.
                        There are additional gliders not shown

                        Figure 8 shows the digit 7 that, after six generations, turns into a blinker.


                        Figure 8: the digit 7 as an heptomino
                        After six generations it becomes a blinker

                        The digit 8, shown in Figure 9, disappears after 21 generations:


                        Figure 9: the digit 8 as a 13-omino
                        It disappears after 21 generations

                        The digit 9, shown in Figure 10, will behave exactly the same way as for the digit 6, only the orientation will be different.


                        Figure 10: the digit 9 represented as a 12-omino
                        It behaves the same as the digit 6