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-6 of 6 results.

A067073 Records in A092419.

Original entry on oeis.org

3, 7, 13, 17, 19, 31, 37, 41, 43, 47, 53, 71, 79, 89, 103, 127, 131, 137, 151
Offset: 1

Views

Author

N. J. A. Sloane, Oct 16 2008

Keywords

Comments

The old entry with this sequence number was a duplicate of A049236.

Crossrefs

Programs

  • Maple
    A000037 := proc(n) n +floor(1/2+sqrt(n)) ; end: A092419 :=proc(n) local i, k; k := A000037(n) ; for i from 1 do if numtheory[legendre](k, ithprime(i)) = -1 then RETURN(ithprime(i)); fi; od; end: rec := -1 ; for n from 1 do a := A092419(n) ; if a > rec then printf("%d,\n",a) ; rec := a; fi; od: # R. J. Mathar, Jul 13 2009

Extensions

a(8)-a(12) from R. J. Mathar, Jul 13 2009
a(13)-a(19) from Sean A. Irvine, Dec 02 2023

A070040 Where records occur in A092419.

Original entry on oeis.org

1, 4, 12, 104, 231, 380, 3039, 12070, 22609, 47955, 60409, 182492, 859647, 8039644, 11990003, 78269808, 6091154409, 6941215856, 13803257219
Offset: 1

Views

Author

N. J. A. Sloane, Oct 16 2008

Keywords

Comments

The old entry with this sequence number was a duplicate of A056924.

Crossrefs

Formula

A092419(a(n))=A067073(n). [From R. J. Mathar, Jul 13 2009]

Extensions

a(8)-a(12) from R. J. Mathar, Jul 13 2009
a(13)-a(19) from Sean A. Irvine, Dec 02 2023

A232931 The least positive integer k such that Kronecker(D/k) = -1 where D runs through all positive fundamental discriminants (A003658).

Original entry on oeis.org

2, 3, 5, 2, 3, 2, 7, 5, 2, 5, 2, 7, 3, 3, 2, 3, 5, 13, 2, 3, 2, 5, 7, 2, 2, 5, 3, 3, 2, 5, 2, 3, 11, 2, 3, 11, 7, 7, 2, 7, 3, 3, 2, 7, 2, 3, 11, 2, 3, 2, 5, 5, 2, 5, 2, 11, 3, 3, 5, 2, 7, 11, 2, 3, 2, 5, 7, 2, 2, 5, 3, 3, 2, 7, 3, 11, 2, 3, 7, 7, 5, 2, 5, 2, 13, 3, 3, 2, 2, 3, 2, 3, 2, 5, 5, 11, 2, 7, 5, 3, 3, 5, 2, 3, 13, 5, 2, 3, 2, 17, 2, 2, 7, 3, 3, 2, 13, 2, 5, 2, 3, 5, 7, 5, 2, 5, 2, 11, 3, 2, 5, 2, 3, 7, 2, 3, 2, 17, 5, 7, 2, 7, 2, 5, 3, 3, 7, 2, 3, 7, 5, 2, 3
Offset: 2

Views

Author

Steven Finch, Dec 02 2013

Keywords

Comments

From Jianing Song, Jan 30 2019: (Start)
a(n) is necessarily prime. Otherwise, if a(n) is not prime, we have (D/p) = 0 or 1 for all prime divisors p of a(n), so (D/a(n)) must be 0 or 1 too, a contradiction.
a(n) is the least inert prime in the real quadratic field with discriminant D, D = A003658(n). (End)

Examples

			A003658(3) = 8, (8/3) = -1 and (8/2) = 0, so a(3) = 3.
		

Crossrefs

Programs

  • Mathematica
    nMax = 200; A003658 = Select[Range[4nMax], NumberFieldDiscriminant[Sqrt[#]] == #&]; f[d_] := For[k = 1, True, k++, If[FreeQ[{0, 1}, KroneckerSymbol[d, k]], Return[k]]]; a[n_] := f[A003658[[n]]]; Table[a[n], {n, 2, nMax}] (* Jean-François Alcover, Nov 05 2016 *)
  • PARI
    lp(D)=forprime(p=2,,if(kronecker(D,p)<0,return(p)))
    for(n=5,1e3,if(isfundamental(n),print1(lp(n)", "))) \\ Charles R Greathouse IV, Apr 23 2014

Formula

With D = A003658(n): Mollin conjectured, and Granville, Mollin, & Williams proved, that for n > 1128, a(n) <= D^0.5 / 2. Treviño proves that for n > 484, a(n) <= D^0.45. Asymptotically the best known upper bound for the exponent is less than 0.16 when D is prime and 1/4 + epsilon (for any epsilon > 0) for general D. - Charles R Greathouse IV, Apr 23 2014 (corrected by Enrique Treviño, Mar 18 2022)
a(n) = A092419(A003658(n) - floor(sqrt(A003658(n)))), n >= 2. - Jianing Song, Jan 30 2019

Extensions

Name simplified by Jianing Song, Jan 30 2019

A144294 Let k = n-th nonsquare = A000037(n); then a(n) = smallest prime p such that k is not a square mod p.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Dec 03 2008

Keywords

Comments

In a posting to the Number Theory List, Oct 15 2008, Kurt Foster remarks that a positive integer M is a square iff M is a quadratic residue mod p for every prime p which does not divide M. He then asks how fast the present sequence grows.

Crossrefs

For records see A144295, A144296. See A092419 for another version.

Programs

  • Maple
    with(numtheory); f:=proc(n) local M,i,j,k; M:=100000; for i from 2 to M do if legendre(n,ithprime(i)) = -1 then RETURN(ithprime(i)); fi; od; -1; end;
  • PARI
    a(n)=my(k=n+(sqrtint(4*n)+1)\2); forprime(p=2,, if(!issquare(Mod(k,p)), return(p))) \\ Charles R Greathouse IV, Aug 28 2016
    
  • Python
    from math import isqrt
    from sympy.ntheory import nextprime, legendre_symbol
    def A144294(n):
        k, p = n+(m:=isqrt(n))+(n>=m*(m+1)+1), 2
        while (p:=nextprime(p)):
            if legendre_symbol(k,p)==-1:
                return p # Chai Wah Wu, Oct 20 2024

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

A373088 a(n) = min{k : KroneckerSymbol(n, k) = -1} if n is not a square, 0 otherwise.

Original entry on oeis.org

0, 0, 3, 2, 0, 2, 7, 5, 3, 0, 7, 2, 5, 2, 3, 13, 0, 3, 5, 2, 3, 2, 5, 3, 7, 0, 3, 2, 5, 2, 11, 7, 3, 5, 7, 2, 0, 2, 3, 11, 7, 3, 5, 2, 3, 2, 11, 3, 5, 0, 3, 2, 5, 2, 7, 7, 3, 5, 5, 2, 13, 2, 3, 5, 0, 3, 7, 2, 3, 2, 13, 3, 5, 5, 3, 2, 7, 2, 5, 11, 3, 0, 5, 2
Offset: 0

Views

Author

Peter Luschny, May 26 2024

Keywords

Crossrefs

Similar: A092419, A144294.
Cf. A372728.

Programs

  • Maple
    K := (n, k) -> NumberTheory:-KroneckerSymbol(n, k):
    a := proc(n) if issqr(n) then return 0 fi;
    local k; k := 0;
        while true do
            if K(n, k) = -1 then return k fi;
            k := k + 1;
    od; -1; end:
    seq(a(n), n = 0..83);
  • PARI
    a(n) = if (issquare(n), 0, my(k=1); while (kronecker(n,k) != -1, k++); k); \\ Michel Marcus, May 31 2024
  • SageMath
    def A373088(n):
        if is_square(n): return 0
        k = 0
        while True:
            if kronecker_symbol(n, k) == -1:
                return k
            k += 1
        return k
    print([A373088(n) for n in range(83)])
    

Formula

If n is not a square then a(n) is a prime number.
Showing 1-6 of 6 results.