0
$\begingroup$

Is there a method to construct very big numbers in a given interval, with rectangular distribution, by selecting prime factors randomly?

I want to study factorizations of the kind $a=b\cdot c$, where $b$ is the biggest possible factor which can be written as a sum of two squares.


I finally found Bach's algorithm about generation of pre-factored uniformly distributed random numbers:

http://www.cs.cmu.edu/afs/cs.cmu.edu/academic/class/15750-s02/www/dartboard.pdf

  • 0
    What is a "rectangular distribution" ? Do you perhaps mean "uniform distribution" ?2017-01-29
  • 1
    @Peter, yes, it's the same distribution.2017-01-29
  • 0
    And which size does the interval, in which the number should lie, have ? And how many distinct prime factors should the number have ?2017-01-29
  • 0
    @Peter: any possible.2017-01-29
  • 0
    What should be helpful : A natural number $n>1$ is expressible as a sum of two perfect squares (There are integers $a,b$ with $a^2+b^2=n$) , if and only if every exponent in the prime factorization, belonging to a prime factor of the form $4k+3$, is even.2017-01-29
  • 0
    So, the number $c$ must be either $1$ or a product of distinct prime numbers, each of the form $4k+3$2017-01-29
  • 0
    @Peter: Yes, as you wrote. But the only realistic way is to use numbers with known prime factors. What I need is an algorithm for choosing prime numbers in the intervall $2,...,n$, where $n$ is an upper limit of the number to be constructed. The probability to get the prime number $p$ should be $1/p$.2017-01-29
  • 0
    Do you mean that every prime has the same chance to be chosen ?2017-01-29
  • 0
    @Peter, no! The chance that $p$ is chosen is $1/p$ as long as $p$ is possible (not to big).2017-01-29

0 Answers 0