[go: up one dir, main page]

login
Square array read by antidiagonals up: T(n,k) = -(n-1) if n divides k, else 1.
5

%I #14 Dec 10 2016 17:13:12

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

%T 1,-2,1,0,1,1,1,1,-4,1,1,-1,0,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,-5,1,-3,

%U -2,-1,0,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,-6,1,1,1,1,-1,0,1,1,1,1,1,1,1,1,1,-4,1,-2,1,0,1,1,1,1,1,1,1,-7,1,1,1,-3,1,-1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0

%N Square array read by antidiagonals up: T(n,k) = -(n-1) if n divides k, else 1.

%C Apart from the top row, the same as A177121.

%C Sum_{k>=1} T(n,k)/k = log(n); this has been pointed out by _Jaume Oliver Lafont_ in A061347 and A002162.

%F If n divides k then T(n,k) = -(n-1) else 1.

%e Table starts:

%e 0..0..0..0..0..0..0..0..0...

%e 1.-1..1.-1..1.-1..1.-1..1...

%e 1..1.-2..1..1.-2..1..1.-2...

%e 1..1..1.-3..1..1..1.-3..1...

%e 1..1..1..1.-4..1..1..1..1...

%e 1..1..1..1..1.-5..1..1..1...

%e 1..1..1..1..1..1.-6..1..1...

%e 1..1..1..1..1..1..1.-7..1...

%e 1..1..1..1..1..1..1..1.-8...

%t Clear[t, n, k];

%t nn = 30;

%t t[n_, k_] := t[n, k] = If[Mod[n, k] == 0, -(k - 1), 1]

%t MatrixForm[Transpose[Table[Table[t[n, k], {k, 1, nn}], {n, 1, nn}]]]

%o (PARI) N=20; M=matrix(N,N,n,k, if(n%k==0,1-k,1))~

%Y Cf. A002162, A002391, A016627, A191904.

%K sign,tabl

%O 1,13

%A _Mats Granvik_, Jun 19 2011