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.

A273041 Discriminator of the Catalan numbers A000108.

Original entry on oeis.org

1, 2, 5, 5, 11, 11, 16, 16, 23, 23, 23, 23, 47, 47, 64, 64, 64, 64, 71, 71, 141, 141, 141, 141, 173, 173, 173, 173, 173, 173, 173, 201, 251, 251, 251, 251, 251, 251, 251, 313, 313, 313, 383, 383, 383, 383, 383, 519, 519, 519, 519, 519, 519, 519, 519, 519, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601
Offset: 1

Views

Author

Jeffrey Shallit, May 13 2016

Keywords

Comments

The discriminator of a sequence is the least positive integer k such that the first n terms of the sequence are pairwise distinct modulo k.

Crossrefs

Cf. A000108.

Programs

  • Maple
    N = 100: # to get a(1) .. a(N)
    F:= proc(m)
      local G, i,j,x,S;
      G:= 1+x; S:= {1};
      for i from 2 do
        G:= convert(series((x*G^2-1)/(2*x*G-1),x,2^i+1),polynom) mod m;
        for j from 2^(i-1) to 2^i do
          S:= S union {coeff(G,x,j)};
          if nops(S) < j then return j-1 fi
        od:
      od
    end proc:
    nmax:= 1: A[1]:= 1:
    for k from 2 while nmax < N do
      v:= F(k);
      if v > nmax then
        for j from nmax+1 to v do A[j]:= k od:
        nmax:= v;
      fi:
    od:
    seq(A[i],i=1..N); # Robert Israel, May 13 2016