Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #8 Sep 08 2022 08:45:29
%S 1,1,1,0,0,0,1,0,0,1,1,1,0,1,1,1,1,1,1,1,1,0,0,0,1,0,0,0,1,0,0,1,1,0,
%T 0,1,1,1,0,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,0,0,0,1,0,0,0,1,0,
%U 0,1,1,0,0,1,1,0,0,1,1,1,0,1,1,1,0,1,1,1,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0
%N Zero-one fractional-part array for sqrt(3); a rectangular array T by antidiagonals.
%H G. C. Greubel, <a href="/A127001/b127001.txt">Rows n = 1..100 of antidiagonals, flattened</a>
%F T(n,k) = {nx} + {kx} - {nx+kx}, where x=sqrt(3) and { } denotes fractional part;, i.e., {r} = r - Floor(r).
%F T(k, n) = floor(n*r + k*r) - floor(n*r) - floor(k*r), with r = sqrt(3). - _G. C. Greubel_, May 30 2019
%e Northwest corner:
%e 1 1 0 1 1 1 0 1
%e 1 0 0 1 1 0 0 1
%e 0 0 0 1 0 0 0 1
%e 1 1 1 1 1 1 1 1
%e 1 1 0 1 1 1 0 1
%e 1 0 0 1 1 0 0 1
%e T(3,3)=0 because 2{3x}-{6x}=0.
%e The antidiagonals form a triangle with these first six rows:
%e 1
%e 1 1
%e 0 0 0
%e 1 0 0 1
%e 1 1 0 1 1
%e 1 1 1 1 1 1
%t r:= Sqrt[3];
%t T[k_, n_] := Floor[n*r + k*r] - Floor[n*r] - Floor[k*r];
%t TableForm[Table[T[n, k], {k,1,5}, {n,1,5}]]
%t Table[T[n-k+1, k], {n,1,12}, {k,1,n}] (* _G. C. Greubel_, May 30 2019 *)
%o (PARI) r=sqrt(3);
%o T(n,k) = ((n+k)*r)\1 - (n*r)\1 - (k*r)\1;
%o for(n=1,10, for(k=1,n, print1(T(n-k+1,k), ", "))) \\ _G. C. Greubel_, May 30 2019
%o (Magma) r:=Sqrt(3); [[Floor((n+1)*r)-Floor((n-k+1)*r)-Floor(k*r): k in [1..n]]: n in [1..10]]; // _G. C. Greubel_, May 30 2019
%o (Sage)
%o r=sqrt(3);
%o def T(n, k): return floor((n+k)*r)-floor(n*r)-floor(k*r)
%o [[T(n-k+1, k) for k in (1..n)] for n in (1..12)] # _G. C. Greubel_, May 30 2019
%Y Cf. A002194, A126999, A127001.
%K nonn,tabl
%O 1,1
%A _Clark Kimberling_, Jan 01 2007