A New Algorithmic Approach to Integer Divisibility and Factorization ()
1. Introduction
Arithmetic—the foundational science of mathematics—has enthralled scholars since antiquity thanks to the richness of its internal structures. Among the many areas explored, the questions of divisibility and factorization of integers remain central to number theory.
Driven by a personal passion for whole numbers, I have developed a technique based on what I call alternating profiles: a sequence of quotients obtained by adjusting an odd integer N until it becomes divisible by a given divisor b. Born from empirical experimentation, this idea gradually led me to this algorithm—an original approach for testing divisibility, optimizing certain arithmetic operations, and formulating a general conjecture about odd integers.
This article has three goals:
1) To present the method rigorously, supported by clear mathematical proofs.
2) To explore its applications, especially in pedagogy and number theory.
3) To unify classical divisibility criteria under a common algorithmic framework—particularly for integers
—thereby moving beyond the multiplicity of traditional rules.
Rooted in clarity, curiosity, and experimentation, this research extends the method to non-consecutive divisors and proposes a hybrid variant inspired by Fermat’s theorem. Through numerical examples and theoretical formalization, we show how this approach can deepen our understanding of divisibility in a modern context [1].
2. Methodology of the Algorithm
Unified Divisibility Approach Based on Multiplication Tables
1) Conceptual Foundations
The algorithm rests on a fundamental relation between two consecutive integers
and
and their multiplication tables:
Because
,
(1)
Hence, for every index
, the difference between
and
is exactly
. This regularity allows an iterative divisibility-testing algorithm.
2) General Definition of the Algorithm
Goal. Test whether an integer
is divisible by an integer
using its predecessor
.
Step 1: Initialisation
Step 2: Iterations — for each iteration
:
(2)
Step 3: Stopping criterion
If
, then
.
If
, then
.
3) Worked Examples for Various Divisors
Divisor
(
) Example 1:
(two digits)
Example 2:
(two digits)
Divisor
(
) Example 3:
(three digits)
Divisor
(
) Example 4:
(four digits)
Divisor
(
) Example 5:
(five digits)
4) Summary
Pedagogical Advantage: The algorithm uses only elementary operations (integer division, multiplication, subtraction), making it especially suitable for teaching divisibility as early as secondary school. It promotes an active understanding of multiplication tables and the gaps between successive multiples by re-employing familiar notions (quotients, remainders, differences) [2] [3].
3. Convergence Analysis of the Iterative Algorithm
General Setting
The divisibility test for
by
is defined by
(3)
with
. Convergence to
depends critically on
,
, and
.
Critical Cases Analysis (with
,
)
Case 1:
. Iterations:
Iterations: 3. Behaviour: rapid decrease
. Explanation: small
gives efficient convergence.
Case 2:
— slow convergence (9 iterations).
Summary: non-monotone convergence
.
Case 3:
. First iteration:
Behaviour: temporary divergence; more than 15 iterations needed to converge. Explanation: large
amplifies residuals.
Proof for
.
(4)
If
, then
, leading to exponential growth.
4. Mathematical Analysis
Let
be the residue at step
. We have
Order of magnitude.
(5)
Critical cases.
Optimisation
To speed up convergence:
1) Choose
close to
(i.e.
small).
2) Avoid
(e.g.
).
3) In practice, prefer
.
Pedagogical Applications
In the game “Divisor Hunt”
Conclusion.
Convergence is guaranteed if
, but speed depends on
and
.
Optimal speed at
(e.g.
).
Instabilities for
or
.
5. Generalised Divisibility Theorem
Statement. Let
Then, for every
,
(6)
In particular, if
, then
(7)
Hence
is divisible by
.
Proof
1) Initialization. Define recursively:
2) Iterative unfolding.
Signs alternate at each step.
3) Induction/generalisation. Therefore,
If
, we recover Equation (8).
Important remark
Explanation of
in the Formula (Page 8, Section 7)
In the formula of the Generalised Divisibility Theorem
the term
denotes the sign function of
, defined by
Role in the Algorithm
1) Handling Negative Values
The algorithm may produce negative values for
(e.g.
when
and
, Page 3).
The function sgn keeps the sign of
after division by
, so that the quotient
correctly reflects whether the next adjustment is additive or subtractive.
2) Ensuring Convergence
By combining sgn with the absolute value
, the formula drives the sequence
toward 0 whenever
, even when intermediate remainders become negative.
NB: Equation (7) holds for any
with
.
NB: the special case
corresponds to consecutive tables.
Illustrative Example
Take
,
,
.
6. Corollary (Kadouno-Serre Conjecture)
Statement. Let
be odd. For each divisor
of
, there is a finite sequence
constructed by the algorithm with
such that
Iterative proof. The theorem’s algorithm gives
and unfolding yields
Since
and the algorithm ends with
, the desired alternating representation of
follows.
Numerical Examples
Example 1:
.
Example 2:
.
Example 3:
.
Pedagogical and Theoretical Remarks
The alternating representation is canonical for each pair
, giving an “Alternating signature” of
.
It is constructive, relying solely on integer divisions by
.
It applies to any divisor of any odd integer.
7. Conclusion
The Kadouno—Serre Conjecture, proved here as a corollary, asserts that every odd integer
can be expressed as an alternating sum of multiples of each of its divisors through a universal algorithm based on consecutive multiplication tables. This structure reveals a hidden form of divisibility with both algorithmic and pedagogical implications [4].
8. Theorem (Fermat)
Let
Then there exist integers
Thus, once
is written as a difference of two squares, its factors emerge immediately.
1) Fundamental Identity
Proof. Start from the algebraic identity
With
(
, both odd), set
Because
and
are odd,
and
are integers. Hence
and therefore
proving
2) Algorithmic Application: Fermat—Hybrid
Goal. Recover
and
from
without prior knowledge by testing integers
that satisfy
3) Fermat-Hybrid Procedure
a) Initialisation. Start at
Since
, any valid
must satisfy
; the smallest such integer is
.
b) Iteration. For
compute
If
is a perfect square, set
Consequently
so
is factored.
4) Complexity Analysis
Balanced case
. Here
so
is very small—usually a perfect square within one or two trials.
General case
. Then
Many iterations may be required; hybridising with trial division or probabilistic tests mitigates this delay.
5) Detailed Examples
Example 1:
.
Hence
Example 2:
.
Thus
6) Geometric View
Writing
models
as the area difference between a large square of side
and a small square of side
. Removing the small square leaves a rectangle of dimensions
i.e. the factors
and
[5].
Figure 1. Geometric representation of the factorization
.
Visual model of the Fermat-Hybrid method. A large square with side length
(area
) contains a smaller square with side length
(area
). The difference in areas,
, corresponds to the shaded rectangle with dimensions
, revealing the factors
and
of
.
As illustrated in Figure 1, the identity
provides an effective geometric visualization of the factorization into
...
7) Advantages of the Fermat—Hybrid Method
Optimal start. Starting at Square N, minimizes the number of tests, unlike the worst-case scenario where Fermat’s method may require testing up to [N + 1]/2.
Efficiency. For semiprimes with small
, factoring is nearly immediate.
Hybrid flexibility. The approach can be combined with other methods when divergence occurs.
Note. The identity
allows instant factorisation once a suitable
is found. Beginning at
guarantees best-case performance, especially for
.
9. Overall Conclusions
This study has presented an algorithmic framework for testing divisibility based on consecutive multiplication tables. Blending formal reasoning with numerical intuition, it offers an alternative to classical techniques.
The Kadouno—Serre Conjecture, established herein, shows that every odd number can be written as an alternating sum of multiples of any of its divisors. This structural property sheds new light on integer representations and may inspire further work in number theory.
Extending the algorithm to non-consecutive divisors and hybridising it with factorisation methods such as Fermat’s broadens its applicability. Empirical tests confirm rapid convergence when divisors are close, while limitations emerge as their gap widens.
Finally, a practical implementation—the Le-Kadouno Calculator app on the Play Store—makes the method readily explorable for both educational and computational purposes. This research opens avenues for future work on algorithmic optimisation and theoretical applications of the conjecture [6].