login
Smallest b > 1 not already in the sequence such that b^(c-1) == 1 (mod c), i.e., c is a base-b Fermat pseudoprime, where c is the n-th composite number (A002808).
1

%I #5 Jan 19 2019 23:21:35

%S 5,7,9,8,11,13,15,4,17,19,21,20,23,25,18,27,26,29,31,33,10,35,6,37,39,

%T 14,41,43,45,19,47,49,30,51,16,53,55,34,57,56,59,61,63,62,65,12,67,69,

%U 22,71,73,75,74,77,76,79,81,80,83,85,38,87,28,89,91,3,93

%N Smallest b > 1 not already in the sequence such that b^(c-1) == 1 (mod c), i.e., c is a base-b Fermat pseudoprime, where c is the n-th composite number (A002808).

%C Is this a permutation of the positive integers > 1?

%o (PARI) my(v=vector(1)); forcomposite(c=1, 50, my(b=2); while(Mod(b, c)^(c-1)!=1, b++; if(Mod(b, c)^(c-1)==1, for(k=1, #v, if(b==v[k], b++)))); v=concat(v, b); print1(v[#v], ", "))

%Y Cf. A002808, A242742, A259234, A323603.

%K nonn

%O 1,1

%A _Felix Fröhlich_, Jan 19 2019