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.

Showing 1-2 of 2 results.

A094928 Let p = n-th prime == 1 mod 8 (A007519); a(n) = smallest prime q such that p is not a square mod q.

Original entry on oeis.org

3, 3, 5, 3, 5, 3, 3, 5, 3, 7, 3, 3, 5, 5, 3, 3, 7, 5, 3, 5, 3, 3, 5, 3, 7, 3, 3, 5, 3, 7, 3, 3, 3, 3, 5, 3, 3, 11, 5, 3, 3, 11, 5, 3, 11, 3, 7, 3, 5, 7, 3, 3, 3, 3, 7, 3, 3, 7, 5, 3, 3, 5, 5, 11, 5, 3, 3, 5, 5, 3, 7, 5, 3, 5, 3, 7, 3, 7, 3, 5, 3, 3, 3, 5, 11, 5, 3, 5, 3, 3, 13, 5, 3, 3, 3, 3, 5, 5, 3, 5, 3, 7
Offset: 1

Views

Author

N. J. A. Sloane, Jun 19 2004

Keywords

Examples

			n=3, p = 73, a(3) = q = 5: Legendre(73,5) = -1.
		

References

  • M. Kneser, Quadratische Formen, Springer, 2002; see Hilfssatz 18.3.

Crossrefs

Subsequence of A094929.

Programs

  • Maple
    f:= proc(p) local q;
         q:= 3:
         do
          if numtheory:-quadres(p,q) = -1 then return q fi;
          q:= nextprime(q);
         od;
    end proc:
    map(f, select(isprime, [seq(p,p=1..10000,8)])); # Robert Israel, May 06 2019
  • Mathematica
    f[n_] := Prime[ Position[ JacobiSymbol[n, Select[Range[3, n - 1], PrimeQ[ # ] &]], -1][[1, 1]] + 1]; f /@ Select[ Prime[ Range[435]], Mod[ #, 8] == 1 &] (* Robert G. Wilson v, Jun 23 2004 *)

Formula

a(n) = A094929(A269704(n)). - Robert Israel, May 06 2019

Extensions

More terms from Robert G. Wilson v, Jun 23 2004

A269703 Numbers k such that prime(k) == 1 (mod 7).

Original entry on oeis.org

10, 14, 20, 30, 31, 45, 47, 52, 60, 68, 75, 82, 87, 90, 94, 101, 113, 115, 120, 122, 126, 132, 134, 144, 153, 156, 162, 163, 169, 177, 183, 192, 209, 213, 220, 226, 233, 239, 250, 251, 262, 267, 269, 288, 295, 304, 306, 315, 320, 324, 330, 337, 342, 344, 346
Offset: 1

Views

Author

Vincenzo Librandi, Mar 04 2016

Keywords

Comments

The asymptotic density of this sequence is 1/6 (by Dirichlet's theorem). - Amiram Eldar, Mar 01 2021

Examples

			a(1) = 10 because prime(10) = 29 and 29 == 1 (mod 7).
		

Crossrefs

The associated primes are in A004619.
Sequences of numbers n such that prime(n) == 1 (mod k): A091178 (k=3,6), A080147 (k=4), A049511 (k=5,10), this sequence (k=7), A269704 (k=8), A269705 (k=9).

Programs

  • Magma
    [n: n in [1..500] | NthPrime(n) mod 7 eq 1];
    
  • Mathematica
    Select[Range[500], Mod[Prime[#], 7] == 1 &]
  • PARI
    lista(nn) = for(n=1, nn, if(Mod(prime(n),7)==1, print1(n, ", "))); \\ Altug Alkan, Mar 04 2016

Formula

a(n) ~ 6*n. - Charles R Greathouse IV, Sep 20 2016 [Corrected by Amiram Eldar, Mar 01 2021]
Showing 1-2 of 2 results.