Go Back > Great Internet Mersenne Prime Search > Math > Number Theory Discussion Group

Thread Tools
Old 2020-02-11, 06:43   #1
Feb 2020

1 Posts
Default 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?
AlbenWeeks is offline   Reply With Quote
Old 2020-02-11, 08:59   #2
Nick's Avatar
Dec 2012
The Netherlands

2·3·293 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.
Nick is offline   Reply With Quote
Old 2020-02-12, 06:23   #3
CRGreathouse's Avatar
Aug 2006

597910 Posts

What a fantastic re-discovery! As Nick said, this is Fermat's "little" theorem in base 2, a wonderful result that is very commonly used. Its counterexamples are the base-2 pseudoprimes. You've found a new world to explore.
CRGreathouse is offline   Reply With Quote

Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
What is the Integral of this Function? Toro Analysis & Analytic Number Theory 0 2018-08-25 04:53
A useful function. JM Montolio A Miscellaneous Math 28 2018-03-08 14:29
phi function rula Homework Help 3 2017-01-18 01:41
ARM reveals Cortex A72 details VictordeHolland Hardware 0 2015-04-24 14:49
Wikileaks reveals video Pentagon tried to cover up garo Soap Box 28 2010-04-09 13:19

All times are UTC. The time now is 06:38.

Thu Dec 2 06:38:36 UTC 2021 up 132 days, 1:07, 0 users, load averages: 1.42, 1.42, 1.32

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.