login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A127000 Zero-one fractional-part array for sqrt(2); a rectangular array T by antidiagonals. 1

%I #9 Sep 08 2022 08:45:29

%S 0,1,1,0,1,0,1,1,1,1,0,1,0,1,0,0,0,0,0,0,0,1,1,0,1,0,1,1,0,1,0,0,0,0,

%T 1,0,1,1,1,1,0,1,1,1,1,0,1,0,1,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,1,

%U 0,1,0,1,1,0,1,0,1,1,0,1,0,0,0,0,1,0,0,0,0,1,0,1,1,1,1,0,1,1,1,1,0,1,1,1,1

%N Zero-one fractional-part array for sqrt(2); a rectangular array T by antidiagonals.

%H G. C. Greubel, <a href="/A127000/b127000.txt">Rows n = 1..100 of antidiagonals, flattened</a>

%F T(n,k) = {nx} + {kx} - {nx+kx}, where x=sqrt(2) 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(2). - _G. C. Greubel_, May 30 2019

%e Northwest corner:

%e 0 1 0 1 0 0 1 0 1

%e 1 1 1 1 0 1 1 1 1

%e 0 1 0 0 0 0 1 0 0

%e 1 1 0 1 0 1 1 0 1

%e 0 0 0 0 0 0 0 0 0

%e 0 1 0 1 0 0 1 0 1

%e T(3,3)=0 because 2{3x}-{6x}=0.

%e The antidiagonals form a triangle with these first six rows:

%e 0

%e 1 1

%e 0 1 0

%e 1 1 1 1

%e 0 1 0 1 0

%e 0 0 0 0 0 0

%t r:= Sqrt[2];

%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(2);

%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(2); [[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(2);

%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. A002193, A126999, A127001.

%K nonn,tabl

%O 1,1

%A _Clark Kimberling_, Jan 01 2007

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 15 23:38 EDT 2024. Contains 374343 sequences. (Running on oeis4.)