login
Numbers k such that 3^k - k is prime.
5

%I #24 Sep 26 2023 12:40:01

%S 1,2,8,20,40,104,110,208,472,832,1982,25628,235532

%N Numbers k such that 3^k - k is prime.

%C Except for the first term all terms are of the form 6m+2 or 6m+4. There are no further terms up to 34500. - _Farideh Firoozbakht_, Jul 17 2005

%C a(13) > 2*10^5. - _Robert Price_, Feb 05 2014

%t Do[ If[ PrimeQ[ 3^n - n ], Print[ n ] ], {n, 0, 3000} ]

%o (PARI) for(k=1, 10^6, if(ispseudoprime(3^k-k), print1(k, ", "))); /* _Joerg Arndt_, Apr 07 2013 */

%K nonn,more

%O 1,2

%A _Robert G. Wilson v_, Nov 16 2000

%E a(12) from _Farideh Firoozbakht_, Jul 17 2005

%E a(13) from _Nico Puada_, Sep 18 2023