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”).
%I #25 Oct 23 2018 03:04:41
%S 0,2,3,4,5,6,10,11,12,13,14,16,18,18,18,26,27,28,29,30,32,32,33,34,35,
%T 40,40,40,50,51,52,53,54,55,56,57,58,59,60,61,62,63,72,72,72,82,83,84,
%U 85,86,87,88,89,90,91,92,98,98,98,98,98,98,99,100,104,104,122,123,124,125,126,127,128,129,130,131,132
%N a(n) is the maximum remainder of x^2 + y^2 divided by x + y with 0 < x <= y <= n.
%C 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, ...
%C 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
%H Altug Alkan, <a href="/A302706/b302706.txt">Table of n, a(n) for n = 1..1000</a>
%e a(1) = 0 because x = y = 1 is only option.
%e a(13) = a(14) = a(15) = 18 because (7^2 + 13^2) mod (7 + 13) = 18 is the largest corresponding remainder for them.
%t a[n_]:=Table[Table[Mod[x^2+y^2 ,x+y],{x,1,y}],{y,1,n}]//Flatten//Max;
%t Table[a[n],{n,1,100}]
%o (PARI) a(n) = vecmax(vector(n, x, vecmax(vector(x, y, (x^2+y^2) % (x+y))))); \\ after _Michel Marcus_ at A302245
%Y Cf. A053626, A302245.
%K nonn,easy
%O 1,2
%A _Altug Alkan_ and _Andres Cicuttin_, Apr 12 2018