%I #15 May 18 2018 06:26:50
%S 1,2,6,9,11,14,14,18,19,22,22,31,31,31,31,38,38,38,38,43,43,46,46,59,
%T 59,59,59,59,59,62,62,67,67,71,71,79,79,79,79,83,83,86,86,94,94,94,94,
%U 103,103,103,103,107,107,118,118,118,118,118,118,127,127,127,127,131,131,134,134,139,139
%N Smallest k such that 1^4, 2^4, 3^4,... ,n^4 are distinct modulo k.
%C The discriminator D(4,n).
%H Alois P. Heinz, <a href="/A192420/b192420.txt">Table of n, a(n) for n = 1..1000</a>
%H P. Moree, H. Roskam, <a href="http://www.fq.math.ca/Scanned/33-4/moree.pdf">On an arithmetical function related to Euler's totient and the discriminator</a>, Fib. Quart. 33 (4) (1995), 332-340
%p dis := proc(j,n) local k,s,i; for k from 1 do s := {} ; for i from 1 to n do s := s union { (i^j) mod k} ; end do: if nops(s) = n then return k; end if; end do: end proc:
%p A192420 := proc(n) dis(4,n) ; end proc:
%t a[n_] := For[k = 1, True, k++, If[Unequal @@ PowerMod[Range[n], 4, k], Return[k]]]; Array[a, 100] (* _Jean-François Alcover_, May 18 2018 *)
%o (PARI) A192420(nMax,f=n->n^4)={my(S=[],a=1); vector(nMax,n,S=concat(S,f(n));while(#Set(S%a)<n,a++);a)} \\ _M. F. Hasler_, May 04 2016
%Y Cf. A016726, A192419.
%K nonn
%O 1,2
%A _R. J. Mathar_, Jun 30 2011