login
Triangular array T given by rows: T(n,k)=sum of remainders when Euclidean algorithm acts on n,k; for k=1,2,...,n; n >= 1.
8

%I #21 Feb 27 2019 03:50:54

%S 0,0,0,0,1,0,0,0,1,0,0,1,3,1,0,0,0,0,2,1,0,0,1,1,4,3,1,0,0,0,3,0,6,2,

%T 1,0,0,1,0,1,5,3,3,1,0,0,0,1,2,0,6,4,2,1,0,0,1,3,4,1,6,8,6,3,1,0,0,0,

%U 0,0,3,0,8,4,3,2,1,0,0,1,1,1,6,1,7,11,5,4,3,1,0

%N Triangular array T given by rows: T(n,k)=sum of remainders when Euclidean algorithm acts on n,k; for k=1,2,...,n; n >= 1.

%C For a fixed n, {(k,T(n,k)), k=1..n} is conjectured to be fractal in nature (see link). - _Tiberiu Szocs-Mihai_, Aug 17 2015

%H Robert Israel, <a href="/A049828/b049828.txt">Table of n, a(n) for n = 1..10011</a> (rows 1 to 141, flattened)

%H Tiberiu Szocs-Mihai, <a href="http://mathticks.blogspot.ro/2011/01/discrete-connections-part-ii.html">Euclidean fractal (conjectured)</a>, Math Ticks Blog, January 2011.

%H Tiberiu Szocs-Mihai, <a href="http://mathticks.blogspot.ro/2011/01/discrete-connections-part-v.html">Euclidean fractal candidate description</a>, Math Ticks Blog, January 2011.

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/EuclideanAlgorithm.html">Euclidean Algorithm.</a>

%e Rows:

%e 0;

%e 0, 0;

%e 0, 1, 0;

%e 0, 0, 1, 0;

%e 0, 1, 3, 1, 0;

%e 0, 0, 0, 2, 1, 0;

%e 0, 1, 1, 4, 3, 1, 0;

%e ...

%p T:= proc(n,k) option remember;

%p if n*k = 0 then 0 else (n mod k) + procname(k,n mod k) fi

%p end proc:

%p seq(seq(T(n,k),k=1..n), n=1..20); # _Robert Israel_, Aug 31 2015

%t T[n_, k_] := T[n, k] = If[n*k == 0, 0, Mod[n, k] + T[k, Mod[n, k]]];

%t Table[T[n, k], {n, 1, 20}, {k, 1, n}] // Flatten (* _Jean-François Alcover_, Feb 27 2019, after _Robert Israel_ *)

%o (PARI) tabl(nn) = {for (n=1, nn, for (k=1, n, a = n; b = k; r = 1; s = 0; while (r, q = a\b; r = a - b*q; s +=r; a = b; b = r); print1(s, ", ");); print(););} \\ _Michel Marcus_, Aug 17 2015

%Y Row sums are in A049829.

%K nonn,tabl

%O 1,13

%A _Clark Kimberling_