OFFSET
1,4
COMMENTS
Conjecture: a(n) > 0 for all n > 7. In other words, for any prime p > 17 there are two integers k and k' among 1,...,p-1 with k*k' == 1 (mod p) such that k + k' is a triangular number.
See also A260928 for a similar conjecture involving squares.
LINKS
Zhi-Wei Sun, Table of n, a(n) for n = 1..10000
EXAMPLE
a(5) = 7 since 7*8 is congruent to 1 modulo prime(5)=11, and 7 + 8 = 5*6/2 is a triangular number.
a(8) = 18 since 18*18 is congruent to 1 modulo prime(8)=19, and 18 + 18 = 8*9/2 is a triangular number.
MATHEMATICA
TQ[n_]:=IntegerQ[Sqrt[8n+1]]
Do[Do[If[TQ[k+PowerMod[k, -1, Prime[n]]], Print[n, " ", k]; Goto[aa]]; Continue, {k, 1, Prime[n]-1}];
Print[n, " ", 0]; Label[aa]; Continue, {n, 1, 70}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Zhi-Wei Sun, Aug 04 2015
STATUS
approved