Showing posts with label tetraprime. Show all posts
Showing posts with label tetraprime. Show all posts

Tuesday, 29 September 2026

Geometric Interpretation of Tetraprimes

Following on from my previous post titled Tetraprimes, I asked Gemini the following:

I’d like you to create a program in SageMath that will accept any positive integer with up to four not necessarily distinct prime factors as INPUT and if the integer has FOUR prime factors it should return 4D Hypervolume, 3D Surface Volume, 2D Total Face Area and 1D Total Edge Length. If it has THREE factors then 3D Volume, 2D Surface Area and 1D Edge Length are returned. If it has TWO factors then 2D Surface Area and 1D Edge Length are returned. If the input is prime or has more than four factors then this is stated and no output is returned. The factorisation of the numbers shown in the output should also be displayed.

Here is a permalink to the program that it created using 28302 as input. The output looks of the program is shown below:

Input: 28302
4D Hypervolume: 28302 = 2 * 3 * 53 * 89
3D Surface Volume: 48874 = 2 * 7 * 3491
2D Total Face Area: 21732 = 2^2 * 3 * 1811
1D Total Edge Length: 1176 = 2^3 * 3 * 7^2

The program also deals with triprimes and biprimes. Here is the output using 28303 and 28299 as inputs.

Input: 28303
3D Volume: 28303 = 11 * 31 * 83
2D Surface Area: 7654 = 2 * 43 * 89
1D Edge Length: 500 = 2^2 * 5^3

Input: 28299
2D Surface Area: 28299 = 3 * 9433
1D Edge Length: 18872 = 2^3 * 7 * 337

I've incorporated this algorithm into my daily number analysis. 


In the example shown above, we can see easily that 28303 can be interpreted as the volume of a rectangular prism with a surface area that is also a sphenic number and thus interpretable as the volume of another rectangular prism. This additional information for my daily number analysis will prove useful in other ways I'm sure.

Monday, 28 September 2026

Tetraprimes

While I have looked at numbers with four prime factors counted with multiplicity whose reversals also have this property, I've not actually looked at reversible tetraprimes. Numbers with four distinct prime factors are called tetraprimes. The first example of such a number is 1518 where we have:

  • \(1518 = 2 \times 3 \times 11 \times 23 \)
  • \( 8151 = 3 \times 11 \times 13 \times 19 \)
There are 273 such numbers in the range up to 40000 (permalink):

1518, 2046, 2226, 2262, 2418, 2478, 2618, 2622, 2814, 2838, 2886, 3135, 3927, 4170, 4182, 4386, 4389, 4746, 4785, 4935, 5313, 5394, 5406, 5478, 5565, 5655, 5838, 5874, 6018, 6045, 6222, 6402, 6438, 6474, 6486, 6690, 6699, 6834, 6846, 6882, 7293, 7458, 8106, 8142, 8151, 8162, 8346, 8382, 8385, 8547, 8742, 8745, 9834, 9966, 10434, 10506, 11022, 11346, 11814, 11946, 12243, 12441, 12738, 12765, 13026, 13299, 13542, 13629, 13695, 14105, 14118, 14421, 14469, 14574, 15114, 15873, 16005, 16107, 16359, 16665, 16786, 16962, 16995, 17017, 17358, 17589, 17655, 17754, 17922, 18183, 18258, 18447, 18462, 18546, 18615, 18879, 19434, 19437, 19446, 19578, 19662, 20022, 20055, 20085, 20118, 20145, 20163, 20190, 20262, 20310, 20355, 20382, 20405, 20526, 20553, 20559, 20562, 20658, 20746, 20769, 20774, 20878, 20922, 20958, 22002, 22011, 22074, 22098, 22154, 22242, 22290, 22458, 22515, 22533, 22578, 22695, 22710, 22737, 22755, 22854, 22902, 22946, 22962, 22971, 24115, 24123, 24178, 24186, 24198, 24222, 24270, 24297, 24339, 24465, 24530, 24531, 24582, 24585, 24618, 24645, 24662, 24717, 24766, 24846, 24890, 24906, 24915, 24969, 26013, 26103, 26106, 26187, 26202, 26286, 26358, 26394, 26445, 26481, 26490, 26502, 26535, 26554, 26634, 26642, 26691, 26733, 26895, 26922, 26961, 26978, 26985, 26994, 28083, 28086, 28194, 28245, 28302, 28329, 28410, 28446, 28455, 28497, 28509, 28542, 28545, 28578, 28623, 28626, 28635, 28785, 28866, 28886, 28905, 28974, 28985, 28990, 30162, 30426, 31038, 31062, 31146, 31494, 31515, 31614, 31955, 32142, 32574, 32637, 32682, 32745, 32835, 32865, 33198, 33285, 33522, 33594, 33654, 33666, 33762, 34017, 34221, 34386, 34419, 34518, 34554, 34626, 34854, 35502, 35673, 35706, 35826, 36102, 36195, 36218, 36645, 36966, 36993, 37037, 37074, 37158, 37365, 37605, 37653, 37785, 37851, 38055, 38082, 38181, 38445, 39045, 39666, 39738, 39963

I've also considered biprimes as rectangles and triprimes as rectangular prisms but what about tetraprimes. I asked Gemini the following:
A triprime with prime factors of \(a\), \(b\) and \(c\) can be conceived of as a rectangular prism with sides \(a\), \(b\), \(c\), volume \(a \, b \, c\) and surface area equal to \(2 \times (ab + bc + ac) \). Are there equivalent formulae for volume and surface area of a four dimensional object derived from a tetraprime with four prime factors.

Here was Gemini's response:

The direct geometrical equivalent of a tetraprime with four prime factors \(a\), \(b\), \(c\), and \(d\) is a four-dimensional rectangular orthotope (commonly called a hyperrectangle).

Because a 4D object possesses boundaries in multiple lower dimensions (3D, 2D, and 1D), the equivalent to your 3D formulas expands into a hierarchy of measurements. Just as a 3D prism is bounded by 2D faces, a 4D orthotope is bounded by 3D cells, 2D faces, and 1D edges.

Here are the equivalent geometric formulas derived from a tetraprime:

  • 4D Hypervolume (The equivalent of 3D Volume): The total 4D spatial content of the object is simply the product of all four prime factors, which is exactly equal to the tetraprime itself.$$V_4 = a \cdot b \cdot c \cdot d$$

  • 3D Surface Volume (The structural equivalent of 3D Surface Area): In 3D geometry, "surface area" measures the (n-1)-dimensional boundary of the object. For a 4D object, its outer boundary is three-dimensional. A hyperrectangle is enclosed by 8 solid 3D rectangular prisms (called "cells"). There are two cells for each possible triplet of the dimensions.$$S_3 = 2(abc + abd + acd + bcd)$$

  • 2D Total Face Area (The literal equivalent of 2D Area): If you are looking specifically for flat, two-dimensional surface area, a hyperrectangle has 24 flat 2D rectangular faces. For every pair of dimensions, there are 4 identical faces throughout the 4D structure.$$A_2 = 4(ab + ac + ad + bc + bd + cd)$$

  • 1D Total Edge Length: For complete geometric breakdown, a hyperrectangle has 32 one-dimensional edges. There are 8 parallel edges for each of the four prime factors.$$L_1 = 8(a + b + c + d)$$

By substituting your four prime factors into \(V_4\) and \(S_3\), you achieve the exact mathematical analogies for volume and surface area as you step up from three dimensions into four.

I'll investigate this further in a subsequent blog.

Thursday, 13 November 2025

Claude to the Rescue

The number 27983, associated with my diurnal age today, has a property than confers it membership in OEIS A335752: the lexicographically earliest sequence of primes, each two of which sum to a triprime. The sequence begins: 3, 5, 47, 239, 3023, 27983, 53231, ... so let's confirm that these numbers satisfy using 3 as a starting point:
  • \(3 + 5 = 8 =2^3\)
  • \(3 + 47 = 50 = 2 \times 5^2\)
  • \(3 + 239 = 242 = 2 \times 11^2 \)
  • \(3 + 3023 = 3026 = 2 \times 17 \times 89 \)
  • \(3+27983 = 27986 = 2 \times 7 \times 1999\)


The sums above are all triprimes and we will find that any number in the list paired with any other number will produce a triprime. The code for this was included in the OEIS comments but was in Mathematica. I got Gemini to convert it to Python code and then Grok but in both cases the primeomega function was misunderstood with both claiming that primeomega(12) =2 and not 3. 

I didn't fully understand the Python code and was looking to Gemini and then Grok to explain it to me. It was only Claude that succeeded to my satisfaction. Here is the code followed by Claude's explanation. I think Claude will be my go to resource for anything to do with coding.

from sympy import nextprime, primeomega
ps = [3]
for _ in range(10):
    p = nextprime(ps[-1]) 
    while not all(primeomega(x + p) == 3 for x in ps):
        p = nextprime(p)
    ps.append(p)
print(ps)

I'd be happy to explain this code line by line! This code generates a sequence of prime numbers with a special property.

Code Breakdown

from sympy import nextprime, primeomega

Imports two functions from SymPy:
  • nextprime(\(n\)): Returns the next prime number greater than \(n\)
  • primeomega(\(n\)): Returns the total number of prime factors of \(n\) (counting multiplicity). For example, primeomega(12) = 3 because 12 = 2² × 3 (two 2's and one 3)
ps = [3]

Initializes the sequence with the first prime number 3. This list will store our special sequence of primes.

for _ in range(10):

Loops 10 times to find 10 more primes (so we'll have 11 total including the initial 3). The underscore _ is used when we don't need the loop variable.

p = nextprime(ps[-1])

Gets the next prime after the last element in our list. 
  • ps[-1] accesses the last element of the list
  • Initially, this gives nextprime(3) = 5
  • This is our candidate prime to add to the sequence
while not all(primeomega(x + p) == 3 for x in ps):
    p = nextprime(p)

This is the key part! It checks if the candidate prime \(p\) satisfies a special condition:
  • For every number \(x\) already in our list ps
  • The sum \(x + p\) must have exactly 3 prime factors (counting multiplicity)
  • If this condition fails for any \(x\), we move to the next prime candidate
  • This continues until we find a prime where all sums have exactly 3 prime factors
ps.append(p)

Adds the qualified prime to our sequence once it passes the test.

print(ps)

Prints the final sequence** of primes.

Example Walkthrough

Let's trace the first iteration:
1. Start with ps = [3]
2. Try p = 5: Check if 3 + 5 = 8 = 2³ has 3 prime factors ✓ (yes, three 2's)
3. Add 5 to list: ps = [3, 5]
4. Try p = 7: Check 3 + 7 = 10 = 2 × 5 (only 2 factors) ✗
5. Try p = 11: Check 3 + 11 = 14 = 2 × 7 (only 2 factors) ✗
6. Continue until finding a prime that works with both 3 and 5...

This creates a sequence where each new prime maintains the property that when added to any previous prime in the sequence, the result always has exactly 3 prime factors!

*************************

Now if we change the condition to primeomega = 2, we get the following sequence: 3, 7, 19, 139, 859, 8179, 173059, ... where it can be seen there is a big jump from 8179 to 173059. Testing this out using 3 again we see that:
  • \(3+7=10=2 \times 5\)
  • \(3+19=22=2 \times 11\)
  • \(3+139=142=2 \times 71\)
  • \(3+859=862=2 \times 431\)
  • \(3+8179=8182=2 \times 4091\)
  • \(3+173059=173062=2 \times 86531\)
The sequence is included in the OEIS as A113875: slowest growing sequence of primes having the prime-pairwise-average property: if i<j, (a(i)+a(j))/2 is prime. This makes sense in that 2 seems to be the common factor is all of the sums. 

The sequence with additional (very large) terms looks like this:
3, 7, 19, 139, 859, 8179, 173059, 1026199, 1827139, 15828679, 13187242759, 18732483199, 912492556939, 9130567625119

When we set primeomega = 4 we get the following sequence: 3, 13, 137, 1193, 4373, 26017, 33889, 495433, ... which is NOT listed in the OEIS. Again let's use 3 as our test number:
  • \(3+13=16=2^4\)
  • \(3+137=140=2^2 \times 5 \times 7\)
  • \(3+1193=1196=2^2 \times 13 \times 23\)
  • \(3+4373=4376=2^3 \times 547\)
  • \(3+26017=26020=2^2 \times 5 \times 1301\)
  • \(3+33889=33892=2^2 \times 37 \times 229\)
  • \(3+495433=495436=2^2 \times 29 \times 4271\)
That's probably a good place to stop.

Monday, 31 March 2025

Blast From The Past

Looking back over my old tweets on Twitter (as it was once called), I noticed that my first reference to a day count occurred on August 11th 2013. See Figure 1.


Figure 1

It's a fairly unimpressive tweet that, from a mathematical perspective, simply notes that 23506 has four distinct prime factors. I wasn't aware of the Online Encyclopedia of Integer Sequences or OEIS back then, not Numbers Aplenty or most other resources that I now use. The OEIS informs us that 23506 is a member of A029793:


 A029793    Numbers \(k\) such that \(k\) and \(k^2\) have the same set of digits.


This is because \(23506^2=552532036\) and there are not many numbers in the range up to 40000 that have this property. The numbers that do are: 

0, 1, 10, 100, 1000, 4762, 4832, 10000, 10376, 10493, 11205, 12385, 12650, 14829, 22450, 23506, 24605, 26394, 34196, 36215

From Numbers Aplenty we learn that 23506 has properties that make it
  • a self number because there is no number that added to its sum of digits gives 23506
  • an untouchable number because it is not equal to the sum of proper divisors of any number
My own algorithm tells me that 23506 is:
  • a xenodrome in base 9: 35217 and in base 10: 23506 because all digits are different
  • an attractor because its sum of even and odd digits are the same (8)
These are just a few of the special properties that 23506 possesses. I've come a long way since those early days.