OFFSET
1,7
COMMENTS
Conjecture: a(n) > 0 for all n > 22. In other words, for any prime p > 80 there is a positive integer k < p/2 such that k + k' is a square, where k' is the unique integer among 1,...,p-1 with k*k' == 1 (mod p).
LINKS
Zhi-Wei Sun, Table of n, a(n) for n = 1..10000
EXAMPLE
a(54) = 1 since 38*218 is congruent to 1 modulo prime(54)=251 with 38 < 251/2, and 38 + 218 = 16^2 is a square.
MATHEMATICA
SQ[n_]:=IntegerQ[Sqrt[n]]
Do[m=0; Do[If[SQ[k+PowerMod[k, -1, Prime[n]]], m=m+1]; Continue, {k, 1, (Prime[n]-1)/2}];
Print[n, " ", m]; Continue, {n, 1, 70}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Zhi-Wei Sun, Aug 04 2015
STATUS
approved