Factoring Large Numbers: Challenges and Solutions

  • Thread starter damoclark
  • Start date
  • Tags
    Factoring
In summary, the conversation is about factoring a large number (2^128 + 16 + 1) and the search for efficient ways to factor integers of orders of 10^30 to 10^40. The conversation also touches on finding the largest known value of x for which pi(x) is known, with suggestions to check Andrew Odlyzko's webpage and look for work by Marc Deleglise and Joel Rivat. The conversation also discusses methods for verifying if a number is prime, including using Maple and Primo. The conversation ends with a question about the practicality of calculating pi(344481421025753789822679967).
  • #1
damoclark
25
0
CAn anybody help me with this problem.

I am trying to factor [tex] 2^{128}+16+1 [/tex]

My version of MATLAB can't handle such big numbers, although I have managed to find some small factors. The problem is the larger factors, of which I don't know whether are even prime. If anyone has a good factoring program they can run this number through, I would really appreciate that.

Any help or suggestion on the best way to factor integers of order of [tex]10^{30}[/tex] to [tex] 10^{40}[/tex] would be great.
 
Last edited:
Mathematics news on Phys.org
  • #2
I get almost immediately 3x7x13x461x7848923x344481421025753789822679967. Is that any help?
 
  • #3
And all those are indeed prime (at least according to Maple!)
 
  • #4
robert Ihnot said:
I get almost immediately
3 x 7 x 13 x 461 x 7848923 x 344481421025753789822679967. Is that any help?

That is very helpful, thanks. I was wondering if all the factors could be written down as nth primes, for example 7 is equal to the fourth prime.

I guess that 344481421025753789822679967 can't be written down as an nth prime, as the number of prime numbers under this number is unknown.
Is this correct?

Would someone know the largest value of x for which pi(x) is known, where
pi(x) is the prime counting function, or the most computationally effiecient way of calculating it, without knowledge of all the lesser primes.

Also how can I be so sure that 344481421025753789822679967 is prime?
Is there such a way to be totally sure, as there is when it nends to be demonstrated that a number isn't prime (ie , by finding a factor). It's not that I don't trust computers, but it would nice, given some extra addiational information that maybe a computer could generate, to be able to verify it is prime with pen and paper.
 
Last edited:
  • #5
damoclark said:
Would someone know the largest value of x for which pi(x) is known, where
pi(x) is the prime counting function, or the most computationally effiecient way of calculating it, without knowledge of all the lesser primes.

There's lots of efficient ways to approximate pi(x) which asymptotically approaches the true value. Check out Mathworld on the net. To me, since there is no known way of "predicting" the next prime, then there would be no known way of calculating pi(x) (exactly) without prior knowledge of the primes before it.

Also how can I be so sure that 344481421025753789822679967 is prime? Is there such a way to be totally sure, as there is when it nends to be demonstrated that a number isn't prime (ie , by finding a factor). It's not that I don't trust computers, but it would nice, given some extra addiational information that maybe a computer could generate, to be able to verify it is prime with pen and paper.

There's some methods which give a "very high level" of confidence the number is prime (I'd have to google too), I think based on Fermat's little theorem. But I think the only "guaranteed" method is brute force factoring.

Finally, check out "PARI" on the net. If you're into Number Theory, you'll love PARI. It's extremely efficient. I've used it for work on RSA.
 
  • #6
damoclark said:
Would someone know the largest value of x for which pi(x) is known, where pi(x) is the prime counting function, or the most computationally effiecient way of calculating it, without knowledge of all the lesser primes.

You could check Andrew Odlyzko's webpage. He has a few papers on the topic. I think calculations have been done up to the 10^20 range, look for work by Marc Deleglise and Joel Rivat. I don't really follow computational number theory closely, so there may be much better results out there.

damoclark said:
Also how can I be so sure that 344481421025753789822679967 is prime?
Is there such a way to be totally sure, as there is when it nends to be demonstrated that a number isn't prime (ie , by finding a factor). It's not that I don't trust computers, but it would nice, given some extra addiational information that maybe a computer could generate, to be able to verify it is prime with pen and paper.

If you don't trust maples "very probably prime" report, you can use primo, which declares it to be prime (this is a guarantee, not a probabilistic algorithm).
 
  • #7
saltydog said:
To me, since there is no known way of "predicting" the next prime, then there would be no known way of calculating pi(x) (exactly) without prior knowledge of the primes before it.

This is false. You don't have to compute all the primes less than x to find pi(x) exactly. For example, you can compute [tex]\pi(x)-\pi(x^{1/2})[/tex] by inclusion-exclusion and knowing only those primes less than [tex]x^{1/2}[/tex] (dates back to Legendre). Essentially you are counting integers between x^(1/2) and x that aren't divisible by any primes less than x^(1/2).This isn't the most efficient of methods but the moral is you don't need to know all the primes less than x to find pi(x).
 
  • #8
shmoe said:
This is false. You don't have to compute all the primes less than x to find pi(x) exactly. For example, you can compute [tex]\pi(x)-\pi(x^{1/2})[/tex] by inclusion-exclusion and knowing only those primes less than [tex]x^{1/2}[/tex] (dates back to Legendre). Essentially you are counting integers between x^(1/2) and x that aren't divisible by any primes less than x^(1/2).This isn't the most efficient of methods but the moral is you don't need to know all the primes less than x to find pi(x).

Oh Jesus. Sorry about that damoclark. Next time I'll try to remember to make sure before I say anything. Thank you shmoe for correcting that even though it's embarrassing for me. I've since learned you don't need to know any of the primes to calculate pi(n). Here's one from MathWorld for my education:

[tex]\pi(n)=-1+\sum_{j=3}^{n}((j-2)!-j Floor[\frac{(j-2)!}{j}][/tex]

It will get into multi-precision with the factorials with large n. There's some other ones. Think I should spend time reviewing . . .
 
  • #9
Thanks for the links Shmoe, and salthydog for the reference to PARI

Can I calculate Pi(344481421025753789822679967) practically, though?
where Pi(x) is the prime counting function.
From the methods I've looked at, I figure I would need a powerful computer and about 1 million years of free time to do the calculation.

To calculate Pi(x) for large x, it it entirely possible that no short cuts actually exist, its either, do zillions of computations or have some huge data-base of relevant information, to look up.
 
  • #10
damoclark said:
Thanks for the links Shmoe, and salthydog for the reference to PARI

Can I calculate Pi(344481421025753789822679967) practically, though?
where Pi(x) is the prime counting function.
From the methods I've looked at, I figure I would need a powerful computer and about 1 million years of free time to do the calculation.

To calculate Pi(x) for large x, it it entirely possible that no short cuts actually exist, its either, do zillions of computations or have some huge data-base of relevant information, to look up.

Let's see damoclark . . . don't want to say anything incorrect. Well, according to Mathworld, Gourdon has the record for pi(10^22). I know Gourdon (indirectly). He's an ace with intensive calculations like that. He wrote PIFAST, a very efficient program for calculating the digits of pi and other numbers. So my claim: If Gourdon can only get to 10^22, then there is no quick way to calculate it.

Also, why are you working on that problem?
 
Last edited:
  • #11
saltydog said:
Also, why are you working on that problem?

I will try to explain my problem which prompted me to ask the original question.

The question that I originally possed, came up while I was working on a problem to do with the stucture of numbers.

Where as in binary you can represent any integer, with a sequence of two symbols, those being zero and one, if you know the factorisation of a number it is possible to represent it with a geometric arrangemnet of one symbol, that being 1, where that arrangemnat has the structure of a particular geometric object. When I started rotating these object by 180 degrees, the number they represented shifted to another number, sometimes a rotation of 360 degrees did not bring the object to it's original state.

I took the number 93, represented it by a geometric object, rotated that object by 540 degrees, unfortunately to be able to write down the resulting object I have to know :
Pi(344481421025753789822679967),(where Pi(x) is the prime counting function), which is one of the factors of
[tex] 2^{128}+16+1 [/tex].

From your responses,thanks, I can see that I won't be able to calculate
Pi(344481421025753789822679967), This number is 1000 times bigger than the largest x for which Pi(x) is known. So I figure when computer are 1000 times more powerful than they are today, which by Mores law will be in about 15 years time, it should be able to be calculated...

I guess I'll move on to the next number, 94...
 
Last edited:
  • #12
damoclark said:
where that arrangement has the structure of a particular geometric object

Well, that sounds very interesting. Could you elaborate further or perhaps give me a topic name I could search the web for? If it's related to work you're doing with factoring and wish not to I'd quite understand.
 

1. What is factoring a large number?

Factoring a large number is the process of finding two or more smaller numbers that, when multiplied together, give the original large number. For example, the factors of the number 12 are 3 and 4, since 3 x 4 = 12.

2. Why is factoring a large number important?

Factoring a large number is important in many areas of mathematics, including cryptography and number theory. It is also useful in simplifying algebraic expressions and solving equations.

3. What is the difference between prime and composite numbers?

A prime number is a number that has exactly two factors, 1 and itself. On the other hand, a composite number has more than two factors. For example, 7 is a prime number because its only factors are 1 and 7, while 12 is a composite number because it has the factors 1, 2, 3, 4, 6, and 12.

4. How do you determine if a number is prime or composite?

To determine if a number is prime or composite, you can try dividing it by smaller numbers. If it has only two factors (1 and itself), then it is prime. If it has more than two factors, then it is composite. Additionally, there are various algorithms and tests that can be used to determine if a number is prime or composite.

5. What is the most efficient method for factoring a large number?

The most efficient method for factoring a large number depends on the specific number and its properties. Some commonly used methods include trial division, the Sieve of Eratosthenes, and the quadratic sieve algorithm. However, for extremely large numbers, there is no known efficient method and factoring becomes a difficult problem known as integer factorization.

Similar threads

Replies
2
Views
1K
  • General Math
Replies
2
Views
2K
  • Precalculus Mathematics Homework Help
Replies
1
Views
286
  • Engineering and Comp Sci Homework Help
Replies
32
Views
3K
  • General Math
Replies
9
Views
3K
Replies
6
Views
1K
Replies
2
Views
2K
Replies
66
Views
4K
  • General Math
Replies
12
Views
3K
Back
Top