%I #28 Sep 14 2015 17:57:49
%S 1,2,2,3,3,4,4,5,5,6,7,7,8,9,9,10,11,11,12,13,13,14,14,15,16,16,17,17,
%T 18,19,19,20,20,21,22,22,23,23,24,25,25,26,26,27,28,28,29,29,30,31,31,
%U 32,33,33,34,34,35,36,36,37,38,38,39
%N a(n) = Max{k from {1..n} | T(n,k) = A049831(n)}, where T(n,k) is the triangle defined at A049828.
%C For the n-th row of the triangle T(n,k) defined in A049828, a(n) is the largest index where the maximum of that row, namely A049831(n), is obtained.
%C Conjecture: a(n)/n -> (sqrt(5)-1)/2, see Szocs-Mihai link.
%H Tiberiu Szocs-Mihai, <a href="http://mathticks.blogspot.ro/2011/01/discrete-connections-part-iv.html">Convergence of euclidean summation function</a>, Math Ticks Blog, January 2011.
%o (PARI) t(n, k) = {x = n; y = k; r = 1; s = 0; while (r, q = x\y; r = x - y*q; s +=r; x = y; y = r;); s;}
%o row(n) = vector(n, k, t(n, k));
%o a(n) = v = row(n); vm = vecmax(v); forstep(k=n, 1, -1, if (v[k] == vm, return(k))); \\ _Michel Marcus_, Aug 31 2015
%Y Cf. A049828, A049831.
%K nonn,easy
%O 1,2
%A _Tiberiu Szocs-Mihai_, Aug 10 2015