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
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, 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, 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 (list; table; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
FORMULA
T(n,k) = {nx} + {kx} - {nx+kx}, where x=sqrt(2) and { } denotes fractional part;, i.e., {r} = r - Floor(r).
T(k, n) = floor(n*r + k*r) - floor(n*r) - floor(k*r), with r = sqrt(2). - G. C. Greubel, May 30 2019
EXAMPLE
Northwest corner:
0 1 0 1 0 0 1 0 1
1 1 1 1 0 1 1 1 1
0 1 0 0 0 0 1 0 0
1 1 0 1 0 1 1 0 1
0 0 0 0 0 0 0 0 0
0 1 0 1 0 0 1 0 1
T(3,3)=0 because 2{3x}-{6x}=0.
The antidiagonals form a triangle with these first six rows:
0
1 1
0 1 0
1 1 1 1
0 1 0 1 0
0 0 0 0 0 0
MATHEMATICA
r:= Sqrt[2];
T[k_, n_] := Floor[n*r + k*r] - Floor[n*r] - Floor[k*r];
TableForm[Table[T[n, k], {k, 1, 5}, {n, 1, 5}]]
Table[T[n-k+1, k], {n, 1, 12}, {k, 1, n}] (* G. C. Greubel, May 30 2019 *)
PROG
(PARI) r=sqrt(2);
T(n, k) = ((n+k)*r)\1 - (n*r)\1 - (k*r)\1;
for(n=1, 10, for(k=1, n, print1(T(n-k+1, k), ", "))) \\ G. C. Greubel, May 30 2019
(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
(Sage)
r=sqrt(2);
def T(n, k): return floor((n+k)*r)-floor(n*r)-floor(k*r)
[[T(n-k+1, k) for k in (1..n)] for n in (1..12)] # G. C. Greubel, May 30 2019
CROSSREFS
Sequence in context: A174207 A048820 A144101 * A103226 A357298 A080886
KEYWORD
nonn,tabl
AUTHOR
Clark Kimberling, Jan 01 2007
STATUS
approved

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 April 19 16:52 EDT 2024. Contains 371794 sequences. (Running on oeis4.)