login
Triangle read by rows: T(n,k) = gcd(k,ceiling(n/k)) (1 <= k <= n).
2

%I #18 Feb 10 2021 03:41:28

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

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

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

%N Triangle read by rows: T(n,k) = gcd(k,ceiling(n/k)) (1 <= k <= n).

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

%e Triangle starts:

%e 1;

%e 1, 1;

%e 1, 2, 1;

%e 1, 2, 1, 1;

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

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

%e 1, 2, 3, 2, 1, 2, 1;

%e ...

%p T:=proc(n,k) if k<=n then gcd(k,ceil(n/k)) else 0 fi end: for n from 1 to 16 do seq(T(n,k),k=1..n) od; # yields sequence in triangular form # _Emeric Deutsch_, Jul 26 2006

%t T[n_, k_] := GCD[k, Ceiling[n/k]];

%t Table[T[n, k], {n, 1, 16}, {k, 1, n}] // Flatten (* _Jean-François Alcover_, Feb 10 2021 *)

%Y Cf. A120888.

%K nonn,tabl

%O 1,5

%A _Leroy Quet_, Jul 12 2006

%E More terms from _Emeric Deutsch_, Jul 26 2006