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.

A038204 Least k such that factorials have exactly n distinct residues mod k.

Original entry on oeis.org

1, 2, 3, 5, 7, 11, 22, 25, 55, 13, 26, 17, 34, 57, 76, 95, 23, 46, 29, 58, 31, 62, 93, 155, 319, 37, 74, 129, 41, 82, 47, 94, 141, 235, 53, 106, 59, 118, 71, 142, 61, 67, 134, 73, 146, 219, 365, 511, 79, 158, 237, 395, 553, 1241, 83, 166, 332, 747, 89, 178, 291, 485
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A038203.

Programs

  • Mathematica
    s = Table[Length@ Union@ Mod[Range[10^3]!, n], {n, 2000}]; Table[FirstPosition[s, n], {n, 62}] // Flatten (* Michael De Vlieger, Aug 03 2016, Version 10 *)
  • PARI
    a(n)=my(k=n,t=1); while(#Set(vector(k,i,t=(t*i)%k))!=n, k++; t=1); k \\ Charles R Greathouse IV, Aug 03 2016