OFFSET
1
COMMENTS
This is also the triangle:
1;
1, 0;
1, 0, 1;
1, 0, 1, 0;
1, 0, 1, 0, 1;
...
This is also the array:
1 1 1 1 1 1 1 1 ...
0 0 0 0 0 0 0 0 ...
1 1 1 1 1 1 1 1 ...
0 0 0 0 0 0 0 0 ...
1 1 1 1 1 1 1 1 ...
0 0 0 0 0 0 0 0 ...
1 1 1 1 1 1 1 1 ...
0 0 0 0 0 0 0 0 ...
...
read by antidiagonals.
As this sequence is "the opposite" of A060510, most things mentioned there also apply here.
PROG
(PARI) a(n) = (n - binomial(floor(sqrt(2*n)+1/2), 2)) % 2;
(Python)
from math import isqrt
def A376583(n): return n&1^((m:=isqrt(n<<3)+1>>1)*(m-1)>>1&1) # Chai Wah Wu, Oct 23 2024
CROSSREFS
KEYWORD
AUTHOR
Ruud H.G. van Tol, Sep 29 2024
STATUS
approved