mersenneforum.org Prime check need
 Register FAQ Search Today's Posts Mark Forums Read

 2007-04-06, 19:16 #1 bggashnik   Apr 2007 22 Posts Prime check need Is there any site or program i can test if one array is prime number?You have to know that the array is very long number and the algoithm should be fast...Thank you in advance
 2007-04-06, 19:21 #2 akruppa     "Nancy" Aug 2002 Alexandria 2,467 Posts What do you mean by "array?" Do you have an array of many large numbers to test, or maybe an array of "unsigned int" that form one large number? How large exactly is the number? Do you want a test that tells primality with extremely low, but non-zero probability of error, or does it have to be a mathematical proof? Alex
 2007-04-06, 20:32 #3 bggashnik   Apr 2007 22 Posts I mean string and "char" type.The lenght of the string is about 10 miliion symbols.Is there any software,code or algorithm to check if it is prime?
2007-04-06, 21:25   #4
Mini-Geek
Account Deleted

"Tim Sorbera"
Aug 2006
San Antonio, TX USA

102538 Posts

Quote:
 Originally Posted by bggashnik I mean string and "char" type.The lenght of the string is about 10 miliion symbols.Is there any software,code or algorithm to check if it is prime?
10 million symbols that are how many different things per symbol? This makes a huge difference. There could be two things per symbol, in which case your number is 2^10000000, or, for all we know, it could be 10 million different per symbol, making it 10000000^10000000. Please clarify by saying how many digits it is and what form of number it is (or the number itself if you don't mind saying it), so we can figure out what factoring/primality test would be the most efficient.

 2007-04-06, 23:32 #5 ewmayer ∂2ω=0     Sep 2002 República de California 7×11×151 Posts If by "symbol" he means anything encoding a single bit or more, no, there is no known algorithm to test 10M-symbol numbers not having any special algebraic form for rigorous primality. A probably-prime test might be within reach, if the symbols are decimal digits or smaller.
2007-04-07, 02:16   #6
potonono

Jun 2005
USA, IL

193 Posts

Quote:
 I mean string and "char" type.The length of the string is about 10 miliion symbols.Is there any software,code or algorithm to check if it is prime?
I must be dealing with end users way to much since it sounds obviously clear to me that what we have is appoximately a 10 million digit number saved entirely as a string. We can access the individual digits as characters of the string's "array". I don't know if any algorithm to take a number in that form, but I haven't really looked either..

 2007-04-07, 07:37 #7 bggashnik   Apr 2007 22 Posts The string contains about 10 million digits.I thought it isn't so difficult to understand.I read in this forum that i can test if the number is prime with prime95 program but first i should register myself in GIMPS project.Is it right?:surprised
2007-04-07, 07:46   #8
bggashnik

Apr 2007

22 Posts

Quote:
 Originally Posted by potonono I must be dealingth end users way to much since it sounds obviously clear to me that what we have is appoximately a 10 million digit number saved entirely as a string. We can access the individual digits as characters of the string's "array". I don't know if any algorithm to take a number in that form, but I haven't really looked either..
yeah that's right! I searched Google for java based sites which test if a number is prime but the limit of digits is only 20.The main problem is that I can't find anywhere algorithm or program which could test my string.

2007-04-07, 10:37   #9
ET_
Banned

"Luigi"
Aug 2002
Team Italia

4,813 Posts

Quote:
 Originally Posted by bggashnik The string contains about 10 million digits.I thought it isn't so difficult to understand.I read in this forum that i can test if the number is prime with prime95 program but first i should register myself in GIMPS project.Is it right?:surprised
GIMPS can only prove primality of numbers of the form 2p-1 with p prime.

If your number is not built on this form, you have no chance to test it.

Also please note that if you use GIMPS to test your number, and the number is prime, you must share the EFF prize as explained here.

Luigi

Last fiddled with by ET_ on 2007-04-07 at 10:38

2007-04-07, 11:06   #10
paulunderwood

Sep 2002
Database er0rr

32·11·37 Posts

Quote:
 Pfgw can work with numbers from 2 up to almost 2^79700000 (about 24000000 digits). It can find probable primes with Fermat's method, with bases from 2 to 256
from section A.3 of the pfgwdoc.txt file that comes with PFGW. That's 24 million decimal digits.

Last fiddled with by paulunderwood on 2007-04-07 at 11:06

 2007-04-07, 15:26 #11 akruppa     "Nancy" Aug 2002 Alexandria 2,467 Posts The question of whether you need a *proof* of primality, or merely a primality test with very small chance of error, is unanswered. If you need the former, getting a positive result is out of the question, unless your number is of a very specific form. If the latter will do, PFGW sounds like a good way to go. Alex

 Similar Threads Thread Thread Starter Forum Replies Last Post odin Software 4 2010-04-16 05:59 Vandor Information & Answers 3 2008-11-27 15:25 Vandor Software 1 2008-10-10 05:52 Mini-Geek No Prime Left Behind 33 2008-03-07 23:43 Unregistered Software 6 2004-06-19 08:18

All times are UTC. The time now is 13:52.

Fri May 7 13:52:42 UTC 2021 up 29 days, 8:33, 0 users, load averages: 2.98, 3.06, 2.86