4

This question is inspired by this question

For an odd positive integer $n$ , define $$f(n):=\frac{(n-1)^n+1}{n^2}$$ as in the linkes question.

For which $n$ is this expression prime , for which $n$ semiprime ?

We get a prime for $n=5$ and $n=19$ and no other $n\le 10^4$. Also , there is no perfect power for $n\le 10^4$. The first few semiprime cases can be found with PARI/GP using the self-defined function

f(n)=((n-1)^n+1)/n^2

and the code

gp > forstep(j=1,50,2,s=f(j);if(bigomega(s)==2,print(j,"   ",component(factor(s),1)~)))
7   [29, 197]
9   [19, 87211]
17   [354689, 2879347902817]
47   [659, 969475768419121812072683722330195828343461703895587337828075618847710907]
gp >

The next semiprime has a spectacular factorization :

FF 53 88 (52^53+1)/2809<88> = 181194015068926422899222020415627<33> · 1743739577...51<56>

And the next has an incredible factorization (I wonder whether it was found by ECM or the quadratic sieve) :

FF 103 203 (102^103+1)/10609<203> = 1657792308...87<74> · 4371325251...23<130>

What are the next $n$'s in both cases ?

Peter
  • 86,576

0 Answers0