Structural Analysis of MFP Methods
Author: Marlon Fernando Polegato
Date: 04/16/2025
Summary
This study presents a detailed individual analysis of five variants of the M.F.P
(Pattern Factorization Method), for detecting primality and identifying real divisors.
Each version was studied based on its structure, mathematical formulation,
execution efficiency, and robustness when applied to large numbers. Two constant
examples are used for all analyses: n₁ = 9007199254740991 and n₂ =
147573952589676412927.
Keywords: primality, real divisor, decimal redistribution, modular factorization,
MFP method, deterministic algorithm, Pattern Factorization Method
Individual Analysis: First Code
Structure:
- Strategy: decimal redistribution based on variable q
- Computes: i = (A − q·d₀) / (10·q + 1), with d = d₀ + 10·i
- Verifies: Aᵢ mod d = 0 and n mod d = 0
Results: Real divisors were correctly identified for n₁ and n₂. It has good accuracy,
but requires extensive search over q.
Below is the complete and rigorous analysis of the **first code** you provided, with
all the **mathematical formulations involved**, a detailed explanation of the logic,
and two **step-by-step** examples using large numbers. We will use the same two
numbers throughout the next analyses to ensure consistency:
- **n₁ = 9007199254740991**
- **n₂ = 147573952589676412927**
### I. GENERAL LOGIC OF THE CODE