login
Discriminator of A003095.
2

%I #18 May 14 2016 13:44:01

%S 1,2,5,9,10,10,17,29,29,29,47,47,47,61,71,71,71,101,109,121,121,121,

%T 121,139,139,139,139,139,139,139,139,139,139,274,278,278,278,278,278,

%U 278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278

%N Discriminator of A003095.

%C The discriminator of a sequence is the least integer k such that the first n terms are pairwise incongruent, modulo k.

%H Robert Israel, <a href="/A273044/b273044.txt">Table of n, a(n) for n = 1..10000</a>

%p N:= 1000: # to get a(1)..a(n)

%p nmax:= 0:

%p for m from 1 while nmax <= N do

%p a:= 1 mod m; A:= {a};

%p for n from 1 while nops(A) = n do

%p a:= a^2 +1 mod m;

%p A:= A union {a};

%p od:

%p for k from nmax+1 to n-1 do v[k]:= m od:

%p nmax:= max(nmax, n-1);

%p od:

%p seq(v[k], k=1..N); # _Robert Israel_, May 13 2016

%Y Cf. A003095

%K nonn

%O 1,2

%A _Jeffrey Shallit_, May 13 2016

%E a(31)-a(56) from _Robert Israel_, May 13 2016