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.

A242425 Number of squares k^2 < prime(n) with k^2*p == 1 (mod prime(n)) for some prime p < prime(n).

Original entry on oeis.org

0, 0, 0, 1, 2, 1, 2, 2, 1, 2, 3, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 3, 3, 3, 3, 3, 2, 4, 2, 1, 4, 3, 4, 4, 3, 4, 2, 2, 2, 8, 2, 2, 2, 6, 5, 1, 4, 2, 5, 3, 3, 1, 2, 6, 4, 4, 2, 3, 3, 3, 5, 2, 3, 2, 5, 5, 4, 8, 4, 2, 7, 2, 4, 5, 5, 3, 4, 3, 2, 5
Offset: 1

Views

Author

Zhi-Wei Sun, May 13 2014

Keywords

Comments

Conjecture: a(n) > 0 for all n > 3. In other words, for any prime p > 5, there exists a positive square k^2 < p such that the inverse of k^2 mod p among 1, ..., p-1 is prime.
We have verified this for all n = 4, ..., 10^7. See also A242441 for an extension of the conjecture.

Examples

			a(4) = 1 since 2^2*2 == 1 (mod prime(4)=7).
a(6) = 1 since 3^2*3 == 1 (mod prime(6)=13).
a(9) = 1 since 4^2*13 == 1 (mod prime(9)=23).
a(18) = 1 since 7^2*5 == 1 (mod prime(18)=61).
a(30) = 1 since 8^2*83 == 1 (mod prime(30)=113).
a(46) = 1 since 10^2*2 == 1 (mod prime(46)=199).
a(52) = 1 since 15^2*17 == 1 (mod prime(52)=239).
a(97) = 1 since 18^2*11 == 1 (mod prime(97)=509).
		

Crossrefs

Programs

  • Mathematica
    r[k_,n_]:=PowerMod[k^2,-1,Prime[n]]
    Do[m=0;Do[If[PrimeQ[r[k,n]],m=m+1],{k,1,Sqrt[Prime[n]-1]}];Print[n," ",m];Continue,{n,1,80}]