login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A242444
Number of squares k^2 < n with k^2*p == 1 (mod n) for some prime p < n.
4
0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 2, 0, 1, 1, 0, 0, 2, 0, 2, 0, 0, 1, 1, 0, 2, 1, 2, 0, 2, 0, 3, 0, 1, 1, 1, 1, 2, 1, 0, 0, 2, 1, 2, 2, 1, 1, 2, 0, 3, 0, 1, 2, 2, 2, 1, 0, 2, 2, 2, 0, 1, 3, 0, 2, 2, 2, 2, 1, 2, 0, 2, 0, 2, 2, 2, 2, 3, 1, 3, 0
OFFSET
1,11
COMMENTS
According to the conjecture in A242441, a(n) > 0 for all n > 1848.
EXAMPLE
a(9) = 1 since 2^2*7 == 1 (mod 9).
MATHEMATICA
r[k_, n_]:=PowerMod[k^2, -1, n]
Do[m=0; Do[If[GCD[k, n]==1&&PrimeQ[r[k, n]], m=m+1], {k, 1, Sqrt[n-1]}]; Print[n, " ", m]; Continue, {n, 1, 80}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Zhi-Wei Sun, May 14 2014
STATUS
approved