OFFSET
1,2
COMMENTS
The discriminator D(3,n).
It appears that a(n) ~ n. Is there an explicit formula as for A016726? - M. F. Hasler, May 04 2016
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
P. Moree, H. Roskam, On an arithmetical function related to Euler's totient and the discriminator, Fib. Quart. 33 (4) (1995) 332-340
MAPLE
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:
A192419 := proc(n) dis(3, n) ; end proc:
MATHEMATICA
dmk[n_]:=Module[{k=1, res}, While[res=Table[PowerMod[i, 3, k], {i, n}]; Length[ res]!= Length[Union[res]], k++]; k]; Array[dmk, 90] (* Harvey P. Dale, Jan 28 2013 *)
PROG
(PARI) A192419(nMax)={my(S=[], a=1); vector(nMax, n, S=concat(S, n^3); while(#Set(S%a)<n, a++); a)} \\ M. F. Hasler, May 04 2016
CROSSREFS
KEYWORD
nonn
AUTHOR
R. J. Mathar, Jun 30 2011
STATUS
approved