OFFSET
2,3
COMMENTS
The smallest prime factor of 3^n+1 of the form 2k*n+1 is A189241(n).
LINKS
Amiram Eldar, Table of n, a(n) for n = 2..658
EXAMPLE
a(4) = 5 because 3^4+1 = 2*41 => the smallest prime divisor of the form 2k*n+1 is 41 = 2*5*4+1.
MATHEMATICA
Table[p=First/@FactorInteger[3^n+1]; (Select[p, Mod[#1, n] == 1 &, 1][[1]]
- 1)/(2n), {n, 2, 40}]
PROG
(PARI) a(n)=forstep(K=2*n+1, 3^n+1, 2*n, if(Mod(3, K)^n==0, return((k-1)/2/n))) \\ Charles R Greathouse IV, May 15 2013
CROSSREFS
KEYWORD
nonn
AUTHOR
Michel Lagneau, Apr 19 2011
STATUS
approved