14 lines
384 B
Text
14 lines
384 B
Text
include mpfr.e
|
|
mpz n = mpz_init(), p = mpz_init()
|
|
randstate state = gmp_randinit_mt()
|
|
for i=2 to 159 do
|
|
mpz_ui_pow_ui(n, 2, i)
|
|
mpz_sub_ui(n, n, 1)
|
|
if mpz_probable_prime_p(n, state) then
|
|
mpz_ui_pow_ui(p,2,i-1)
|
|
mpz_mul(n,n,p)
|
|
printf(1, "%d %s\n",{i,mpz_get_str(n,comma_fill:=true)})
|
|
end if
|
|
end for
|
|
n = mpz_free(n)
|
|
state = gmp_randclear(state)
|