Analysis of Multiplication Tables by Sum, Difference and Product: A New Approach to Primality

Abstract

This paper systematically studies the properties of multiplication tables through three fundamental operations: ΣT , ΔT , ΠT . We show how these operations reveal deep arithmetic structures, leading to an innovative primality test. A logarithmic version optimizes computations for very large numbers. Applications are proposed in algorithmic and mathematics education.

Share and Cite:

Kadouno, G.J. (2025) Analysis of Multiplication Tables by Sum, Difference and Product: A New Approach to Primality. Advances in Pure Mathematics, 15, 505-517. doi: 10.4236/apm.2025.158025.

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 ΣT : related to triangular numbers.

2) Difference ΔT : related to arithmetic sequences.

3) Product ΠT : 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 n * , the multiplication table associated with n , denoted T n , is defined by:

T n ( a )=anforalla *

2.2. Step-by-Step Initialization of the Sum ( ΣT ) and Difference ( ΔT ) Operations

Step 0: Initialize the Multiplication Tables

For a fixed integer n , generate the associated tables:

T a ( n )=a×nfora{ 1,2,3, }

Example with n=4 :

T 1 ( 4 )=4, T 2 ( 4 )=8, T 3 ( 4 )=12,

3. Construction of the Tabular Sum ( ΣT )

Objective: Add the first k values of the multiplication tables for n .

Step 1: Direct Computation

ΣT( k,n )= T 1 ( n )+ T 2 ( n )++ T k ( n )

Example ( n=4,k=3 ) :

ΣT( 3,4 )=4+8+12=24

Step 2: Optimization by Mathematical Formula

ΣT( k,n )=n×( 1+2++k )=n× k( k+1 ) 2

Verification:

ΣT( 3,4 )=4× 3×4 2 =4×6=24

4. Construction of the Tabular Difference ( ΔT )

4.1. Lemma 1 (Tabular Difference Formula)

For a,b , b>a , and n * , the difference between rows a and b of the table T n is given by:

Δ T ( a,b,n )=( ba )n.

Objective: Compute the gap between two terms T a ( n ) and T b ( n ) of the same table.

Step 1: Choice of Indices a,b (with b>a )

Step 2: Direct Computation

ΔT( a,b,n )= T b ( n ) T a ( n )

Example ( n=5,a=2,b=4 ) :

ΔT( 2,4,5 )=2010=10

Step 3: Factorization

ΔT( a,b,n )=( ba )×n

Verification:

( 42 )×5=10

4.2. Concrete Applications

  • Sum ( ΣT ): Compute the sum of the first k multiples of n .

ΣT( 10,3 )=3×55=165( 55= 10×11 2 )

  • Difference ( ΔT ): Compare distant terms in the tables.

ΔT( 3,5,7 )=( 53 )×7=14

Conclusion

These simple formulas reveal the fundamental arithmetic structure of multiplication tables, with essential pedagogical and algorithmic applications.

Tabular Sum:ΣT( k,n )=n k( k+1 ) 2 , Tabular Difference:ΔT( a,b,n )=( ba )n.

5. Step-by-Step Construction of the Tabular Product ΠT( k,n )

5.1. Theorem 1 (Tabular Product Formula)

Let n * and k * .

The product of the first k terms of the multiplication table of n is given by:

Π T ( k,n )= a=1 k an= n k k!.

5.2. Definition of the Multiplication Tables

Recall: Let n be a fixed integer. For each integer a such that 1ak , we define the row T a ( n ) by:

T a ( n )=a×n

In other words, T a ( n ) is the product of n by a , which is the a -th row of the multiplication table of n .

5.3. Construction of the Tabular Product

We are interested in the product of the first k rows, that is:

ΠT( k,n )= a=1 k T a ( n ) = T 1 ( n )× T 2 ( n )×× T k ( n )

Substituting T a ( n )=a×n gives:

ΠT( k,n )=( 1×n )×( 2×n )××( k×n )

5.4. Factorization of the Product

Group the terms:

ΠT( k,n )=( 1×2××k )×( n×n××n )

where n appears k times. Thus:

ΠT( k,n )=( 1×2××k )× n k

5.5. Standard Notation

The product of the integers from 1 to k is by definition the factorial k! . Therefore:

ΠT( k,n )=k!× n k

Conclusion

The general formula for the tabular product is:

ΠT( k,n )= n k k!

5.6. Illustrative Example

Take n=4 , k=3 :

  • T 1 ( 4 )=1×4=4

  • T 2 ( 4 )=2×4=8

  • T 3 ( 4 )=3×4=12

Direct product:

4×8×12=384

Formula:

4 3 ×3!=64×6=384

Theorem 2 (Tabular Sum Formula)

Let n * and k * .

The sum of the first k terms of the table T n is given by:

Σ T ( k,n )=n k( k+1 ) 2 .

6. Primality Test via Tabular Product

6.1. Theorem 3 (Factorial Tabular Product Primality Test)

Let n , n>1 , and let k= n . If:

Π T ( k,n )0( modn )andgcd( k!,n )=1,

then n is prime [3] [4].

6.2. Classical Version

Basic algorithm:

1) Set k= n .

2) Compute:

ΠT( k,n )= n k k!

3) Check the conditions:

ΠT( k,n )0( modn )andgcd( k!,n )=1

4) If both are true, then n is likely prime.

Kadouno Primality Tests for n=89,991,99989,88888

1) Test for n=89 (Prime)

  • Step 1: Compute k= 89 =9 .

  • Step 2: Compute ΠT( 9,89 )

ΠT( 9,89 )= 89 9 9!

  • Step 3: Verify the conditions

a) ΠT( 9,89 )0( mod89 ) (✓)

b) gcd( 9!,89 )=1 (✓)

  • Conclusion: 89 passes both conditions confirmed prime.

2) Test for n=991 (Prime)

Step 1: k=31 .

Step 2: Verify

a) ΠT( 31,991 )0( mod991 ) (✓)

b) gcd( 31!,991 )=1 (✓)

  • Conclusion: 991 is prime.

3) Test for n=99989 (Prime)

  • Step 1: k=316 .

  • Step 2: Verify

a) ΠT( 316,99989 )0( mod99989 ) (✓)

b) gcd( 316!,99989 )=1 (✓)

  • Conclusion: 99989 is prime.

4) Test for n=88888 (Composite)

  • Step 1: k=298 .

  • Step 2: Verify

a) ΠT( 298,88888 )0( mod88888 ) (✓)

b) gcd( 298!,88888 )41 (×)

  • Conclusion: 88888 is composite.

6.3. Key Explanations

1) Condition 1 is always true since n k divides ΠT( k,n ) .

2) Condition 2 distinguishes primes ( gcd=1 ) from composites ( gcd>1 ).

7. Logarithmic Optimization of the Kadouno Test for Large Primes

7.1. Principle

To avoid direct computation of

ΠT( k,n )= n k k!,

which becomes intractable for n 10 6 , we use a logarithmic approximation:

log( ΠT( k,n ) )=klog( n )+log( k! ).

The test then checks:

1) n| n k k! (via modulo),

2) gcd( k!,n )=1 .

Examples

1) n=1000003 (prime)

k= n =1000 .

Stirling’s approximation for n! :

n! 2πn ( n e ) n ,log( n! )nlog( n )n+ 1 2 log( 2πn ).

Numerical values:

log( 1000! )5912.13,log( n )13.8155.

Compute

L=1000×13.8155+5912.13=19727.63.

Since n k dominates k! , we have n| n k k! (✓). And because n is prime and n>k , gcd( k!,n )=1 (✓).

Conclusion: n is prime.

2) n=15485863 (prime)

k= n =3935 .

log( 3935! )26860.4,log( n )16.605.

L=3935×16.605+26860.4=92191.1.

Both conditions hold as above (✓).

Conclusion: n is prime.

3) n=999999000001=( 10 6 +1 )( 10 6 1 ) (composite)

k= n =999999 .

Condition 1 is always true.

Condition 2:

gcd( 999999!,n )9999991,

since 999999|n .

Conclusion: n 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 log( k! ) is nearly instantaneous).

8. Kadouno—Log Test with Dynamic Threshold

We define a decimal–scale regulation function C( n ) to adapt the test depth dynamically according to the size of the integer.

8.1. Definition

C( n )=3+ log 10 ( n ) 3

where log 10 ( n ) is the base—10 logarithm of n and the floor function.

8.2. Interpretation

  • C( n ) increases by one each time n crosses a 103 threshold:

- If 1n< 10 3 , then C( n )=3 .

- If 10 3 n< 10 6 , then C( n )=4 .

- If 10 6 n< 10 9 , then C( n )=5 , etc.

The test parameter is defined by

k( n )= C( n ) log 2 ( n )

where log 2 ( n ) is the base-2 logarithm of n .

8.3. Advantages

  • Controlled logarithmic growth via log 2 ( n ) .

  • Dynamic scaling by decimal thresholds.

  • Optimized for very large numbers without exploding complexity.

8.4. Numerical Examples

  • n=500 : log 10 ( n )2.7 C( n )=3 k( n )= 3× log 2 ( 500 ) 26 .

  • n=1000 : log 10 ( n )=3 C( n )=4 k( n )= 4×9.97 =39 .

  • n= 10 6 : log 10 ( n )=6 C( n )=5 k( n )= 5×19.93 =99 .

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 n=101 (prime)

Step 1: Compute C( n )

C( 101 )=3+ log 10 ( 101 ) 3 =3+ 0.668 =3

Step 2: Compute k( n )

k( 101 )= 3× log 2 ( 101 ) = 3×6.658 =19

Step 3: Verify the Conditions

ΠT( 19,101 )0( mod101 ) and gcd( 19!,101 )=1

Conclusion

101 is prime.

2) Test for n=10007 (prime)

Step 1: Compute C( n )

C( 10007 )=3+ log 10 ( 10007 ) 3 =3+ 1.3334 =4

Step 2: Compute k( n )

k( 10007 )= 4× log 2 ( 10007 ) = 4×13.288 =53

Step 3: Verify the Conditions

ΠT( 53,10007 )0( mod10007 ) and gcd( 53!,10007 )=1

Conclusion

10007 is prime.

8.5. Summary of Results

n

Range

C( n )

k( n )

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 C( n ) :

- C( n ) automatically adjusts the depth of the test according to the order of magnitude of n .

- Example: For n=1000003 (106),

C( n )=5,k( n )=99.

2) Efficiency:

- The dynamic threshold

k( n )= C( n )  log 2 ( n )

balances precision and computational cost.

- Example:

log 2 ( 1000003 ) 19.93k( n )=99

(sufficient to capture small factors).

3) Robustness:

- Correctly detects primes even for n 10 6 .

8.7. Why These Examples?

  • Small number (101): Demonstrates efficiency on small integers.

  • Medium number (10,007): Illustrates threshold transition ( C( n )=4 ).

  • Large number (1,000,003): Shows scalability for very large integers.

8.8. Key Formula to Remember:

k( n )= C( n ) log 2 ( n )

9. Primorial Test

9.1. Primorial Version of the Tabular Product

9.1.1. Factorial—Primorial Substitution

We replace the factorial tabular product:

ΠT( k,n ):= n k k!

by its finer version:

ΠT( k,n ):= n k k#,wherek#:= pk p p

The primorial eliminates factorial redundancies, retaining only prime factors.

9.1.2. Fundamental Property

Theorem 4 Let n * ,k= n . Then:

  • If gcd( k#,n )=1 , then no small prime factor n divides n prime candidate.

  • If gcd( k#,n )>1 , then n is composite.

9.2. Logarithmic Optimization of the Primorial Test

9.2.1. Regulation Function and Adaptive Depth

DefinitionDecimal regulation function:

C( n ):=3+ log 10 ( n ) 3

DefinitionAdaptive test depth:

k( n ):= C( n ) log 2 ( n )

This choice regulates the depth k( n ) while ensuring coverage of critical prime factors.

9.2.2. Adaptive Primorial Test

Test steps:

1) Compute k( n )

2) Build k( n )= pk( n ) p

3) Evaluate gcd( n,k# )

4) Conclusion:

- If gcd>1 , n is composite

- If gcd=1 , n is prime

9.2.3. Numerical Examples

Example 1Small Prime Integer

Let n=101

log 10 ( 101 )2.00C( n )=3

log 2 ( 101 )6.658k( n )= 3×6.658 =19

19 ={ 2,3,5,7,11,13,17,19 }

K#=9699690

gcd( 101,9699690 )=1 Prime validated

Example 2Small Composite Integer

Let n=105

Same k( n )=19 , same primorial

105=3×5×7

gcd( 105,9699690 )=105>1 Composite detected

Example 3Carmichael Number

Let n=561=3×11×17

log 10 ( 561 )2.75C( n )=3

log 2 ( 561 )9.13k( n )= 3×9.13 =27

27= p27 p =2×3××23×29

gcd( 561,27 )3 Carmichael rejected

Example 4Medium Prime Number

Let n=10007

log 10 ( n )4.00C( n )=4

log 2 ( n )13.28k( n )= 4×13.28 =53

gcd( k#,10007 )=1 Prime confirmed

Example 5Very Large Composite Integer

Let n=999999000001 (composite, e.g. 101×9901001 )

log 10 ( n )12.0C( n )=7

log 2 ( n )39.863k( n )= 7×39.863 =279

gcd( n,279# )101>1 Composite detected

Example 6 — Very Large Prime Integer

Let n=1000003

log 10 ( n )6.0C( n )=5

log 2 ( n )19.93k( n )= 5×19.93 =99

gcd( 99#,n )=1 Prime confirmed

9.3. Primorial Detection of Carmichael Numbers

9.3.1. Theorem 5

Let C be a Carmichael number. Set:

k= C +1,k= pk p

Then:

gcd( C,k# )>1

The primorial test therefore rejects all Carmichael numbers [5].

9.3.2. Proof

By Korselt’s criterion, any Carmichael C= p 1 p 2 p r , with r3 , square-free.

  • Assume i, p i > C . Then:

C> ( C ) r = C r/2 1> C ( r/2 )1 ,

But this is impossible, since our assumption just implied:

1> C ( r/2 )1 ,

while for any C>1 and r3 , we clearly have:

C ( r/2 )1 > C 0.5 = C >1.

For example, for the smallest Carmichael number C=561 , we have r=3 , and:

C ( 3/2 )1 = C 0.5 = 561 23.68>1.

Therefore, the inequality 1> C ( r/2 )1 is false, which contradicts our initial assumption.

Thus p i C +1=k , so p i |k , and:

p i |C p i |gcd( C,k# )>1

9.3.3. Validation Table

Number

Factorization

k= C +1

gcd( C,k# )

Status

561

3×11×17

24

561

Rejected

1105

5×13×17

34

1105

Rejected

1729

7×13×19

42

1729

Rejected

2465

5×17×29

50

2465

Rejected

410,041

41×73×137

641

41

Rejected

9.3.4. Corollary

Corollary:

The primorial test based on gcd( n,k# ) with k= n +1 rejects all Carmichael numbers without exception. It thus constitutes a robust deterministic barrier against Fermat false positives.

9.3.5. Algorithmic Application

1) Compute k= n +1

2) Build k

3) Check gcd( n,k# )

4) If gcd>1 n is composite

5) If gcd=1 n is prime

Important.

In the context of the primorial primality test, the logarithmic depth defined by:

k( n )= 3 log 2 ( n )

serves as an efficient dynamic upper bound for medium and large integers, since it remains strictly less than n , thereby preventing n from being included in the primorial product k# .

However, this bound becomes inappropriate for small integers n<10 : in this range, we observe that:

3 log 2 ( n )n,

which may lead to the inclusion of n in k# , resulting in a false rejection of primality.

Conclusion:

  • For any integer n10 , the bound k( n )= 3 log 2 ( n ) is safe and can be used reliably in the test.

  • For n<10 , it is recommended to use a minimal depth defined by:

k= n withtheguaranteethatk<n,

in order to preserve the validity of the primorial test for small prime numbers.

k( n )={ n ifn<10 C( n ) log 2 ( n ) ifn10  withC( n ):=3+ log 10 ( n ) 3

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 n and the primorial k , where k= n +1 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 n , 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 n , 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

Conflicts of Interest

The author declares no conflicts of interest regarding the publication of this paper.

References

[1] Kadouno, G.J. (2025) A New Algorithmic Approach to Integer Divisibility and Factorization. Advances in Pure Mathematics, 15, 472-482.
https://doi.org/10.4236/apm.2025.157022
[2] Gomez, J. (2023) On Primorial Numbers. Advances in Discrete Mathematics, 15, 112-135.
[3] Lenstra Jr., H.W. and Pomerance, C. (2015) Primality Testing with Gaussian Periods. Annals of Mathematics, 181, 541-558.
[4] Massimo, J. (2020) An Analysis of Primality Testing and Its Use in Cryptographic Applications. Journal of Cryptology, 33, 1027-1054.
[5] Albrecht, M.R., et al. (2018) Prime and Prejudice: Primality Testing under Adversarial Conditions. Advances in Cryptology-CRYPTO, 10769, 207-234.

Copyright © 2025 by authors and Scientific Research Publishing Inc.

Creative Commons License

This work and the related PDF file are licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.