%I #14 May 14 2014 14:47:46
%S 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,
%T 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,
%U 4,2,7,2,4,5,5,3,4,3,2,5
%N Number of squares k^2 < prime(n) with k^2*p == 1 (mod prime(n)) for some prime p < prime(n).
%C 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.
%C We have verified this for all n = 4, ..., 10^7. See also A242441 for an extension of the conjecture.
%H Zhi-Wei Sun, <a href="/A242425/b242425.txt">Table of n, a(n) for n = 1..10000</a>
%e a(4) = 1 since 2^2*2 == 1 (mod prime(4)=7).
%e a(6) = 1 since 3^2*3 == 1 (mod prime(6)=13).
%e a(9) = 1 since 4^2*13 == 1 (mod prime(9)=23).
%e a(18) = 1 since 7^2*5 == 1 (mod prime(18)=61).
%e a(30) = 1 since 8^2*83 == 1 (mod prime(30)=113).
%e a(46) = 1 since 10^2*2 == 1 (mod prime(46)=199).
%e a(52) = 1 since 15^2*17 == 1 (mod prime(52)=239).
%e a(97) = 1 since 18^2*11 == 1 (mod prime(97)=509).
%t r[k_,n_]:=PowerMod[k^2,-1,Prime[n]]
%t 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}]
%Y Cf. A000040, A000290, A242441, A242444.
%K nonn
%O 1,5
%A _Zhi-Wei Sun_, May 13 2014