%I #48 Dec 29 2018 15:14:20
%S 5,7,9,8,11,13,15,4,17,19,21,8,23,25,7,27,26,9,31,33,10,35,6,37,39,14,
%T 41,43,45,8,47,49,18,51,16,9,55,21,57,20,59,61,63,8,65,8,25,69,22,11,
%U 73,75,26,45,34,79,81,80,83,85,4,87,28,89,91,3,93,32,95
%N Let k be the n-th composite number: then a(n) is the smallest base b such that b^(k-1) == 1 (mod k).
%H Felix Fröhlich, <a href="/A242742/b242742.txt">Table of n, a(n) for n = 1..8769</a> (all terms up to k=10^4)
%F a(n) = A105222(A002808(n)). - _Michel Marcus_, Aug 21 2014
%t sbb[n_]:=Module[{b=2},While[PowerMod[b,n-1,n]!=1,b++];b]; sbb/@Select[ Range[ 100],CompositeQ] (* Requires Mathematica version 10 or later *) (* _Harvey P. Dale_, Dec 29 2018 *)
%o (PARI) forcomposite(k=2, 1e2, for(b=2, 1e9, if(Mod(b, k)^(k-1)==1, print1(b, ", "); next({2}))); print1(">1e9, "))
%Y Cf. A002808, A001567, A105222, A181780, A211455, A211456, A211457, A211458.
%K nonn
%O 1,1
%A _Felix Fröhlich_, Aug 16 2014