20150711, 14:54  #1 
Jul 2015
2^{2} Posts 
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 = CB; 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 = (211)/2 = 10; С = (А+1)/2 = (21+1)/2 = 11 21 + 10^{2} = 11^{2} 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 20150711 at 16:02 Reason: fixed formatting for squares (only that) 
20150711, 17:57  #2 
Bamboozled!
May 2003
Down not across
2·71^{2} Posts 

20150711, 21:16  #3 
"Dana Jacobsen"
Feb 2011
Bangkok, TH
2·11·41 Posts 
For even more awesomeness you could use Deterministic MR with ceil(n/4) as the limit.
(I really wish the previously referenced task could be renamed, as far too many people think what is described is actually AKS) Tempted to post the primality regex... Last fiddled with by danaj on 20150711 at 21:17 
20150713, 12:24  #4  
Nov 2003
16433_{8} Posts 
Quote:
You have failed to specify any kind of procedure. All you have done is assert the existence of some values satisfying some relations. 

20150713, 12:27  #5 
Undefined
"The unspeakable one"
Jun 2006
My evil lair
1010110100001_{2} Posts 

20150816, 01:55  #6  
Aug 2002
Buenos Aires, Argentina
1,319 Posts 
Quote:


20180528, 13:50  #7 
Jul 2015
4_{10} Posts 
Mersenne prime number search algorithm
?
Last fiddled with by irina on 20180528 at 14:00 
Thread Tools  
Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
A New Methodology For Calculating Primes  howequan  No Prime Left Behind  4  20171030 09:00 
calculating with circles  diep  Homework Help  9  20140712 12:14 
Calculating optimal P1 memory  Uncwilly  Lounge  5  20130515 23:29 
Calculating E based on B1  c10ck3r  Math  1  20120222 06:29 
Calculating a difficult sum  CRGreathouse  Math  3  20090825 14:11 