OFFSET
0,3
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..10000 (first 5001 terms from M. F. Hasler)
Arnold, L. K.; Benkoski, S. J.; and McCabe, B. J.; The discriminator (a simple application of Bertrand's postulate). Amer. Math. Monthly 92 (1985), 275-277.
MAPLE
a:= proc(n) option remember; local m;
for m from `if`(n=1, 1, a(n-1)) while
n<>nops({seq(ithprime(i) mod m, i=1..n)})
do od; m
end: a(0):=0:
seq(a(n), n=0..80); # Alois P. Heinz, May 04 2016
MATHEMATICA
a[0]=0; a[n_]:=Block[{m=1}, While[Length@ DeleteDuplicates@ Mod[Prime@ Range@ n, m] != n, m++]; m]; a /@ Range[0, 74] (* Giovanni Resta, May 04 2016 *)
PROG
(PARI) A272633(nMax)={my(S=[], a=1); vector(nMax, n, S=concat(S, prime(n)); while(#Set(S%a)<n, a++); a)}
CROSSREFS
KEYWORD
nonn
AUTHOR
M. F. Hasler, May 04 2016
STATUS
approved