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).

This page as a plain text file.
%I A086508 #9 Dec 09 2020 21:15:43
%S A086508 2,3,7,3,11,5,29,7,19,19,23,11,53,13,31,31,103,17,191,19,43,43,47,23,
%T A086508 101,103,109,83,59,29,311,31,67,67,71,71,149,37,79,79,83,41,173,43,
%U A086508 181,137,283,47,197,149,103,103,107,53,331,167,229,173,709,59,367,61,127
%N A086508 If n is even, a(n) = smallest prime == -1 (mod n), If n is odd, a(n) = smallest prime == 1 (mod n).
%t A086508 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 *)
%Y A086508 Cf. A034694, A038700, A086507.
%K A086508 nonn
%O A086508 1,1
%A A086508 _Amarnath Murthy_, Jul 29 2003
%E A086508 More terms from _David Wasserman_, Mar 09 2005