login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A272633 Discriminator of the primes: Least m > 0 such that (prime(1),...,prime(n)) are all different mod m; a(0) = 0 by convention. 3

%I #21 Oct 27 2023 21:58:22

%S 0,1,2,4,6,7,7,13,13,13,19,19,19,23,23,23,31,31,31,33,37,37,43,43,47,

%T 49,53,53,53,55,61,63,67,73,73,75,75,79,83,83,89,89,91,91,97,103,103,

%U 109,113,113,115,117,119,121,121,121,121,121,139,139,141,141,151,153,157,157,159,167,169,169,175,181,181,183,187

%N Discriminator of the primes: Least m > 0 such that (prime(1),...,prime(n)) are all different mod m; a(0) = 0 by convention.

%H Alois P. Heinz, <a href="/A272633/b272633.txt">Table of n, a(n) for n = 0..10000</a> (first 5001 terms from M. F. Hasler)

%H Arnold, L. K.; Benkoski, S. J.; and McCabe, B. J.; <a href="http://www.jstor.org/stable/2323651">The discriminator (a simple application of Bertrand's postulate)</a>. Amer. Math. Monthly 92 (1985), 275-277.

%p a:= proc(n) option remember; local m;

%p for m from `if`(n=1, 1, a(n-1)) while

%p n<>nops({seq(ithprime(i) mod m, i=1..n)})

%p do od; m

%p end: a(0):=0:

%p seq(a(n), n=0..80); # _Alois P. Heinz_, May 04 2016

%t 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 *)

%o (PARI) A272633(nMax)={my(S=[],a=1);vector(nMax, n, S=concat(S,prime(n)); while(#Set(S%a)<n, a++); a)}

%Y Cf. A016726, A192419, A192420.

%K nonn

%O 0,3

%A _M. F. Hasler_, May 04 2016

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 17:29 EDT 2024. Contains 371962 sequences. (Running on oeis4.)