OFFSET
2,1
COMMENTS
The question arose when seeking triples of numbers for which the sum of the squares of any two is congruent to 1 modulo the third.
From Robert Israel, Feb 04 2018: (Start)
For n > 7, a(n)>= 7, as there are at least the following pairs:
(1,n+1), (n,2*n), (2*n,3*n), ((n^2-n)/2,(n^2+n)/2), (n^2-n,n^2), (n^2,n^2+n), and (3*n, 4*n) (if n is odd) or (n/2,3*n/2) (if n is even).
If k in A299159 is sufficiently large, then a(12*k-2)=7. Dickson's conjecture implies there are infinitely many such k, and thus infinitely many n with a(n)=7. (End)
LINKS
Robert Israel, Table of n, a(n) for n = 2..10000
MAPLE
a:= n-> (s-> add(`if`(i+n in s, 1, 0), i=s))(
numtheory[divisors](n^2*(n^2-1))):
seq(a(n), n=2..100); # Alois P. Heinz, Feb 01 2018
MATHEMATICA
Array[With[{d = Divisors[# (# - 1)] &[#^2]}, Count[d + #, _?(MemberQ[d, #] &)]] &, 71, 2] (* Michael De Vlieger, Feb 01 2018 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
John H Mason, Feb 01 2018
STATUS
approved