Analysis of Multiplication Tables by Sum, Difference and Product: A New Approach to Primality ()
1. Introduction
Multiplication tables are well known for their elementary role in mathematics education. But as structured numerical sequences, they offer rich, largely unexplored opportunities for mathematical analysis [1]. This paper lays the foundations of a tabular arithmetic based on three major operations:
1) Sum
: related to triangular numbers.
2) Difference
: related to arithmetic sequences.
3) Product
: used as a primality test.
We formalize these operations and develop an original method for detecting prime numbers, adapted to large integers via a logarithmic version [2].
2. Methodology
2.1. Definition 1—Multiplication Table
For any integer
, the multiplication table associated with
, denoted
, is defined by:
2.2. Step-by-Step Initialization of the Sum (
) and Difference
(
) Operations
Step 0: Initialize the Multiplication Tables
For a fixed integer
, generate the associated tables:
Example with
:
3. Construction of the Tabular Sum (
)
Objective: Add the first
values of the multiplication tables for
.
Step 1: Direct Computation
Example
:
Step 2: Optimization by Mathematical Formula
Verification:
4. Construction of the Tabular Difference (
)
4.1. Lemma 1 (Tabular Difference Formula)
For
,
, and
, the difference between rows
and
of the table
is given by:
Objective: Compute the gap between two terms
and
of the same table.
Step 1: Choice of Indices
(with
)
Step 2: Direct Computation
Example
:
Step 3: Factorization
Verification:
4.2. Concrete Applications
Conclusion
These simple formulas reveal the fundamental arithmetic structure of multiplication tables, with essential pedagogical and algorithmic applications.
5. Step-by-Step Construction of the Tabular Product
5.1. Theorem 1 (Tabular Product Formula)
Let
and
.
The product of the first
terms of the multiplication table of
is given by:
5.2. Definition of the Multiplication Tables
Recall: Let
be a fixed integer. For each integer
such that
, we define the row
by:
In other words,
is the product of
by
, which is the
-th row of the multiplication table of
.
5.3. Construction of the Tabular Product
We are interested in the product of the first
rows, that is:
Substituting
gives:
5.4. Factorization of the Product
Group the terms:
where
appears
times. Thus:
5.5. Standard Notation
The product of the integers from 1 to
is by definition the factorial
. Therefore:
Conclusion
The general formula for the tabular product is:
5.6. Illustrative Example
Take
,
:
Direct product:
Formula:
Theorem 2 (Tabular Sum Formula)
Let
and
.
The sum of the first
terms of the table
is given by:
6. Primality Test via Tabular Product
6.1. Theorem 3 (Factorial Tabular Product Primality Test)
Let
,
, and let
. If:
then
is prime [3] [4].
6.2. Classical Version
Basic algorithm:
1) Set
.
2) Compute:
3) Check the conditions:
4) If both are true, then
is likely prime.
Kadouno Primality Tests for
1) Test for
(Prime)
a)
(✓)
b)
(✓)
2) Test for
(Prime)
Step 1:
.
Step 2: Verify
a)
(✓)
b)
(✓)
3) Test for
(Prime)
Step 1:
.
Step 2: Verify
a)
(✓)
b)
(✓)
4) Test for
(Composite)
Step 1:
.
Step 2: Verify
a)
(✓)
b)
(×)
6.3. Key Explanations
1) Condition 1 is always true since
divides
.
2) Condition 2 distinguishes primes (
) from composites (
).
7. Logarithmic Optimization of the Kadouno Test for Large
Primes
7.1. Principle
To avoid direct computation of
which becomes intractable for
, we use a logarithmic approximation:
The test then checks:
1)
(via modulo),
2)
.
Examples
1)
(prime)
.
Stirling’s approximation for
:
Numerical values:
Compute
Since
dominates
, we have
(✓). And because
is prime and
,
(✓).
Conclusion:
is prime.
2)
(prime)
.
Both conditions hold as above (✓).
Conclusion:
is prime.
3)
(composite)
.
Condition 1 is always true.
Condition 2:
since
.
Conclusion:
is composite.
7.2. Why Use the Logarithmic Approach?
Avoids handling enormous numbers (impractical to store).
Reliable approximation via Stirling’s formula.
Reduced complexity (computing
is nearly instantaneous).
8. Kadouno—Log Test with Dynamic Threshold
We define a decimal–scale regulation function
to adapt the test depth dynamically according to the size of the integer.
8.1. Definition
where
is the base—10 logarithm of
and
the floor function.
8.2. Interpretation
- If
, then
.
- If
, then
.
- If
, then
, etc.
The test parameter is defined by
where
is the base-2 logarithm of
.
8.3. Advantages
Controlled logarithmic growth via
.
Dynamic scaling by decimal thresholds.
Optimized for very large numbers without exploding complexity.
8.4. Numerical Examples
:
.
:
.
:
.
This adaptive scaling makes the Kadouno-Log test especially efficient over wide integer ranges, maintaining constant accuracy with cost adjusted to the number’s size.
1) Test for
(prime)
Step 1: Compute
Step 2: Compute
Step 3: Verify the Conditions
and
Conclusion
101 is prime.
2) Test for
(prime)
Step 1: Compute
Step 2: Compute
Step 3: Verify the Conditions
and
Conclusion
10007 is prime.
8.5. Summary of Results
|
Range |
|
|
Conditions met |
Conclusion |
101 |
102 |
3 |
19 |
✓✓ |
Prime |
10007 |
104 |
4 |
53 |
✓✓ |
Prime |
1000003 |
106 |
5 |
99 |
✓✓ |
Prime |
8.6. Key Insights
1) Adaptability of
:
-
automatically adjusts the depth of the test according to the order of magnitude of
.
- Example: For
(106),
2) Efficiency:
- The dynamic threshold
balances precision and computational cost.
- Example:
(sufficient to capture small factors).
3) Robustness:
- Correctly detects primes even for
.
8.7. Why These Examples?
Small number (101): Demonstrates efficiency on small integers.
Medium number (10,007): Illustrates threshold transition (
).
Large number (1,000,003): Shows scalability for very large integers.
8.8. Key Formula to Remember:
9. Primorial Test
9.1. Primorial Version of the Tabular Product
9.1.1. Factorial—Primorial Substitution
We replace the factorial tabular product:
by its finer version:
The primorial eliminates factorial redundancies, retaining only prime factors.
9.1.2. Fundamental Property
Theorem 4 Let
. Then:
If
, then no small prime factor
divides
prime candidate.
If
, then
is composite.
9.2. Logarithmic Optimization of the Primorial Test
9.2.1. Regulation Function and Adaptive Depth
Definition—Decimal regulation function:
Definition—Adaptive test depth:
This choice regulates the depth
while ensuring coverage of critical prime factors.
9.2.2. Adaptive Primorial Test
Test steps:
1) Compute
2) Build
3) Evaluate
4) Conclusion:
- If
,
is composite
- If
,
is prime
9.2.3. Numerical Examples
Example 1—Small Prime Integer
Let
Prime validated
Example 2—Small Composite Integer
Let
Same
, same primorial
Composite detected
Example 3—Carmichael Number
Let
Carmichael rejected
Example 4—Medium Prime Number
Let
Prime confirmed
Example 5—Very Large Composite Integer
Let
(composite, e.g.
)
Composite detected
Example 6 — Very Large Prime Integer
Let
Prime confirmed
9.3. Primorial Detection of Carmichael Numbers
9.3.1. Theorem 5
Let
be a Carmichael number. Set:
Then:
The primorial test therefore rejects all Carmichael numbers [5].
9.3.2. Proof
By Korselt’s criterion, any Carmichael
, with
, square-free.
But this is impossible, since our assumption just implied:
while for any
and
, we clearly have:
For example, for the smallest Carmichael number
, we have
, and:
Therefore, the inequality
is false, which contradicts our initial assumption.
Thus
, so
, and:
9.3.3. Validation Table
Number |
Factorization |
|
|
Status |
561 |
|
24 |
561 |
Rejected |
1105 |
|
34 |
1105 |
Rejected |
1729 |
|
42 |
1729 |
Rejected |
2465 |
|
50 |
2465 |
Rejected |
410,041 |
|
641 |
41 |
Rejected |
9.3.4. Corollary
Corollary:
The primorial test based on
with
rejects all Carmichael numbers without exception. It thus constitutes a robust deterministic barrier against Fermat false positives.
9.3.5. Algorithmic Application
1) Compute
2) Build
3) Check
4) If
is composite
5) If
is prime
Important.
In the context of the primorial primality test, the logarithmic depth defined by:
serves as an efficient dynamic upper bound for medium and large integers, since it remains strictly less than
, thereby preventing
from being included in the primorial product
.
However, this bound becomes inappropriate for small integers
: in this range, we observe that:
which may lead to the inclusion of
in
, resulting in a false rejection of primality.
Conclusion:
For any integer
, the bound
is safe and can be used reliably in the test.
For
, it is recommended to use a minimal depth defined by:
in order to preserve the validity of the primorial test for small prime numbers.
10. Conclusions
In this article, we introduced and analyzed a deterministic primality test based on the primorial, designed from a tabular approach to arithmetic. This test relies on evaluating the greatest common divisor between an integer
and the primorial
, where
is a natural bound motivated by the fundamental theorem of arithmetic.
We rigorously established that:
The test systematically rejects any composite number with a prime factor less than or equal to
, which constitutes the vast majority of non-prime integers.
In particular, the test detects all Carmichael numbers, often problematic for probabilistic tests like Fermat’s.
Using the primorial instead of the factorial provides a finer framework, purged of non-prime redundancies, ensuring both arithmetic efficiency and analytical robustness.
We complemented the study with an adaptive logarithmic version of the test, calibrated by a regulation function based on the size of
, allowing to reduce computational cost while maintaining reliable accuracy.
Finally, a series of detailed numerical examples illustrated the test’s ability to detect Carmichael numbers up to several thousand units, confirming its relevance for cryptographic, pedagogical, and algorithmic applications.
Note
“Novelty brings a new dance to the art of a science like mathematics.
History has proven, through the noble mission of mathematics, that:
Any society with little interest in mathematics will imitate technologies but will never master them.
We add to the value of numbers their shadow ignored over time.
Even with the same conventional signs, the interpretation of a mathematical truth gives it a new dimension, one step further toward the invisible structure that sustains the world.”
—Gnouma Jérôme Kadouno