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.

A306220 a(n) is the smallest prime p such that Kronecker(-n,p) = -1.

Original entry on oeis.org

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

Views

Author

Jianing Song, Jan 29 2019

Keywords

Comments

A companion sequence to A092419.
Conjecture: lim sup log(a(n))/log(n) = 0. For example, it seems that log(a(n))/log(n) < 0.5 for all n > 1364.

Crossrefs

Cf. A092419.
See A306224 for another version.

Programs

  • Maple
    # This requires Maple 2016 or later
    f:= proc(n) local p;
      p:= 2;
      while NumberTheory:-KroneckerSymbol(-n,p) <> -1 do p:= nextprime(p) od:
      p
    end proc:
    map(f, [$1..100]); # Robert Israel, Feb 17 2019
  • Mathematica
    a[n_] := For[p = 2, True, p = NextPrime[p], If[KroneckerSymbol[-n, p] == -1, Return[p]]];
    Array[a, 100] (* Jean-François Alcover, Jun 18 2020 *)
  • PARI
    a(n) = forprime(p=2, , if(kronecker(-n, p)<0, return(p)))

Formula

a(n) = 2 if and only if n == 3, 5 (mod 8). See A047621.
a(n) = 3 if and only if n == 1, 4, 7, 10, 16, 22 (mod 24).