Documente Academic
Documente Profesional
Documente Cultură
ISSN No:-2456-2165
Abstract :- In this text there is a proposal. The If the parcels of a sum are divisible by a
creation of a factorization method that number, the sum will also be divisible by this
determines whether a given number (a) is number.
prime or composite, but unlike the AKS
Are the numbers a, p, q, w, x, ∈ ℤ.
primality test (created by Indian scientists),
this new method demonstrates the (smallest Proof
prime factor) of the target number.
p + q = a;
Keywords:- Factoring Method; Deterministic;
Smallest Prime Factor. p | p such that p = p1 and (p) is an integer (1)
p | q such that q = pw and (w) is an integer
I. INTRODUCTION
(2),
1) → This work aims at the development of a
new equation in wich we will name p + q = a. thus, substituting (1) and (2) we have:
Decomposition of Ferrara; it decomposes the odd
natural numbers larger than one, so it is p1 + pw = a;
deterministic, i.e., given any odd integer a > 1, the
p(1 + w) = a;
Decomposition of Ferrara determines whether a
is a prime or compound number in a polynomial 𝑎
(1 + 𝑤) = 𝑝
⏟
time, and then we will otimize it, and reducing
𝑥
then the search space.
𝑎
x=𝑝
((a - 1 = q1), (q1 - 2 = q2), (q2 - 2 = q3), (q3 - 2 = q4),..., (qn = q1 + (n - 1)r = 0)) (1)
𝒂 𝒂 𝒂 𝒂 𝒂
(( ),( ),( ),( ),..., ( ))(2)
𝒂 − 𝒒𝟏 𝒂 − 𝒒𝟐 𝒂 − 𝒒𝟑 𝒂 − 𝒒𝟒 𝒂 − 𝒒𝒏
Decomposition of Ferrara.
Definition:
𝒂 𝒂 𝒂 𝒂 𝒂
𝛴 (( ),( ),( ),( ), .. ., ( ))
𝒂 − (𝒒𝟏 ) 𝒂 − (𝒒𝟏 + 𝒓) 𝒂 − (𝒒𝟏 + 𝟐𝒓) 𝒂 − (𝒒𝟏 + 𝟑𝒓) 𝒂 − (𝒒𝟏 + (𝒏 − 𝟏)𝒓)
𝒂 𝒂 𝒂 𝒂 𝒂
𝛴 (( ),( ),( ),( ), .. ., ( ))
𝒂 − (𝒒𝟏 ) 𝒂 − (𝒒𝟏 + 𝒓) 𝒂 − (𝒒𝟏 + 𝟐𝒓) 𝒂 − (𝒒𝟏 + 𝟑𝒓) 𝒂 − (𝒒𝟏 + (𝒏 − 𝟏)𝒓)
91 91 91 91
Σ(( ),( ),( ),( ));
91 −(90) 91 −(90−2) 91 −(90−4) 91 −(90−6)
91 91 91 91
Σ(( ),( ),( ),( ));
91 −90 91 −88 91 −86 91 −84
91 91 91 91
Σ(( ) , ( ) , ( ) , ( ));
1 3 5 7
𝟗𝟏
( ) = 𝟗𝟏
𝟏
𝟗𝟏
( ) = 𝟑𝟎, 𝟑𝟑𝟑
𝟑
𝟗𝟏
( ) = 𝟏𝟖, 𝟐
𝟓
𝟗𝟏
( ) = 𝟏𝟑
𝟕
Therefore, 91 is compound and 7 is the ((a - 1 = q1), (q1 - 2 = q2), (q2 - 2 = q3), (q3 - 2 =
smallest prime factor. ∎ q4),..., (qn = q1 + (n - 1)r = 0)).Therefore,
𝒂 𝒂 𝒂 𝒂
𝒇𝒇𝑺(x): 𝜮 (( ),( ),( ),...,( ))
𝒂 −(𝒒𝟏 ) 𝒂 −(𝒒𝟏 +𝒓) 𝒂 −(𝒒𝟏 +𝟐𝒓) 𝒂 −(𝒒𝟏 +(𝒏−𝟏)𝒓)
𝒂 𝒂 𝒂 𝒂
R = {(x, y) ∈ A x B/ y = 𝛴 ((𝑎−(𝑞1)) , (𝑎−(𝑞1+𝑟)) , (𝑎−(𝑞1+2𝑟)) , . . . , (𝑎−(𝑞𝑛)))}
⏟ ⏟ ⏟ ⏟
𝑥1 𝑥2 𝑥3 𝑥𝑛
𝒇𝒇𝑺(𝐱)−1 = 1
𝑓𝑓𝑆 (x) = { 𝒇𝒇𝑺(𝐱)−1 = 𝑎 (𝑠𝑒𝑚𝑖 − 𝑝𝑟𝑖𝑚𝑒 𝑜𝑟 𝑜𝑑𝑑 𝑐𝑜𝑚𝑝𝑜𝑢𝑛𝑑)
𝒇𝒇𝑺(𝐱)−1 = 𝑏 𝑜𝑟 𝑐 (𝑛𝑜𝑛 − 𝑡𝑟𝑖𝑣𝑖𝑎𝑙 𝑑𝑖𝑣𝑖𝑠𝑜𝑟𝑠 𝑜𝑓 𝑎)
𝒂 −1 𝒂 −1
( ) =𝑎( ) + (𝑞1 + 𝑛𝑟) =
𝒂 −(𝒒𝟏 +𝒏𝐫) 𝒂 −(𝒒𝟏 +𝒏𝒓)
𝟏 −1
( ) +2k =
𝟐𝒌+𝟏
2k + 1 + 2k = (4k + 1) → odd number or decimal number = (b or c), if and only if, a is odd compound.∎
are,
𝒂 −1 𝒂 −1
( ) =𝑎( ) + (𝑞n )=
𝒂 −(𝒒𝐧 ) 𝒂 −(𝒒𝒏 )
𝟏 −1 𝒂 𝒂
( ) + 0 = = a, soon, by definition we therefore, 1 = ∎
𝒂 𝟏 𝒂
Observation: Condomain:
If a is a prime number, then (4k + 1 = → Condomain are all the possible for response,
decimal number), with the exception of the trivial brought about by the function 𝑓𝑓𝑆 (x).
divisors of a. D(a) = (1, a, -1, -a).
Let the numbers,
(a), (wz,hhh...), (ef,m), (t), (1), (-b), (-c), (-d), (b), As we have seen in Decomposition of
(c), (d), (e), (w), (h) ∈ ℝ*, Ferrara. The function 𝑓𝑓𝑆 (x) can be
meromorphically extended in with simple polo in
Condomain = {(a), (wz,hhh...), (ef,m), (t),..., (1), (- s = 1, by mean of the function
b), (-c), (-d),...}
(qn = q1 + (n - 1)r = 0), then, 𝛴 ((qn + 2 - 2 = 0),
Example: a = 91, thus Condomain = {(91), (qn - 2 = - 2),...),
(30,333...), (18,2), (13),..., (1), (-2), (-4), (-6), (-
8),...} Which carries→ s = -2Y, ∀ 𝑌 ∈ ℕ*= {(-2, 0), (-4, 0),
(-6, 0),...}∎
3) → Can be concluded by the proof of the Using as a tool the Ferrara Decomposition,
Riemann Hypotesis (presented); we infer that:
𝒂
Soon, ( ) = sup Ω = 1, thus 1 ∈ Ω.
𝒂 −(𝒒𝟏 +(𝒏−𝟏)𝒓)
(iii) (Riemann hypothesis) all non-trivial zeros The density of the set of zeros of the zeta
verify Re(p) = 1/2. function on the critical line in relation to the set of
non-trivial zeros through set Ω of numbers C, such
Thus, the Riemann hypothesis is equivalent that
to 1 ∈ Ω; sup Ω = 1 is equivalent to the statement
𝑁𝑜(𝛵)
(ii).∎ C≤ ≤1
𝑁(𝛵)
Example: a = 91
((a - 1 = q1), (q1 - 2 = q2), (q2 - 2 = q3), (q3 - 2 = q4),...,(qn = q1 + (n - 1)r = 0)).
((91 - 1 = 90), (90 - 2 = 88), (88 - 2 = 86), ..., (qn = 90 + (46 - 1)(- 2) = 0)).
This, it is proved:
𝑁𝑜(𝛵)
≤ 1 = C ≤ 𝑞1
𝟗𝟎
C≤ 𝒂
≤ 1 = C ≤ ≤ 1 = C ≤ 0,98901 ≤ 1
𝑁(𝛵) 𝟗𝟏
𝑁2(𝛵)
C≤ ≤ 1 = C ≤ 𝑞2
𝒂
𝟖𝟖
≤ 1 = C ≤ 𝟗𝟏 ≤ 1 = C ≤ 0,96703 ≤ 1
𝑁(𝛵)
𝑁3(𝛵)
C≤ ≤ 1 = C ≤ 𝑞3
𝒂
𝟖𝟔
≤ 1 = C ≤ 𝟗𝟏 ≤ 1 = C ≤ 0,94505 ≤ 1
𝑁(𝛵)
...
𝑁𝑛(𝛵)
C≤ ≤ 1 = C ≤ 𝑞𝑛
𝒂
𝟎
≤ 1 = C ≤ 𝟗𝟏 ≤ 1 = C ≤ 0 ≤ 1
𝑁(𝛵)
Scale pv:
number of digits Percentage of (pv)
of (a)
2 15% of (a)
10 0,001% = 1 * 10−3
20 0,00 001% = 1 * 10−5
30 0,00 00 001% = 1 * 10−7
40 0,00 00 00 001% = 1 * 10−9
50 0,00 00 00 00 001% = 1 * 10−11
60 0,00 00 00 00 00 001% = 1 * 10−13
70 0,00 00 00 00 00 00 001% = 1 * 10−15
80 0,00 00 00 00 00 00 00 001% = 1 * 10−17
90 0,00 00 00 00 00 00 00 00 001% = 1 * 10−19
100 0,00 00 00 00 00 00 00 00 00 001% = 1 * 10−21
110 0,00 00 00 00 00 00 00 00 00 00 001% = 1 * 10−23
120 0,00 00 00 00 00 00 00 00 00 00 00 001% = 1 * 10−25
130 0,00 00 00 00 00 00 00 00 00 00 00 00 001% = 1 * 10−27
140 0,00 00 00 00 00 00 00 00 00 00 00 00 00 001% = 1 * 10−29
150 0,00 00 00 00 00 00 00 00 00 00 00 00 00 00 001% = 1 * 10−31
160 0,00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 001% = 1 * 10−33
170 0,00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 001% = 1 * 10−35
180 0,00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 001% = 1 * 10−37
190 0,00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 001% = 1 * 10−39
200 0,00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 001% = 1 * 10−41
Table 1: expresses the relationship between the number of digits of the objective number (a) and the
percentage of pv.
Theorem pv: When the objective number (i): In case of (x) is a decimal number, then round
tends to infinity, the percentage of the smallest it to the next odd integer, this value (after
prime factor tends to zero; as well as function rounding), is pv.
𝜋(𝑥)
𝜋(𝑥 ), defined by , where the relative error in Example: a = 91; a = 2 digits, then pv = 15% of
𝑥
this approximation tends to zero when x tends to (a) → Theorem pv
infinity → (the prime number theorem).
Proportion
Notation:
a, p, q, w, x natural numbers.
C, C1, C2 constants.
q1, q2, q3, ...,qn Terms of a AP.
Pv It is an approximation of the smallest prime factor in function of
decimal number place of the objective number.
Re(Z) Real part of the complex z.
x Re (z).
p Prime number.
𝛾 Continuous function𝛾: [𝑎, 𝑏] → ℂ or the set image of this function. Both will
be called paths in ℂ.
AxB Cartesian product of A by B.
𝑓𝑓𝑆 (X) Polynomial function and Deterministic. Determines whether an odd integer a >
1 is prime or compound in polynomial time.
Demonstration Proof
((a - 1 = q1), (q1 - 2 = q2), (q2 - 2 = q3), (q3 - 2 = q4),..., (qn = q1 + (n - 1)r = 0)) (1)
𝒂 𝒂 𝒂 𝒂 𝒂
(( ),( ),( ),( ),..., ( ))(2)
𝒂 − 𝒒𝟏 𝒂 − 𝒒𝟐 𝒂 − 𝒒𝟑 𝒂 − 𝒒𝟒 𝒂 − 𝒒𝒏
(i) When the smallest prime factor is found, the (iii) The numerical value of pv is estabilished by
algorithm will terminate immediately to warn that the scale of the theorem; this theorem pv will be
the objective number is compound. demonstrated in the propositions 1, 2, 3, 4, and 5.
(ii) If the smallest prime factor is not found to pv, Example 1:
then the objective number is prime.
𝟗𝟏 𝟗𝟏
(𝟗𝟏 − 𝟗𝟎) = ( 𝟏 ) = 91;
𝟗𝟏 𝟗𝟏
(𝟗𝟏 − 𝟖𝟖) = ( 𝟑 ) = 30,333;
𝟗𝟏 𝟗𝟏
(𝟗𝟏 − 𝟖𝟔) = ( 𝟓 ) = 18,2;
𝟗𝟏 𝟗𝟏
(𝟗𝟏 − 𝟖𝟒) = ( 𝟕 ) = 13;
(a - (𝑞1 + nr)) = 2k + 1. ∎
c) By the Algorithm (1) (2), we have to:
((a - 1 = q1), (q1 - 2 = q2), (q2 - 2 = q3), (q3 - 2 = q4),..., (qn = q1 + (n - 1)r = 0)) (1)
𝒂 𝒂 𝒂 𝒂 𝒂
(( ),( ),( ),( ),..., ( ))(2)
𝒂 − 𝒒𝟏 𝒂 − 𝒒𝟐 𝒂 − 𝒒𝟑 𝒂 − 𝒒𝟒 𝒂 − 𝒒𝒏
Decomposition of Ferrára.
Definition:
𝒂 𝒂 𝒂 𝒂 𝒂
𝛴 (( ),( ),( ),( ), .. ., ( ))
𝒂 − (𝒒𝟏 ) 𝒂 − (𝒒𝟏 + 𝒓) 𝒂 − (𝒒𝟏 + 𝟐𝒓) 𝒂 − (𝒒𝟏 + 𝟑𝒓) 𝒂 − (𝒒𝟏 + (𝒏 − 𝟏)𝒓)
Proportion
91_100%
{ x = 1365/100
𝑥_15%
x = 13,65 rounded to the next odd integer (x = 15 = pv).
𝒂 𝒂 𝒂 𝒂 𝒂
𝛴 (( ),( ),( ),( ), .. ., ( ))
𝒂 − (𝒒𝟏 ) 𝒂 − (𝒒𝟏 + 𝒓) 𝒂 − (𝒒𝟏 + 𝟐𝒓) 𝒂 − (𝒒𝟏 + 𝟑𝒓) 𝒂 − (𝒒𝟏 + (𝒏 − 𝟏)𝒓)
91 91 91 91
Σ(( ),( ),( ),( ));
91 −(90) 91 −(90−2) 91 −(90−4) 91 −(90−6)
𝒂 𝒂 𝒂 𝒂
R = {(x, y) ∈ A x B/ y = 𝛴 ((𝑎−(𝑞1)) , (𝑎−(𝑞1+𝑟)) , (𝑎−(𝑞1+2𝑟)) , . . . , (𝑎−(𝑞𝑛)))}
⏟ ⏟ ⏟ ⏟
𝑥1 𝑥2 𝑥3 𝑥𝑛
(a), (wz,hhh...), (ef,m), (t), (1), (-b), (-c), (-d), (b), (c), (d), (e), (w), (h) ∈ ℝ*, so,
D = {(1), (b), (c), (d), (e),..., (a)} → natural odd . Im = {(a), (w), (h), (1)}. Example: a = 91, thus
[1, a]. Im = {(91), (13), (7), (1)}
Example: a = 91, thus D = {(1), (3), (5), (7), (9), Function image 𝒇𝒇𝑺(x):
(11),..., (91)} or [1, 91].
𝟏 −1 Observation 1:
( ) +2k =
𝟐𝒌+𝟏
If a is a prime number, then (4k + 1 =
2k + 1 + 2k = (4k + 1) →odd number or decimal decimal number), with the exception of the trivial
number = (b or c), if and only if, a is odd divisors of a. D(a) = (1, a, -1, -a).
compound. ∎
are,
Observation 2: (will be demonstrated in
−𝟏 −𝟏 proof of the Riemann Hypothesis).
𝒇𝒇𝑺(𝐱) = 𝑎 or 𝒇𝒇𝑺(𝐱) = 1, then
𝟏 −1 𝒂
→Already the condomain elements that ∈ ℝ∗− are
( ) + 0 = = a, soon, by definition we the even negative integers, ie they are the zeros of
𝒂 𝟏
𝒂 the function 𝑓𝑓𝑆 (x) in the complex plan.
therefore, 1 = . ∎
𝒂
(−1)𝑚−1 𝑏
𝑚!
∫𝑎 𝑏𝑚 (𝑡)𝑓 (𝑚) (𝑡)𝑑𝑡.
Proof (analytical extension of the Zeta Function) The sum ∑𝑛𝑛=2 𝑛−𝑠 can be found using the formula
sum of Euler-MacLaurin with the function f(x) =
1
The equation 𝜁(𝑠) = ∑∞
𝑛=1 . Can be written as x-s, a = 1 and b = n. Soon,
𝑛𝑠
𝑛 𝑚
1 𝑏𝑘
𝜁 (𝑠) = 1 + lim {∫ 𝑥 −𝑠 𝑑𝑥 + (𝑛−𝑠 − 1) − ∑ 𝑠(𝑠 − 1) … (𝑠 + 𝑘 − 2)
𝑛→∞ 1 2 𝑘!
𝑘=2
1 𝑛
(n-s-k+1-1) - 𝑠(𝑠 + 1) … (𝑠 + 𝑚 − 1) ∫1 𝑏𝑚 (𝑥 )𝑥 −𝑠−𝑚 𝑑𝑥 }.
𝑚!
∞
𝑠(𝑠 + 𝑚 − 1) ∫1 𝑏𝑚 (𝑥 )𝑥 −𝑠−𝑚 𝑑𝑥.
Denoting by fm(s) the function that appers on is uniformly convergent in each closed disk
the right side of this equality, it is easy to prove contained in this semi-plane. As m is a natural
that this is an analytic function in the semi-plne number greater than or equal to 2 arbitrary it
Re(s) > 1 - m, except for the point s = 1 (where it follows that the function Zeta can be
has a simple pole), where as, an integral meromorphically extended in ℂ with simple polo
∞ in s = 1, by means of the functions fm(s).∎
∫1 𝑏𝑚 (𝑥)𝑥 −𝑠−𝑚 𝑑𝑥
So,
𝒂 𝒂 𝒂 𝒂
( )=( )=( )=( )=𝟏
𝒂 −(𝒒𝟏 +(𝒏−𝟏)𝒓) 𝒂 − 𝒒𝒏 𝒂−𝟎 𝒂
Soon,
𝒂
( ) = sup Ω = 1, thus 1 ∈ Ω.
𝒂 −(𝒒𝟏 +(𝒏−𝟏)𝒓)
(ii) the number n0(Τ) of zeros of 𝜁(𝑠) such that β ((a - 1 = q1), (q1 - 2 = q2), (q2 - 2 = q3), (q3 - 2 =
= 1/2 and 0 ≤ γ ≤ Τ is such that q4),..., (qn = q1 + (n - 1)r = 0)).
(iii) (Riemann hypothesis) all non-trivial zeros 𝑓(t) = C (In t)-2/3 (In In t)-1/3; all functions 𝑓 that
verify Re(p) = 1/2. were obtained are such that
lim 𝑓(𝑡) = 0 , t
𝑡→∞
(ii) the number n0(Τ) of zeros of 𝜁(𝑠) such that β Soon, 1 ∈ Ω. What is equivalent to:
= 1/2 and 0 ≤ γ ≤ Τ is such that (iii) (Riemann hypothesis) all non-trivial zeros
Τ verify Re(p) = 1/2. ∎
n0(Τ) = {1 + o(1)} .
2𝜋
Proof that C ≥ 0 𝑁2(𝛵) 𝑞2 𝟖𝟖
C≤ ≤1=C≤ 𝒂
≤ 1 = C ≤ 𝟗𝟏 ≤ 1 = C
𝑁(𝛵)
The density of the set of zeros of the zeta ≤ 0,96703 ≤ 1
function on the critical line in relation to the set of
non-trivial zeros through set Ω of numbers C, such 𝑁3(𝛵) 𝑞3 𝟖𝟔
C≤ ≤1=C≤ 𝒂
≤ 1 = C ≤ 𝟗𝟏 ≤ 1 = C
that 𝑁(𝛵)
≤ 0,94505 ≤ 1
𝑁𝑜(𝛵)
C≤ ≤1 ...
𝑁(𝛵)
Example: 1
(b) = ,
15
pv = 15,
(b) = 0,0666...
1
lim ( ) = 0
𝑝𝑣 →∞ 𝑝𝑣
Scale pv:
Theorem pv:
Theorem pv: When the objective number a = 91; a = 2 digits, then pv = 15% of (a) →
tends to infinity, the percentage of the smallest Theorem pv
prime factor tends to zero; as well as function
𝜋(𝑥) Proportion
𝜋(𝑥 ), defined by , where the relative error in
𝑥 91_100%
this approximation tends to zero when x tends to { x = 1365/100
𝑥_15%
infinity → (the prime number theorem).
x = 13,65 rounded to the next odd integer (x = 15
= pv).
(i): In case of (x) is a decimal number, then round
it to the next odd integer, this value (after Demonstration of the Theorem of pv: propositions
rounding), is pv. 1, 2, 3, 4, and 5.
((9d * 3D); (8d * 4D); (7D * 5D); (6D * 6D)) (8d * 4D); (7D * 5D); (6D * 6D) result in semi-
result in a product semi-prime with more than prime with more than 10 digits.
10 digits. Example:
Similarly,
100 000 007 → the smallest prime number
with 9 digits. (9D * ND) → N ≥ 3,
Proposition 3:
Proportion
DECOMPOSITION OF FERRARA
size = str(a)
size_var = len(size)
print ("The number has ",size_var," digits.")
prime_number = 1
r = -2
q1 = a - 1
qn = q1
counter = 0
result = 0
rest = 0
# CALCULATION OF Pv
if (size_var <= 100):
percent_pv =
[0,15,15,15,5,5,2,2,1,1,0.001,0.00001,0.00001,0.00001,0.00001,0.00001,0.00001,0
.00001,0.00001,0.00001,0.00001,0.0000001,0.0000001,0.0000001,0.0000001,0.000000
1,0.0000001,0.0000001,0.0000001,0.0000001,0.0000001,0.0001,0.0001,0.0001,0.0001
,0.0001,0.0001,0.0001,0.0001,0.0001,0.00001,0.00001,0.00001,0.00001,0.00001,0.0
0001,0.00001,0.00001,0.00001,0.00001,0.000001,0.000001,0.000001,0.000001,0.0000
01,0.000001,0.000001,0.000001,0.000001,0.000001,0.000001,0.0000001,0.0000001,0.
0000001,0.0000001,0.0000001,0.0000001,0.0000001,0.0000001,0.0000001,0.0000001,0
.00000001,0.00000001,0.00000001,0.00000001,0.00000001,0.00000001,0.00000001,0.0
0000001,0.00000001,0.00000001,0.000000001,0.000000001,0.000000001,0.000000001,0
.000000001,0.000000001,0.000000001,0.000000001,0.000000001,0.000000001,0.000000
0001,0.0000000001,0.0000000001,0.0000000001,0.0000000001,0.0000000001,0.0000000
001,0.0000000001,0.0000000001,0.0000000001,0.00000000001]
proportional_value = (a * percent_pv[int(size_var)])/ 100
pv = round(proportional_value)
if (pv % 2 == 0):
pv = pv + 1
if (prime_number != 0):
print ("The number ",a," is a prime number.")
Definition
𝒂 𝒂 𝒂 𝒂 𝒂
𝛴 (( ),( ),( ),( ),...,( ))
𝒒𝟏 𝒒𝟏 + (𝒓) 𝒒𝟏 + (𝟐𝒓) 𝒒𝟏 + (𝟑𝒓) 𝒒𝟏 + (𝒏𝒓)
Example 1:
⏟
99961 * 99971
⏟ =⏟
9 993 201 131
𝑚𝑓𝑝 𝑝 𝑎
√𝑎 → √9993201131 = ⏟
9996𝟓, 9 …
𝑞1
𝒂 𝒂 𝒂 𝒂 𝒂
𝛴 (( ),( ),( ),( ),...,( ))
𝒒𝟏 𝒒𝟏 + (𝒓) 𝒒𝟏 + (𝟐𝒓) 𝒒𝟏 + (𝟑𝒓) 𝒒𝟏 + (𝒏𝒓)
𝟗𝟗𝟗𝟑𝟐𝟎𝟏𝟏𝟑𝟏 𝟗𝟗𝟗𝟑𝟐𝟎𝟏𝟏𝟑𝟏
( )=( ) = 99971
⏟
𝟗𝟗𝟗𝟔𝟓−4
⏟) ⏟
99961
2𝑟 𝑚𝑓𝑝 𝑝
So,
𝒂 𝒂 𝒂
( ) =( )=( )=
𝒒𝟏 +(𝒏𝒓) ((𝒒𝟏 − 𝒎𝒇𝒑) 𝒎𝒐𝒅 (𝒎𝒇𝒑)− 𝒏𝒓) ((𝒒𝟏 − 𝒎𝒇𝒑) 𝒎𝒐𝒅 (𝒎𝒇𝒑)− (𝒒𝟏 − 𝒎𝒇𝒑))
𝒂
(𝒎𝒐𝒅(𝒎𝒇𝒑)) = 𝒎𝒂𝒇𝒑,
Example 2:
⏟
9653704483 * 9883692017
⏟ =⏟
95 414 241 933 104 212 211
𝑚𝑓𝑝 𝑝 𝑎
√𝑎 → √95414241933104212211 = ⏟
976802139𝟐, 9 …
𝑞1
Last number before the (even) point (2) → (q1 - 1) = 9768021392 - 1 = 9768021391
𝒂 𝒂 𝒂 𝒂 𝒂
𝛴 (( ),( ),( ),( ),...,( ))
𝒒𝟏 𝒒𝟏 + (𝒓) 𝒒𝟏 + (𝟐𝒓) 𝒒𝟏 + (𝟑𝒓) 𝒒𝟏 + (𝒏𝒓)
𝟗𝟓𝟒𝟏𝟒𝟐𝟒𝟏𝟗𝟑𝟑𝟏𝟎𝟒𝟐𝟏𝟐𝟐𝟏𝟏
( ) = 9883692017
⏟
9768021391
⏟ + (𝑛𝑟) = 9653704483 𝑝
𝑞1
Python Code
size = str(a)
size_var = len(size)
print ("The number has ",size_var," digits.")
prime_number = 1
q1 = int(math.sqrt(a))
if (q1 % 2 == 0):
q1 = q1 - 1
print ("The odd value of q1 is ",q1)
r = -2
counter = 0
result = 0
subresult = 1
rest = 1
if (rest == 0):
print ("The number ",subresult," is the smallest prime factor of ",a,". So ",a," is a compound number.")
result = 1
prime_number = 0
if (prime_number != 0):
print ("The number ",a," is a prime number.")
New Ferrára's Decomposition (optimized). Be (IV) Minor and first 9Deven → 111111110
⏟ =
example 2: 9𝑑
MDeven
(I) The propositions I, II, II, and IV of the new
Ferrára's Decomposition are valid. (MDeven = q1 - 1D); Table 3 shows the list of
(II) But now the reason → (r = + 2); (1D = 1 numbers MDeven → (1...111...0) up until 99D.
decimal place).
(III) 𝑞⏟
1 - 𝑚𝑓𝑝
⏟ =⏟𝑀𝐷even + 𝑛𝑟 , and, (MDeven
10𝑑 10𝑑 9𝑑
= q1 - 1D).
Definition
𝒂 𝒂 𝒂 𝒂 𝒂
𝛴 (( ),( ),( ),( ),,...,( ))
𝒒𝟏 𝒒𝟏 − (𝑴𝑫𝒆𝒗𝒆𝒏 ) 𝒒𝟏 − (𝑴𝑫𝒆𝒗𝒆𝒏 + 𝒓) 𝒒𝟏 − (𝑴𝑫𝒆𝒗𝒆𝒏 + 𝟐𝒓) 𝒒𝟏 − (𝑴𝑫𝒆𝒗𝒆𝒏 + 𝒏𝒓)
⏟
114316908 - 111111110
⏟ = 3205798
⏟ ,
𝑴𝑫𝒆𝒗𝒆𝒏 + 𝒏𝒓 𝑴𝑫𝒆𝒗𝒆𝒏 𝑛𝑟
3205798
3205798 = n2, n= , (n = 1602899)
2
Therefore,
(MDeven = q1 - 1D) = ⏟
1 … 111 … 0 → is valid for most cases. ∎
𝑞1 − 1D
digits(a) √𝑎 q1 MDeven
10D √10𝐷 5D
20D √20𝐷 10D 9D = 111111110
⏟
9𝑑
30D √30𝐷 15D 14D = ⏟
1 … 111 … 0
14𝑑
40D √40𝐷 20D 19D = ...
50D √50𝐷 25D 24D = ...
60D √60𝐷 30D 29D = ...
70D √70𝐷 35D 34D = ...
80D √80𝐷 40D 39D = ...
90D √90𝐷 45D 44D = ...
100D √100𝐷 50D 49D = ...
110D √110𝐷 55D 54D = ...
Python Code
prime_number = 1
q1 = int(math.sqrt(a))
size_q1 = str(q1)
size_var_q1 = len(size_q1)
verify_final_zero = size_q1[-1:]
if (int(verify_final_zero) == 0):
q1 = q1 + 1
if (q1 % 2 == 0):
q1 = q1 - 1
print ("The odd value of q1 is ",q1)
r=2
counter = 0
result = 0
subresult = 1
rest = 1
if (size_var % 2 == 0):
MDeven_aux = int((size_var / 2) - 1)
else:
MDeven_aux = int(((size_var / 2) + 0.5) - 1)
if (rest == 0):
print ("The number ",subresult," is the smallest prime factor of ",a,". So ",a," is a compound
number.")
result = 1
prime_number = 0
if (prime_number != 0):
print ("The number ",a," is a prime number.")
∴ P1,P2 ⇒ p1,q1 have the same number of decimal The property is valid in √𝑎. ∎
digits.
Propositions (iii) (MDeven' = q1 - 1D).
(i) (𝑞1 - 𝑚𝑓𝑝 = 𝑀𝐷𝑒𝑣𝑒𝑛′ + 𝑛𝑟); r = +2, n ∈ (iv) The extremes (1011 and 8) are fixed, and
ℕ∗ ; 1D = one decimal place. variable 9 repeat it self so many times, as a
function of increasing the number of decimal
(ii) √𝑎 = q1 → whole part, always odd. digits of the given semi-prime.
If the last digit before the comma is even then it is (v) The nine(s) are given by the equation:
used the formula → (q1-1). (MDeven'- 5D).
(vi) Definition:
𝒂 𝒂 𝒂 𝒂 𝒂
𝛴 (( ),( ),( ),( ),,...,( ))
𝒒𝟏 𝒒𝟏 − (𝑴𝑫𝒆𝒗𝒆𝒏 ′) 𝒒𝟏 − (𝑴𝑫𝒆𝒗𝒆𝒏 ′ + 𝒓) 𝒒𝟏 − (𝑴𝑫𝒆𝒗𝒆𝒏 ′ + 𝟐𝒓) 𝒒𝟏 − (𝑴𝑫𝒆𝒗𝒆𝒏 ′ + 𝒏𝒓)
Be the example 2: mfp = smallest prime factor; mafp = highest prime factor
⏟
9653704483 * 9883692017
⏟ =⏟
95 414 241 933 104 212 211 → 20D
𝑚𝑓𝑝 𝑚𝑎𝑓𝑝 𝑎
√𝑎 → √95414241933104212211 = ⏟
976802139𝟐, 9 … ⇒ 9768021391
⏟ → 10D
𝑞1 𝑞1
𝑴𝑫𝒆𝒗𝒆𝒏 ′ = q1 - 1D ⇒ 𝑀𝐷𝑒𝑣𝑒𝑛 ′ = 9D
𝒂 𝒂 𝒂 𝒂 𝒂
𝛴 (( ),( ),( ),( ),,...,( ))
𝒒𝟏 𝒒𝟏 − (𝑴𝑫𝒆𝒗𝒆𝒏 ′) 𝒒𝟏 − (𝑴𝑫𝒆𝒗𝒆𝒏 ′ + 𝒓) 𝒒𝟏 − (𝑴𝑫𝒆𝒗𝒆𝒏 ′ + 𝟐𝒓) 𝒒𝟏 − (𝑴𝑫𝒆𝒗𝒆𝒏 ′ + 𝒏𝒓)
𝟗𝟓𝟒𝟏𝟒𝟐𝟒𝟏𝟗𝟑𝟑𝟏𝟎𝟒𝟐𝟏𝟐𝟐𝟏𝟏 𝟗𝟓𝟒𝟏𝟒𝟐𝟒𝟏𝟗𝟑𝟑𝟏𝟎𝟒𝟐𝟏𝟐𝟐𝟏𝟏
,..., ( )=( ) = 9883692017
⏟ .
𝟗𝟕𝟔𝟖𝟎𝟐𝟏𝟑𝟗𝟏−𝟏𝟏𝟒𝟑𝟏𝟔𝟗𝟎𝟖
⏟ ⏟
𝟗𝟔𝟓𝟑𝟕𝟎𝟒𝟒𝟖𝟑
𝑚𝑎𝑓𝑝
𝑴𝑫𝒆𝒗𝒆𝒏 ′+ 𝒏𝒓 𝒎𝒇𝒑
⏟
9768021391 - 9653704483
⏟ = 114316908
⏟
𝑞1 𝒎𝒇𝒑 𝑴𝑫𝒆𝒗𝒆𝒏 ′+ 𝒏𝒓
Note: If the numbers are about the same size, they DECOMPOSITION and the MDeven numbers
should not be too close due to the fact that they must be used simultaneously.
are factored by the NEW FERRÁRA'S
DECOMPOSITION. So MDeven is the algorithm Example:
for (numbers that are about the same size but not ⏟
1000000007 * ⏟
1000000021 =
too close). Therefore for the FATORATION of 𝑚𝑓𝑝 𝑚𝑎𝑓𝑝
large numbers the NEW FERRÁRA'S ⏟
1000000028000000147
𝑎
√𝑎 → √1000000028000000147 = ⏟
1000000013
𝑞1
𝒂 𝒂 𝒂 𝒂 𝒂
𝛴 (( ),( ),( ),( ),...,( ))
𝒒𝟏 𝒒𝟏 + (𝒓) 𝒒𝟏 + (𝟐𝒓) 𝒒𝟏 + (𝟑𝒓) 𝒒𝟏 + (𝒏𝒓)
(I) ⏟
𝑀𝐷𝑒𝑣𝑒𝑛 − 2𝐷 = 2 … 999 … 8
⏟
𝑀𝐷𝑒𝑣𝑒𝑛𝑋 𝐹𝑖𝑥𝑒𝑑 (2 𝑎𝑛𝑑 8); 𝑉𝑎𝑟𝑖𝑎𝑏𝑙𝑒 9 (𝑀𝐷𝑒𝑣𝑒𝑛−4𝐷)
(II) 𝑀𝐷𝑒𝑣𝑒𝑛
⏟ + 𝑀𝐷𝑒𝑣𝑒𝑛𝑋
⏟ =⏟
111 111 110 + ⏟
2 999 998
9𝐷 7𝐷 𝑀𝐷𝑒𝑣𝑒𝑛 𝑀𝐷𝑒𝑣𝑒𝑛𝑋
= ⏟
114 111 108 + nr
𝑀𝐷𝑒𝑣𝑒𝑛 + 𝑀𝐷𝑒𝑣𝑒𝑛𝑋
Definition
𝒂 𝒂 𝒂 𝒂
𝛴 (( ),( ),( ),...,( ))
𝒒𝟏 𝒒𝟏 − (𝑴𝑫𝒆𝒗𝒆𝒏 ) 𝒒𝟏 − (𝑴𝑫𝒆𝒗𝒆𝒏 + 𝑴𝑫𝒆𝒗𝒆𝒏𝑿) 𝒒𝟏 − ((𝑴𝑫𝒆𝒗𝒆𝒏 + 𝑴𝑫𝒆𝒗𝒆𝒏𝑿) + (𝒏𝒓))
Note
In example 2 on page 43, n = 1 602 899. With the number MDevenX, the value of n became
n = 102 900, therefore an optimization of approximately 93,5%.
(I) ⏟
𝑀𝐷𝑒𝑣𝑒𝑛𝑋 − 1𝐷 = 200 … 999 … 8
⏟
𝑀𝐷𝑒𝑣𝑒𝑛𝑌 (6𝐷) 𝐹𝑖𝑥𝑒𝑑 (200 𝑎𝑛𝑑 8); 𝑉𝑎𝑟𝑖𝑎𝑏𝑙𝑒 9 (𝑀𝐷𝑒𝑣𝑒𝑛𝑋−5𝐷)
(II) 𝑀𝐷𝑒𝑣𝑒𝑛
⏟ + 𝑀𝐷𝑒𝑣𝑒𝑛𝑋
⏟ + 𝑀𝐷𝑒𝑣𝑒𝑛𝑌
⏟ =⏟
111 111 110 + ⏟
2 999 998 + ⏟
200 998
9𝐷 7𝐷 6𝐷 𝑀𝐷𝑒𝑣𝑒𝑛 𝑀𝐷𝑒𝑣𝑒𝑛𝑋 𝑀𝐷𝑒𝑣𝑒𝑛𝑌
Definition
𝒂 𝒂 𝒂
𝛴 (( ),( ),...,( ))
𝒒𝟏 𝒒𝟏 − (𝑴𝑫𝒆𝒗𝒆𝒏 + 𝑴𝑫𝒆𝒗𝒆𝒏𝑿 + 𝑴𝑫𝒆𝒗𝒆𝒏𝒀) + 𝒓 𝒒𝟏 − ((𝑴𝑫𝒆𝒗𝒆𝒏 + 𝑴𝑫𝒆𝒗𝒆𝒏𝑿 + 𝑴𝑫𝒆𝒗𝒆𝒏𝒀) + (𝒏𝒓))
Be (MDevenX → 2...999...9) = 7D
Be (MDevenY → 200...999...8) = 6D
(I) ⏟
𝑀𝐷𝑒𝑣𝑒𝑛 − 5𝐷 = 48 … 000 … 2
⏟
𝑀𝐷𝑒𝑣𝑒𝑛𝑌 (4𝐷) 𝐹𝑖𝑥𝑒𝑑 (48 𝑎𝑛𝑑 2); 𝑉𝑎𝑟𝑖𝑎𝑏𝑙𝑒 0 (𝑀𝐷𝑒𝑣𝑒𝑛−8𝐷)
(II) 𝑀𝐷𝑒𝑣𝑒𝑛
⏟ + 𝑀𝐷𝑒𝑣𝑒𝑛𝑋
⏟ + 𝑀𝐷𝑒𝑣𝑒𝑛𝑌
⏟ + 𝑀𝐷𝑒𝑣𝑒𝑛𝑍
⏟ =
9D 7D 6𝐷 4D
Definition
𝒂
𝛴( ( ))
𝒒𝟏 − ((𝑴𝑫𝒆𝒗𝒆𝒏 + 𝑴𝑫𝒆𝒗𝒆𝒏𝑿 + 𝑴𝑫𝒆𝒗𝒆𝒏𝒀 + 𝑴𝑫𝒆𝒗𝒆𝒏𝒁) + (𝒏𝒓))
Similarly, we prove the optimization of the other MDeven numbers added to the MDevenX,Y,Z numbers. ∎
Python Code
FERRÁRA'S DECOMPOSITION MDeven 1111_111_0 + MDevenX + MDevenY + MDevenZ
import math
import operator
size = str(a)
size_var = len(size)
print ("The number has ",size_var," digits.")
prime_number = 1
q1 = int(math.sqrt(a))
size_q1 = str(q1)
size_var_q1 = len(size_q1)
verify_final_zero = size_q1[-1:]
if (int(verify_final_zero) == 0):
q1 = q1 + 1
if (q1 % 2 == 0):
q1 = q1 - 1
print ("The odd value of q1 is ",q1)
r=2
counter = 0
result = 0
subresult = 1
rest = 1
if (size_var % 2 == 0):
MDeven_aux = int((size_var / 2) - 1)
else:
MDeven_aux = int(((size_var / 2) + 0.5) - 1)
if (rest == 0):
print ("The number ",subresult," is the smallest prime factor of ",a,". So ",a," is a
compound number.")
result = 1
prime_number = 0
if (prime_number != 0):
print ("The number ",a," is a prime number.")
Python Code
import math
import operator
size = str(a)
size_var = len(size)
print ("The number has ",size_var," digits.")
prime_number = 1
q1 = int(math.sqrt(a))
size_q1 = str(q1)
size_var_q1 = len(size_q1)
verify_final_zero = size_q1[-1:]
if (int(verify_final_zero) == 0):
q1 = q1 + 1
if (q1 % 2 == 0):
q1 = q1 - 1
print ("The odd value of q1 is ",q1)
r=2
counter = 0
result = 0
subresult = 1
rest = 1
if (size_var % 2 == 0):
MDeven_aux = int((size_var / 2) - 1)
else:
MDeven_aux = int(((size_var / 2) + 0.5) - 1)
if (rest == 0):
print ("The number ",subresult," is the smallest prime factor of ",a,". So ",a," is a
compound number.")
result = 1
prime_number = 0
if (prime_number != 0):
print ("The number ",a," is a prime number.")
import math
import operator
size = str(a)
size_var = len(size)
print ("The number has ",size_var," digits.")
prime_number = 1
q1 = int(math.sqrt(a))
size_q1 = str(q1)
size_var_q1 = len(size_q1)
verify_final_zero = size_q1[-1:]
if (int(verify_final_zero) == 0):
q1 = q1 + 1
if (q1 % 2 == 0):
q1 = q1 - 1
print ("The odd value of q1 is ",q1)
r=2
counter = 0
result = 0
subresult = 1
rest = 1
if (size_var % 2 == 0):
MDeven_aux = int((size_var / 2) - 1)
else:
MDeven_aux = int(((size_var / 2) + 0.5) - 1)
if (rest == 0):
print ("The number ",subresult," is the smallest prime factor of ",a,". So ",a," is a
compound number.")
result = 1
prime_number = 0
if (prime_number != 0):
print ("The number ",a," is a prime number.")
import math
import operator
size = str(a)
size_var = len(size)
print ("The number has ",size_var," digits.")
prime_number = 1
q1 = int(math.sqrt(a))
size_q1 = str(q1)
size_var_q1 = len(size_q1)
verify_final_zero = size_q1[-1:]
if (int(verify_final_zero) == 0):
q1 = q1 + 1
if (q1 % 2 == 0):
q1 = q1 - 1
print ("The odd value of q1 is ",q1)
r=2
counter = 0
result = 0
subresult = 1
rest = 1
if (size_var % 2 == 0):
MDeven_aux = int((size_var / 2) - 1)
else:
MDeven_aux = int(((size_var / 2) + 0.5) - 1)
if (rest == 0):
print ("The number ",subresult," is the smallest prime factor of ",a,". So ",a," is a
compound number.")
result = 1
prime_number = 0
if (prime_number != 0):
print ("The number ",a," is a prime number.")
import math
import operator
size = str(a)
size_var = len(size)
print ("The number has ",size_var," digits.")
prime_number = 1
q1 = int(math.sqrt(a))
size_q1 = str(q1)
size_var_q1 = len(size_q1)
verify_final_zero = size_q1[-1:]
if (int(verify_final_zero) == 0):
q1 = q1 + 1
if (q1 % 2 == 0):
q1 = q1 - 1
print ("The odd value of q1 is ",q1)
r=2
counter = 0
result = 0
subresult = 1
rest = 1
if (size_var % 2 == 0):
MDeven_aux = int((size_var / 2) - 1)
else:
MDeven_aux = int(((size_var / 2) + 0.5) - 1)
if (rest == 0):
print ("The number ",subresult," is the smallest prime factor of ",a,". So ",a," is a
compound number.")
result = 1
prime_number = 0
if (prime_number != 0):
print ("The number ",a," is a prime number.")
import math
import operator
size = str(a)
size_var = len(size)
print ("The number has ",size_var," digits.")
prime_number = 1
q1 = int(math.sqrt(a))
size_q1 = str(q1)
size_var_q1 = len(size_q1)
verify_final_zero = size_q1[-1:]
if (int(verify_final_zero) == 0):
q1 = q1 + 1
if (q1 % 2 == 0):
q1 = q1 - 1
print ("The odd value of q1 is ",q1)
r=2
counter = 0
result = 0
subresult = 1
rest = 1
if (size_var % 2 == 0):
MDeven_aux = int((size_var / 2) - 1)
else:
MDeven_aux = int(((size_var / 2) + 0.5) - 1)
if (rest == 0):
print ("The number ",subresult," is the smallest prime factor of ",a,". So ",a," is a
compound number.")
result = 1
prime_number = 0
if (prime_number != 0):
print ("The number ",a," is a prime number.")
import math
import operator
size = str(a)
size_var = len(size)
print ("The number has ",size_var," digits.")
prime_number = 1
q1 = int(math.sqrt(a))
size_q1 = str(q1)
size_var_q1 = len(size_q1)
verify_final_zero = size_q1[-1:]
if (int(verify_final_zero) == 0):
q1 = q1 + 1
if (q1 % 2 == 0):
q1 = q1 - 1
print ("The odd value of q1 is ",q1)
r=2
counter = 0
result = 0
subresult = 1
rest = 1
if (size_var % 2 == 0):
MDeven_aux = int((size_var / 2) - 1)
else:
MDeven_aux = int(((size_var / 2) + 0.5) - 1)
if (rest == 0):
print ("The number ",subresult," is the smallest prime factor of ",a,". So ",a," is a
compound number.")
result = 1
prime_number = 0
if (prime_number != 0):
print ("The number ",a," is a prime number.")
Hence come,
⏟
𝑀𝐷𝑒𝑣𝑒𝑛𝑍 = (MDeven - 5D) = 48 … 000 … 2
⏟
44𝐷 𝑓𝑖𝑥𝑒𝑑 (48 𝑎𝑛𝑑 2); 𝑣𝑎𝑟𝑖𝑎𝑏𝑙𝑒 0 (𝑀𝐷𝑒𝑣𝑒𝑛 − 8𝐷)
→ 41 zeros
⏟
𝑀𝐷𝑒𝑣𝑒𝑛𝑊 = (MDeven - 3D) = (128
⏟ … 585) … 000 … 366
46𝐷 𝑓𝑖𝑥𝑒𝑑 (128…585 𝑎𝑛𝑑 366); 𝑣𝑎𝑟𝑖𝑎𝑣𝑒𝑙 0 (𝑀𝐷𝑒𝑣𝑒𝑛 − 47𝐷)
→ 2 zeros
Full number → 1285918457591685656897546671607682635858500366
Be,
Therefore,
⏟ − (𝑀𝐷𝑒𝑣𝑒𝑛𝑥, 𝑦, 𝑧, 𝑤) + 𝑛𝑟
𝑞1
𝑚𝑓𝑝
Soon,
𝑎
(𝑞1−(𝑀𝐷𝑒𝑣𝑒𝑛𝑥,𝑦,𝑧,…,𝑁𝑛)+𝑛𝑟 ),
⏟
𝑚𝑓𝑝
Follow that,
(𝑀𝐷𝑒𝑣𝑒𝑛
⏟ + 𝑀𝐷𝑒𝑣𝑒𝑛𝑋 + 𝑀𝐷𝑒𝑣𝑒𝑛𝑌 + 𝑀𝐷𝑒𝑣𝑒𝑛𝑍 + 𝑀𝐷𝑒𝑣𝑒𝑛𝑊) =
ℎ
1 045 343 918 457 591 685 656 897 546 671 607 682 635 858 500 362
1 045 343 918 457 591 685 656 897 546 671 607 682 635 858 500 362
w-h=0
From this it follows that,
𝑤−ℎ
n=
2
⇒n=0
Soon,
𝑎 𝑎
( )=( ) = mafp. ∎
𝑞1−(𝑀𝐷𝑒𝑣𝑒𝑛𝑥,𝑦,𝑧,…,𝑁𝑛)+𝑛𝑟
⏟ 𝑚𝑓𝑝
𝑚𝑓𝑝
Python Code
import math
import operator
a=
1522605027922533360535618378132637429718068114961380688657908494580122963258952897654
000350692006139
size = str(a)
size_var = len(size)
print ("The number has ",size_var," digits.")
prime_number = 1
q1 = int(math.sqrt(a))
size_q1 = str(q1)
size_var_q1 = len(size_q1)
verify_final_zero = size_q1[-1:]
if (int(verify_final_zero) == 0):
q1 = q1 + 1
if (q1 % 2 == 0):
q1 = q1 - 1
print ("The odd value of q1 is ",q1)
r=2
counter = 0
result = 0
if (size_var % 2 == 0):
MDeven_aux = int((size_var / 2) - 1)
else:
MDeven_aux = int(((size_var / 2) + 0.5) - 1)
if (rest == 0):
print ("The number ",subresult," is the smallest prime factor of ",a,". So ",a," is a compound number.")
result = 1
prime_number = 0
if (prime_number != 0):
print ("The number ",a," is a prime number.")