login
Smallest prime factor of 3^n - 2^n.
1

%I #15 Oct 10 2019 22:24:07

%S 5,19,5,211,5,29,5,19,5,23,5,53,5,19,5,129009091,5,1559,5,19,5,47,5,

%T 101,5,19,5,68629840493971,5,617671248800299,5,19,5,29,5,8891471,5,19,

%U 5,821,5,431,5,19,5,1129,5,29,5,19,5,19383245658672820642055731,5,23,5,19,5

%N Smallest prime factor of 3^n - 2^n.

%C Theorem I. If n is prime and the prime factors of b^n - (b-1)^n are p_1, p_2, p_3, ..., p_i & i <=1, then p_i == 1 (mod n) for all i's. This is a result from Fermat's little theorem.

%C Theorem II. If n is not prime and n = d_1 * d_2 * d_3 * ... * d_j and the prime factors of b^n - (b-1)^n are p_1, p_2, p_3, ..., p_i & i < 1, then some prime factors, q_1, q_2, q_3, ..., q_k & k <= 1 are not primitive, i.e., they are prime factors of b^d_j - (b-1)^d_j. Excluding from the list of p_i those which are not primitive, then the rest are also == 1 (mod n). In fact, these two theorems may be generalized for a and b, (a,b) and (a^n +- b^n)/(a +- b).

%H Chai Wah Wu, <a href="/A089082/b089082.txt">Table of n, a(n) for n = 2..598</a>

%e 3^9 - 2^9 = 19*1009.

%e 3^17 - 2^17 = 129009091.

%t PrimeFactors[n_] := Flatten[ Table[ #[[1]], {1}] & /@ FactorInteger[n]]; Do[ Print[ PrimeFactors[3^n - 2^n][[1]]], {n, 2, 60}] (* _Robert G. Wilson v_, Dec 05 2003 *)

%o (PARI) leastfactor(a,n) = { for(x=2,n, y = a^x-(a-1)^x; f = factor(y); v = component(component(f,1),1); print1(v",") ) }

%K nonn

%O 2,1

%A _Cino Hilliard_, Dec 04 2003