View Single Post
Old 2015-07-11, 14:54   #1
irina
 
Jul 2015

22 Posts
Default Algebraithm for calculating primes

For prime number A, there is only one value B, such that what А + В2 = С2
В = (А-1)/2
С = (А+1)/2
А = С2 – В2 = (С-В)*(С+В)
С – В = 1
If the number of semiprime A = k1 * k2, then there are at least two values, such that А + В2 = С2
1. 1) А = С2 – В2 = (С-В)*(С+В);
k1 = C-B; k2= C + B
B2 = (n + trunc (sqrt (A))2 – A;
n – natural number [1; +∞);
C = n + trunc (sqrt (A))
2. 2) А = С2 – В2 = (С-В)*(С+В); С – В = 1
В = (А-1)/2 (B- maximum)
С = (А+1)/2

Example, А = 21
B1 = (А-1)/2 = (21-1)/2 = 10;
С = (А+1)/2 = (21+1)/2 = 11
21 + 102 = 112
If semiprime A, then there is at least one value В2< B1:
Sqrt (21) = 4,58257..
Trunc (4,58257) = 4
B2 = (n + 4)2 – 21
for n =1 B2 = (1+4)2 – 21 = 4; B = 2;
C = n+ 4 = 1 + 4 =5
A = С2 – В2 = (С-В)*(С+В) = (5 – 2)*(5+2) = 3*7
А=k1 * k2= 3*7

Last fiddled with by Batalov on 2015-07-11 at 16:02 Reason: fixed formatting for squares (only that)
irina is offline   Reply With Quote