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.

A174840 Least k such that the primes 3 to prime(k+1) form a complete residue system (mod prime(n)).

Original entry on oeis.org

3, 7, 9, 13, 26, 26, 42, 32, 65, 63, 84, 74, 89, 162, 110, 126, 177, 169, 144, 171, 214, 196, 237, 238, 323, 297, 363, 344, 327, 515, 441, 543, 420, 481, 612, 494, 604, 543, 646, 552, 645, 644, 519, 742, 593, 737, 644, 851, 1012, 787, 1204, 727, 899, 800, 1046
Offset: 1

Views

Author

Keith Backman, Mar 30 2010

Keywords

Comments

If the value of the terminal prime is given rather than its index in the list of odd primes, the sequence becomes 7 19 29 43 103 103 191 137 347 311 439
In other words, the odd primes no larger than 7 form a complete residue set mod 3, the odd primes no larger than 19 form a complete residue set mod 5, and so forth

Programs

  • Mathematica
    Table[p=Prime[n]; k=1; While[u=Union[Mod[Prime[Range[2,k]], p]]; u != Range[0,p-1], k++ ]; k-1, {n,2,100}] (* T. D. Noe, Apr 02 2010 *)

Extensions

Name improved by T. D. Noe, Apr 05 2010
Corrected and extended by T. D. Noe, Apr 02 2010