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

%I #18 Aug 02 2019 23:00:43

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

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

%U 5,3,2,7,1,5,1,1,1,1,0,12,11,10,9,8,7,6,5,4,3,2,1,0,13,6,11,5,9,4,1,3,5,2,3

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

%C T(n,k) = A025581(n,k)/A050873(n,k);

%C T(n,1) = A001477(n-1);

%C T(n,2) = A026741(n-2) for n > 1;

%C T(n,3) = A051176(n-3) for n > 2;

%C T(n,4) = A060819(n-4) for n > 4;

%C T(n,n-3) = A144437(n) for n > 3;

%C T(n,n-2) = A000034(n) for n > 2;

%C T(n,n-1) = A000012(n);

%C T(n,n) = A000004(n).

%H Indranil Ghosh, <a href="/A167192/b167192.txt">Rows 1..120 of triangle, flattened</a>

%F T(n,k) = (n-k)/gcd(n,k), 1 <= k <= n.

%e The triangle T(n,k) begins:

%e n\k 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 ...

%e 1: 0

%e 2: 1 0

%e 3: 2 1 0

%e 4: 3 1 1 0

%e 5: 4 3 2 1 0

%e 6: 5 2 1 1 1 0

%e 7: 6 5 4 3 2 1 0

%e 8: 7 3 5 1 3 1 1 0

%e 9: 8 7 2 5 4 1 2 1 0

%e 10: 9 4 7 3 1 2 3 1 1 0

%e 11: 10 9 8 7 6 5 4 3 2 1 0

%e 12: 11 5 3 2 7 1 5 1 1 1 1 0

%e 13: 12 11 10 9 8 7 6 5 4 3 2 1 0

%e 14: 13 6 11 5 9 4 1 3 5 2 3 1 1 0

%e 15: 14 13 4 11 2 3 8 7 2 1 4 1 2 1 0

%e - _Wolfdieter Lang_, Feb 20 2013

%t Flatten[Table[(n-k)/GCD[n,k],{n,20},{k,n}]] (* _Harvey P. Dale_, Nov 27 2015 *)

%o (PARI) for(n=1,10, for(k=1,n, print1((n-k)/gcd(n,k), ", "))) \\ _G. C. Greubel_, Sep 13 2017

%Y Cf. A164306, A054531.

%K nonn,tabl

%O 1,4

%A _Reinhard Zumkeller_, Oct 30 2009