20200211, 06:43  #1 
Feb 2020
1_{16} Posts 
Function that reveals primes... NOT
I've probably only found something that already existed, but am posting here to find out.
Let ((2^n)2)/n = x for any positive integer n, if x is a whole number, n is prime. if x is not a whole number, n is not prime. Is this something basic that's been found before? If so can someone let me know what this is called or why it works if there's a basic reason I'm missing? 
20200211, 08:59  #2 
Dec 2012
The Netherlands
1761_{10} Posts 
It's Fermat's little theorem.
x can be whole without n being prime however  for example, try n=341. Then look up Carmichael numbers. 
20200212, 06:23  #3 
Aug 2006
3·1,993 Posts 
What a fantastic rediscovery! As Nick said, this is Fermat's "little" theorem in base 2, a wonderful result that is very commonly used. Its counterexamples are the base2 pseudoprimes. You've found a new world to explore.

Thread Tools  
Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
What is the Integral of this Function?  Toro  Analysis & Analytic Number Theory  0  20180825 04:53 
A useful function.  JM Montolio A  Miscellaneous Math  28  20180308 14:29 
phi function  rula  Homework Help  3  20170118 01:41 
ARM reveals Cortex A72 details  VictordeHolland  Hardware  0  20150424 14:49 
Wikileaks reveals video Pentagon tried to cover up  garo  Soap Box  28  20100409 13:19 