OFFSET
1,2
COMMENTS
Values of a(n) such that a(n) is prime are 2, 3, 5, 11, 13, 29, 53, 59, 61, 83, 89, 127, 131, 137, 139, 173, ...
Conjecture: lim_{n->inf} a(n)/(2n) = 1, with both variables x and y taking values asymptotically close to n. - Andres Cicuttin, Oct 18 2018
LINKS
Altug Alkan, Table of n, a(n) for n = 1..1000
EXAMPLE
a(1) = 0 because x = y = 1 is only option.
a(13) = a(14) = a(15) = 18 because (7^2 + 13^2) mod (7 + 13) = 18 is the largest corresponding remainder for them.
MATHEMATICA
a[n_]:=Table[Table[Mod[x^2+y^2 , x+y], {x, 1, y}], {y, 1, n}]//Flatten//Max;
Table[a[n], {n, 1, 100}]
PROG
(PARI) a(n) = vecmax(vector(n, x, vecmax(vector(x, y, (x^2+y^2) % (x+y))))); \\ after Michel Marcus at A302245
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Altug Alkan and Andres Cicuttin, Apr 12 2018
STATUS
approved