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.

A053761 Least positive integer k for which the Jacobi symbol (k|2*n-1) is less than 1, where 2*n-1 is a nonsquare; a(n)=0 if 2*n-1 is a square.

Original entry on oeis.org

0, 2, 2, 3, 0, 2, 2, 3, 3, 2, 2, 5, 0, 2, 2, 3, 3, 2, 2, 3, 3, 2, 2, 5, 0, 2, 2, 3, 3, 2, 2, 3, 3, 2, 2, 7, 5, 2, 2, 3, 0, 2, 2, 3, 3, 2, 2, 5, 5, 2, 2, 3, 3, 2, 2, 3, 3, 2, 2, 7, 0, 2, 2, 3, 3, 2, 2, 3, 3, 2, 2, 5, 5, 2, 2, 3, 3, 2, 2, 3, 3, 2, 2, 5, 0, 2, 2, 3, 3, 2, 2, 3, 3, 2, 2, 7, 5, 2, 2, 3
Offset: 1

Views

Author

Steven Finch, Apr 05 2000

Keywords

References

  • Steven R. Finch, Mathematical Constants, Cambridge, 2003, pp. 443-448.
  • Paulo Ribenboim, The New Book of Prime Number Records, 3rd ed., Springer-Verlag 1996; Math. Rev. 96k:11112.

Crossrefs

Programs

  • Maple
    A053761 := proc(n) if issqr(2*n-1) then return 0 ; else for k from 1 do if numtheory[jacobi](k,2*n-1) < 1 then return k; end if; end do: end if; end proc: seq(A053761(n),n=1..100) ; # R. J. Mathar, Aug 08 2010
  • Mathematica
    a[n_] := If[IntegerQ[Sqrt[2*n - 1]], Return[0], For[ k = 1, True, k++, If[ JacobiSymbol[k, 2*n - 1] < 1 , Return[k]]]]; Table[a[n], {n, 1, 100}] (* Jean-François Alcover, Jun 20 2013, after R. J. Mathar *)
  • PARI
    A112046(n) = for(i=1,(2*n),if((kronecker(i,(n+n+1)) < 1),return(i)));
    A053761(n) = if(issquare((2*n)-1),0,A112046(n-1));
    for(n=1, 10000, write("b053761.txt", n, " ", A053761(n))); \\ Antti Karttunen, May 10 2017
    
  • Scheme
    (define (A053761 n) (if (= 1 n) 0 (* (- 1 (A010052 (+ n n -1))) (A112046 (- n 1))))) ;; Antti Karttunen, May 10 2017

Formula

a(1) = 0; for n > 1, a(n) = (1-A010052((2*n)-1)) * A112046(n-1). - Antti Karttunen, May 10 2017

Extensions

More terms from R. J. Mathar, Aug 08 2010