Monday 11 July 2016

Cuban Primes

Investigation of today's prime day, 24571, revealed that it is a cuban prime, a prime that is a difference of two consecutive cubes (OEIS A002407). In the case of 24571, the two cubes are \(91^3\) and \(90^3\). A cuban prime is a prime number that is a solution to one of two different specific equations involving third powers of x and y:
  • the first is \(\displaystyle \frac{x^3-y^3}{x-y} \) where \(x=y+1\) and \(y>0\)
  • the second is \( \displaystyle \frac{x^3-y^3}{x-y}\) where \(x=y+2\) and \(y>0\)
24571 obviously belongs to the first type with \(y\) = 90 and \(x\) = 91. To quote from Wikipedia: "the name "cuban prime" has to do with the role cubes (third powers) play in the equations, and has nothing to do with Cuba". 

Returning to the first equation, it can be seen that it simplifies to \( (y+1)^3-y^3 \) and then to \( 3y^2+3y+1 \) which is the equation of centred hexagonal numbers. Thus every cuban prime of the first type is a centred hexagonal number. These latter numbers begin 1, 7, 19, 37, 61, 91, 127, 169, ... etc. Many of the centred hexagonal numbers are prime because they all end in 1, 7 or 9.

Because 24571 is more distant than usual from its neighbouring primes, it also gains entry into the OEIS via A137875: prime numbers, isolated from neighbouring primes by more than 16 and A163111: prime numbers with gaps larger than 18 towards both neighbouring primes. The nearest primes are 24551 and 24593.

There are also quartan, quintan and sextan primes. For example quintan primes can be of the form:$$\frac{x^5-y^5}{x-y} \text{ or } \frac{x^5+y^5}{x+y}$$An example of a quintan prime is \( 4651 = \displaystyle \frac{6^5-5^5}{6-5}\)
Another example is \( 26321 = \displaystyle \frac{11^5-5^5}{11-5} \).

It should be noted that \( x-y \) will always divide \(x^n-y^n\) for \(n \geq 1 \) and in the case of \(x^5-y^5\) this division yields \(x^4 + yx^3 + y^2x^2 + y^3x + y^4\). Thus the situation of \(x=y\) is possible and in the case of \(x=y=1\) yields the quintan prime 5. Primes of this form make up OEIS A002649


  A002649

Quintan primes: \(p = \dfrac{x^5 - y^5 }{x - y} \)               


If we return to the definition of a cuban prime as being the difference of two consecutive cubes, then an equivalent definition of a quintan prime as being the different of two consecutive fifth powers does not necessarily hold. It does in the case of 4651 where 5 and 6 differ by 1 but in the case of 26321 the difference between 5 and 11 is 6. This makes for some degree of confusion which I might try to clarify further at some future date.


on April 27th 2021 and
on October 4th 2023

Sunday 10 July 2016

Pythagorean Numbers

Of course I knew about Pythagorean triples and even primitive Pythagorean triples but I hadn't heard of Pythagorean numbers. The term emerged when I was researching my daily number, 24570, using the OEIS. This number was paired with 24576 and the smaller followed the larger in sequence A228875: Pairs of Pythagorean numbers differing by 6. This difference is apparently the minimum possible. The sequence started:
24, 30, 54, 60, 210, 216, 330, 336, 480, 486, 540, 546, 720, 726, 750, 756, 1344, 1350, 1710, 1716, 2160, 2166, 8664, 8670, 8970, 8976, 10080, 10086, 10290, 10296, 12144, 12150, 15600, 15606, 18144, 18150, 24570, 24576, 28560, 28566, 30240, 30246, 34650, 34656
This didn't really explain what constituted a Pythagorean number. However, as I discovered here, the definition of such as number is that it is the area of a Pythagorean triangle and primitive Pythagorean number is the area of a primitive Pythagorean triangle. Sequence A009111 provides an ordered list the areas of Pythagorean triangles, effectively providing a list of the initial Pythagorean numbers. Oddly, 24570 turns out to be 294th and 295th in this list. The reason for this will soon become clear.

While I knew that 24570 was a Pythagorean number and thus the area of a Pythagorean triangle, I didn't know the integer sides that comprised such a triangle but it seemed that there were two possible triangles because the number occupied two positions in the list. It took a little fiddling around in WolframAlpha to come up with the numbers.


Thus the triangles were 84, 585, 591 and 180, 273, 327. The number 24570 is not a primitive Pythagorean number because the members of each triplet are divisible by three. The equivalent Pythagorean triplets are 28, 195, 197 and 60, 91, 109.

Wednesday 6 July 2016

The Digits of Pi

Today's numbered day is 24566 and a check with the OEIS showed its connection to the digits of \(\pi\). Specifically, OEIS A083625 records the starting positions of strings of three 6's in the decimal expansion of \(\pi\). The first elements in the sequence are as shown below:
2440, 3151, 4000, 4435, 5403, 6840, 10163, 10335, 10591, 13594, 15888, 16109, 18504, 20231, 21880, 21881, 23057, 23511, 24566, 25948, 26212, 27703, 27841, 29666, 29868, 29869, 32427, 32428, 33363, 36353, 38132, 40370, 40650, 43523
Wolfram Mathworld has collected some interesting information about peculiarities in the digits of \(\pi\). For a start, OEIS A050285 lists the starting position of the first occurrence of a string of \(n\) 6's in the decimal expansion of \(\pi\), starting with \(n\)=1. The initial terms are 7, 117, 2440, 21880, 48439, 252499, 8209165, 45681781, 45681781, 386980412. It can be seen that \(n\)=3, corresponding to 666, occurs initially at position 2440. 6666 (\(n\)=4) occurs at position 21880 and this is reflected in OEIS A083625 which shows 666 at 21880 and 21881.

Many OEIS sequences relate to the digits of \(\pi\). Here are some of them:

  • starting positions where 0123456789 occurs (OEIS A101815)

  • starting positions where 9876543210 occurs (OEIS A101816)

  • starting positions of the first occurrence of \(n\)=0, 1, 2, ... in the decimal expansion of \(\pi\) (including the initial 3 and counting it as the first digit) are 33, 2, 7, 1, 3, 5, 8, 14, ... (OEIS A032445)

  • \(\pi\)-primes, i.e., \(\pi\)-constant primes occur at 2, 6, 38, 16208, 47577, 78073, ... (OEIS A060421)

  • starting positions for repeating digits e.g. 6666 occurs at 21880
0 - A050279: 32, 307, 601, 13390, 17534, 1699927, ... 
1 - A035117: 1, 94, 153, 12700, 32788, 255945, ...
2 - A050281: 6, 135, 1735, 4902, 65260, 963024, ...
3 - A050282: 9, 24, 1698, 28467, 28467, 710100, ...
4 - A050283: 2, 59, 2707, 54525, 808650, 828499, ...
5 - A050284: 4, 130, 177, 24466, 24466, 244453, ...
6 - A050285: 7, 117, 2440, 21880, 48439, 252499, ...
7 - A050286: 13, 559, 1589, 1589, 162248, 399579, ... 
8 - A050287: 11, 34, 4751, 4751, 213245, 222299, ... 
9 - A048940: 5, 44, 762, 762, 762, 762, 1722776, ...
999999 occurs at position 762 and is known as the Feynman point.

on January 7th 2021