%I #24 Nov 27 2018 03:55:14
%S 3,3,3,5,3,7,3,3,5,5,7,3,3,3,3,3,3,7,3,3,3,7,3,5,3,3,3,3,3,3,3,7,3,3,
%T 5,3,3,3,3,13,3,3,3,3,5,3,3,3,3,7,3,3,13,5,3,7,3,3,3,3,3,7,3,3,3,3,3,
%U 11,3,5,5,3,3,3,5,5,3,5,7,5,5,3,13,3,3
%N a(n) is the smallest base a > 2 such that a^(k-1) != 1 (mod k), where k = A001567(n), the n-th Fermat pseudoprime to base 2.
%C a(n) <= A177415(n).
%C Each a(n) is an odd prime.
%C If k = A001567(n) is a Carmichael number, then a(n) = lpf(k).
%C Conjecture: if k = A001567(n) is semiprime, then a(n) < lpf(k).
%C The smallest numbers k = A001567(n) such that a(n) = prime(m) for m > 1 are 341, 1105, 1729, 75361, 29341, 162401, 334153, ... See A135720 > 561.
%C The smallest such semiprimes are 341, 2701, ?, 721801, ... Cf. A285549.
%e The first Fermat pseudoprime to base 2 is 341, and 341 is not a Fermat pseudoprime to base 3, so a(1) = 3.
%t a[p_] := Module[{m=3}, While[Mod[m^(p-1), p] == 1, m++]; m]; psp = Select[Range[3, 1000000, 2], CompositeQ[ # ] && PowerMod[2, (# - 1), # ] == 1 &]; Map[a, psp] (* _Amiram Eldar_, Nov 19 2018 *)
%Y Cf. A001567, A002997, A083876, A135720, A177415, A214305, A285549.
%Y A141710 is a subsequence.
%K nonn
%O 1,1
%A _Thomas Ordowski_, Nov 19 2018
%E More terms from _Amiram Eldar_, Nov 19 2018