%I #22 Oct 23 2024 16:32:53
%S 0,0,1,0,1,0,0,1,0,1,0,1,0,1,0,0,1,0,1,0,1,0,1,0,1,0,1,0,0,1,0,1,0,1,
%T 0,1,0,1,0,1,0,1,0,1,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,1,
%U 0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1
%N Alternating with hexagonal stutters: if n is hexagonal (2k^2 - k, i.e., A000384) then a(n)=a(n-1), otherwise a(n) = 1 - a(n-1).
%C The row sums equal A110654 and the alternating row sums equal A130472. - _Johannes W. Meijer_, Aug 12 2015
%C This is also the array:
%C 0 0 0 0 0 0 0 0 0 0 0 0 0 ...
%C 1 1 1 1 1 1 1 1 1 1 1 1 1 ...
%C 0 0 0 0 0 0 0 0 0 0 0 0 0 ...
%C 1 1 1 1 1 1 1 1 1 1 1 1 1 ...
%C 0 0 0 0 0 0 0 0 0 0 0 0 0 ...
%C 1 1 1 1 1 1 1 1 1 1 1 1 1 ...
%C 0 0 0 0 0 0 0 0 0 0 0 0 0 ...
%C 1 1 1 1 1 1 1 1 1 1 1 1 1 ...
%C 0 0 0 0 0 0 0 0 0 0 0 0 0 ...
%C 1 1 1 1 1 1 1 1 1 1 1 1 1 ...
%C 0 0 0 0 0 0 0 0 0 0 0 0 0 ...
%C ...
%C read by antidiagonals. - _N. J. A. Sloane_, Mar 07 2023
%F a(n) = A002262(n) mod 2 = A060511(n) mod 2.
%F G.f.: x/(1-x^2) - (1+x)^(-1)*Sum(n>=1, x^(n*(2*n-1))). The sum is related to Theta functions. - _Robert Israel_, Aug 12 2015
%e Hexagonal numbers start 1,6,15, ... so this sequence goes 0 0 (stutter at 1) 1 0 1 0 0 (stutter at 6) 1 0 1 0 1 0 1 0 0 (stutter at 15) 1 0, etc.
%e As a triangle, sequence begins:
%e 0;
%e 0, 1;
%e 0, 1, 0;
%e 0, 1, 0, 1;
%e 0, 1, 0, 1, 0;
%e 0, 1, 0, 1, 0, 1;
%e ...
%p T := proc(n, k): if k mod 2 = 1 then return(1) else return(0) fi: end: seq(seq(T(n, k), k=0..n), n=0..13); # _Johannes W. Meijer_, Aug 12 2015
%t nxt[{n_,a_}]:={n+1,If[IntegerQ[(1+Sqrt[1+8(n+1)])/4],a,1-a]}; NestList[ nxt,{0,0},110][[All,2]] (* _Harvey P. Dale_, Jan 13 2022 *)
%o (Python)
%o from math import isqrt
%o def A060510(n): return n+1&1^1^((m:=isqrt(n+1<<3)+1>>1)*(m-1)>>1&1) # _Chai Wah Wu_, Oct 23 2024
%Y As a simple triangular or square array virtually the only sequences which appear are A000004, A000012 and A000035.
%Y Cf. A230135.
%K easy,nonn,tabl
%O 0,1
%A _Henry Bottomley_, Mar 22 2001