%I #14 May 14 2016 13:43:54
%S 1,2,5,5,11,11,16,16,23,23,23,23,47,47,64,64,64,64,71,71,141,141,141,
%T 141,173,173,173,173,173,173,173,201,251,251,251,251,251,251,251,313,
%U 313,313,383,383,383,383,383,519,519,519,519,519,519,519,519,519,601,601,601,601,601,601,601,601,601,601
%N Discriminator of the Catalan numbers A000108.
%C The discriminator of a sequence is the least positive integer k such that the first n terms of the sequence are pairwise distinct modulo k.
%H Robert Israel, <a href="/A273041/b273041.txt">Table of n, a(n) for n = 1..1127</a>
%p N = 100: # to get a(1) .. a(N)
%p F:= proc(m)
%p local G, i,j,x,S;
%p G:= 1+x; S:= {1};
%p for i from 2 do
%p G:= convert(series((x*G^2-1)/(2*x*G-1),x,2^i+1),polynom) mod m;
%p for j from 2^(i-1) to 2^i do
%p S:= S union {coeff(G,x,j)};
%p if nops(S) < j then return j-1 fi
%p od:
%p od
%p end proc:
%p nmax:= 1: A[1]:= 1:
%p for k from 2 while nmax < N do
%p v:= F(k);
%p if v > nmax then
%p for j from nmax+1 to v do A[j]:= k od:
%p nmax:= v;
%p fi:
%p od:
%p seq(A[i],i=1..N); # _Robert Israel_, May 13 2016
%Y Cf. A000108.
%K nonn
%O 1,2
%A _Jeffrey Shallit_, May 13 2016