login
Least prime dividing 2^n+3.
1

%I #7 Oct 10 2019 04:02:22

%S 2,5,7,11,19,5,67,131,7,5,13,7,4099,5,7,32771,65539,5,262147,29,7,5,

%T 13,7,1549,5,7,4057,268435459,5,1073741827,83,7,5,13,7,61,5,7,63727,

%U 19,5,307,11,7,5,13,7,853,5,7,967,373,5,1422061,36028797018963971,7,5,13

%N Least prime dividing 2^n+3.

%C All terms except for a(0)=2 are odd primes >= 5. (3 cannot divide 2^k+3 because 2 = -1 (mod 3).)

%H Chai Wah Wu, <a href="/A162491/b162491.txt">Table of n, a(n) for n = 0..699</a>

%F If n=1 (mod 4), then a(n)=5 (since 2^4=1 (mod 5)).

%F If n=2 (mod 6) (or if n=1 (mod 3) but not (mod 4)), then a(n)=7 (since 2^3=1 (mod 7)).

%e a(0)=2 is the smallest prime factor of 2^0+3 = 4.

%e a(1)=5 is the smallest prime factor of 2^1+3 = 5.

%o (PARI) A162491(n)=factor(2^n+3)[1,1]

%o /* more efficient for large numbers with small divisors: */

%o A162491(n)={my(p);while(Mod(2,p=nextprime(p+1))^n+3,);p}

%K nonn

%O 0,1

%A _M. F. Hasler_, Sep 09 2009