How can I check arbitrary numbers for primality with pfgw?

222 Views Asked by At

I downloaded the program pfgw (executable file for windows) and I wonder if I can check numbers like

$$2^2+3^3+5^5+7^7+11^{11}+...+p^p$$

$p$ a prime number or at least

$$\frac{4\times 10^n-13}{9}$$

The program allows to read numbers from a file generated by newpgen, which sieves out small factors, but only of very special numbers.

The program allows to test a number directly, using the $-q$-flag, which I can use to check $$\frac{4\times 10^n-13}{9}$$ for some concrete $n$, but I do not know how I can do it for, lets say, all $n$ with $1000\le n\le 2000$.

And for numbers of the first form, I do not know, if pfgw allows them at all.

Even better would be, if I could create numbers from the type of this question :

What are the next primes in this sequence?

Who knows the program well enough to help me ?

1

There are 1 best solutions below

1
On BEST ANSWER

The second case is easy. Create a file with

ABC2 (4*10^$a - 13)/ 9

a: from 1000 to 2000

in it.

Not sure the first on is possible, haven't seen a sum function for it.