This is an observation regarding the semiprimes, also named 2-almost primes, biprimes, or the product of two primes.
Basically it seems that if the semiprimes are arranged in a Pascal-like triangle, being the first line indexed as line $1$, next $2$, etc. then, in a similar way as it happens in the classic Pascal Triangle, if the index $n \gt 1$ of the file divides an element $e$ of the file, then $n \in \Bbb P$ is prime and also $\frac{e}{n} \in \Bbb P$.
I was able to verify this for the first $10000$ elements available at the OEIS list.
E.g. these are the initial lines, and in red color the indexes that divide an element of its line and the elements divided by each index, including in parenthesis the prime obtained when dividing $\frac{e}{n}$ (sometimes an index is able to divide more than an element of their file).
(line $1$) $4$
(line $\color{red}{2}$) $\color{red}{6(3)},9$
(line $\color{red}{3}$) $10,14,\color{red}{15(5)}$
(line $4$) $21,22,25,26$
(line $\color{red}{5}$) $33,34,\color{red}{35(7)},38,39$
For instance applied to the triangle generated with the first $10000$ semiprimes, this is the complete list of prime indexes found (no counterexamples):
$\{2,3,5,7,11,13,17,19,23,31,37,41,53,59,61,67,71,73,79,89,97,101,107,113,127,137,139\}$
While the classic Pascal's triangle acts like a primality test, because all the line prime indexes are detected, in the case of the semiprimes triangle some primes are jumped (they do not divide any element of their own files), like for instance happens in the case of the line indexes $\{29,43,47,83,103,109\}$
Here is the very basic Python code I used for the test:
from gmpy2 import is_prime
import csv
# Read 10000 semiprimes from OEIS into a list
f = open('A001358.txt', 'r')
myline = f.readline()
pos = 1
mylist = []
while pos < 10000:
myvalue = int(myline[myline.find(" "):])
myline = f.readline()
pos = pos + 1
mylist.append(myvalue)
f.close()
# test the first 141 files of the Pascal-like triangle
# (to arrange the 10000 semiprimes)
for n in range(1,141):
n_starting_pos = int(((n*(n-1))/2))
# Verify the elemements of the file of the current index
for k in range(n_starting_pos,n_starting_pos+n):
if mylist[k]%n==0:
# If the current index divides the element,
# verify that the index is prime
print(str(n) + " " + str(is_prime(n)) + " " + str(mylist[k]/n) + " " + str(is_prime(int(mylist[k]/n))))
I would like to share the following questions:
Is there a counterexample? if somebody could kindly confirm if the observation is true or false in some extent that would be great.
If there are not counterexamples, what would be behind this kind of property? (similar but not identical to Pascal's triangle primality test). Thank you!
This is true but also absolutely obvious, because semiprimes do not have composite prime divisors apart themselves.
If you have a semiprime, say $n=p\cdot q$ where $p$ may be equal to $q$, the only divisors are $1$, $p$, $q$, and $pq$ itself.
So, if something between $1$ and $n$ divides $n$ it is obvious it is $p$ or $q$, so it is prime.