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.

A086508 If n is even, a(n) = smallest prime == -1 (mod n), If n is odd, a(n) = smallest prime == 1 (mod n).

Original entry on oeis.org

2, 3, 7, 3, 11, 5, 29, 7, 19, 19, 23, 11, 53, 13, 31, 31, 103, 17, 191, 19, 43, 43, 47, 23, 101, 103, 109, 83, 59, 29, 311, 31, 67, 67, 71, 71, 149, 37, 79, 79, 83, 41, 173, 43, 181, 137, 283, 47, 197, 149, 103, 103, 107, 53, 331, 167, 229, 173, 709, 59, 367, 61, 127
Offset: 1

Views

Author

Amarnath Murthy, Jul 29 2003

Keywords

Crossrefs

Programs

  • Mathematica
    Join[{2},With[{prs=Prime[Range[500]]},Flatten[Table[If[OddQ[n],Select[ prs,Mod[#,n] == 1&,1],Select[prs,Mod[#,n]==n-1&,1]],{n,70}]]]] (* Harvey P. Dale, Nov 16 2013 *)

Extensions

More terms from David Wasserman, Mar 09 2005