OFFSET
1,2
COMMENTS
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.
LINKS
Robert Israel, Table of n, a(n) for n = 1..1127
MAPLE
N = 100: # to get a(1) .. a(N)
F:= proc(m)
local G, i, j, x, S;
G:= 1+x; S:= {1};
for i from 2 do
G:= convert(series((x*G^2-1)/(2*x*G-1), x, 2^i+1), polynom) mod m;
for j from 2^(i-1) to 2^i do
S:= S union {coeff(G, x, j)};
if nops(S) < j then return j-1 fi
od:
od
end proc:
nmax:= 1: A[1]:= 1:
for k from 2 while nmax < N do
v:= F(k);
if v > nmax then
for j from nmax+1 to v do A[j]:= k od:
nmax:= v;
fi:
od:
seq(A[i], i=1..N); # Robert Israel, May 13 2016
CROSSREFS
KEYWORD
nonn
AUTHOR
Jeffrey Shallit, May 13 2016
STATUS
approved