login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A049816 Triangular array T read by rows: T(n,k) = number of nonzero remainders when Euclidean algorithm acts on n and k, for k=1..n, n>=1. 14

%I #19 Nov 29 2023 15:54:10

%S 0,0,0,0,1,0,0,0,1,0,0,1,2,1,0,0,0,0,1,1,0,0,1,1,2,2,1,0,0,0,2,0,3,1,

%T 1,0,0,1,0,1,2,1,2,1,0,0,0,1,1,0,2,2,1,1,0,0,1,2,2,1,2,3,3,2,1,0,0,0,

%U 0,0,2,0,3,1,1,1,1,0,0,1,1,1,3,1,2,4,2,2,2,1,0

%N Triangular array T read by rows: T(n,k) = number of nonzero remainders when Euclidean algorithm acts on n and k, for k=1..n, n>=1.

%H Alois P. Heinz, <a href="/A049816/b049816.txt">Rows n = 1..200, flattened</a>

%e Triangle begins:

%e 0,

%e 0, 0,

%e 0, 1, 0,

%e 0, 0, 1, 0,

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

%e 0, 0, 0, 1, 1, 0,

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

%e 0, 0, 2, 0, 3, 1, 1, 0,

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

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

%e 0, 1, 2, 2, 1, 2, 3, 3, 2, 1, 0,

%e 0, 0, 0, 0, 2, 0, 3, 1, 1, 1, 1, 0,

%e 0, 1, 1, 1, 3, 1, 2, 4, 2, 2, 2, 1, 0,

%e ...

%p T:= proc(x, y) option remember;

%p `if`(y=0, -1, 1+T(y, irem(x, y)))

%p end:

%p seq(seq(T(n, k), k=1..n), n=1..15); # _Alois P. Heinz_, Nov 29 2023

%t R[n_, k_] := R[n, k] = With[{r = Mod[n, k]}, If[r == 0, 1, R[k, r] + 1]];

%t T[n_, k_] := R[n, k] - 1;

%t Table[T[n, k], {n, 1, 13}, {k, 1, n}] // Flatten (* _Jean-François Alcover_, Apr 12 2019, after _Robert Israel_ in A107435 *)

%Y Row sums give A049817.

%K nonn,tabl

%O 1,13

%A _Clark Kimberling_

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 13:27 EDT 2024. Contains 371971 sequences. (Running on oeis4.)