20190312, 08:28  #1 
May 2016
7×23 Posts 
I don't understand this formula ..(((2^p)2)/p)^2
Good morning ,
I tried this formula and it seems that if the number that returns the result is an integer it happens that p is a prime number, vice versa if it is a float number p = is not a prime number. good day to you. Last fiddled with by Godzilla on 20190312 at 08:29 
20190312, 08:48  #2 
"Robert Gerbicz"
Oct 2005
Hungary
1,429 Posts 
Try p=341 (Frédéric Sarrus, 1819!).

20190312, 08:51  #3  
Sep 2002
Database er0rr
110111001011_{2} Posts 
Quote:
Code:
? ((2^3412)/341)^2 172563239398117273000218395474248723524247825368023692410729784705364145650902467350956998726199306256798037938929706033772341405068055342449427015484989122022407614607963613122004059079503254688702500 See: https://en.wikipedia.org/wiki/Fermat_pseudoprime 

20190312, 09:01  #4 
Einyen
Dec 2003
Denmark
3×17×59 Posts 
http://mathworld.wolfram.com/FermatsLittleTheorem.html
Only for primes and pseudoprimes is p a factor of 2^p2 which makes (2^p2)/p an integer. 
20190312, 09:08  #5 
May 2016
7·23 Posts 
Thanks to all of you, now I remember trying a similar formula but giving mod 2, I hadn't noticed the similarity.

20190312, 09:34  #6 
Jun 2003
11352_{8} Posts 
The squaring is useless. It can't turn a fraction into an integer. So, you only need to check if 2^p==2 (mod p). Which is Fermat's little theorem with base = 2

Thread Tools  
Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Can you make mew understand the LLR Test?  a1call  Miscellaneous Math  9  20160920 23:04 
I don't understand these relation counts  fivemack  Msieve  4  20121029 11:26 
Finally I understand EVERYTHING!  Flatlander  Lounge  2  20101010 14:30 
Don't understand instructions for upgrading to v25  John S  Software  22  20081110 21:20 
I just don't understand this  kuratkull  Sierpinski/Riesel Base 5  2  20070312 21:02 