cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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

Original entry on oeis.org

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, 49, 53, 53, 53, 55, 61, 63, 67, 73, 73, 75, 75, 79, 83, 83, 89, 89, 91, 91, 97, 103, 103, 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
Offset: 0

Views

Author

M. F. Hasler, May 04 2016

Keywords

Crossrefs

Programs

  • 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 *)
  • PARI
    A272633(nMax)={my(S=[],a=1);vector(nMax, n, S=concat(S,prime(n)); while(#Set(S%a)