login
Triangular array T read by rows: T(n,k) = Sum_{j=1..k} (n mod floor(k/j)) for n, k >= 1.
7

%I #17 Sep 08 2022 08:44:58

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

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

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

%N Triangular array T read by rows: T(n,k) = Sum_{j=1..k} (n mod floor(k/j)) for n, k >= 1.

%H G. C. Greubel, <a href="/A049783/b049783.txt">Rows n = 1..100 of triangle, flattened</a>

%e Triangle T(n,k) (with rows n >= 1 and columns k >= 1) begins as follows:

%e 0;

%e 0, 0;

%e 0, 1, 0;

%e 0, 0, 1, 0;

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

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

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

%e ...

%p seq(seq( add(`mod`(n, floor(k/j)), j=1..k), k=1..n), n=1..15); # _G. C. Greubel_, Dec 12 2019

%t Table[Sum[Mod[n, Floor[k/j]], {j,k}], {n,15}, {k,n}] (* _G. C. Greubel_, Dec 12 2019 *)

%o (PARI) T(n,k) = sum(j=1,k, lift(Mod(n, k\j)));

%o for(n=1,15, for(k=1,n, print1(T(n,k), ", "))) \\ _G. C. Greubel_, Dec 12 2019

%o (Magma) [ &+[(n mod Floor(k/j)): j in [1..k]]: k in [1..n], n in [1..15]]; // _G. C. Greubel_, Dec 12 2019

%o (Sage) [[sum( n%floor(k/j) for j in (1..k)) for k in (1..n)] for n in (1..15)] # _G. C. Greubel_, Dec 12 2019

%o (GAP) Flat(List([1..15], n-> List([1..n], k-> Sum([1..k], j-> n mod Int(k/j)) ))); # _G. C. Greubel_, Dec 12 2019

%Y Cf. A049784, A049785, A049786, A049787, A049788, A049789.

%K nonn,tabl

%O 1,13

%A _Clark Kimberling_