Last updated 2004-06-28 by Roedy
Green ©1996-2004 Canadian Mind Products
Java definitions: 0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
You are here : home : Java Glossary : P words : primes.
Mersenne primes are convenient for computing. The have the form 2n-1. The Mersenne primes that fall into the range of longs are:
| Mersenne Primes | |||||||||
|---|---|---|---|---|---|---|---|---|---|
| n | 2 | 3 | 5 | 7 | 13 | 17 | 19 | 31 | 61 |
| 2n-1 (hex) | 0x3 | 0x7 | 0x1f | 0x7f | 0x1fff | 0x1ffff | 0x7ffff | 0x7fffffff | -0x1fffffffffffffffL |
| 2n-1 (decimal) | 3 | 7 | 31 | 127 | 8,191 | 131,071 | 524,287 | 2,147,483,647 | 2,305,843,009,213,693,951 |
See BigInteger.isProbablyPrime().
home |
Canadian Mind Products | |||
| mindprod.com IP:[24.87.56.253] | ||||
| Your IP:[80.134.30.163] | ||||
| You are visitor number 978. | ||||
| Please send errors, omissions and suggestions | ||||
| to improve this page to Roedy Green. | ||||
| You can get a fresh copy of this page from: | or possibly from your local J: drive mirror: | |||
| http://mindprod.com/jgloss/primes.html | J:\mindprod\jgloss\primes.html | |||