%I #45 May 21 2023 17:11:14
%S 0,0,1,1,0,0,2,2,0,0,1,1,0,0,3,3,0,0,1,1,0,0,2,2,0,0,1,1,0,0,4,4,0,0,
%T 1,1,0,0,2,2,0,0,1,1,0,0,3,3,0,0,1,1,0,0,2,2,0,0,1,1,0,0,5,5,0,0,1,1,
%U 0,0,2,2,0,0,1,1,0,0,3,3,0,0,1,1,0,0,2,2
%N Column/row 2 of A050602: a(n) = add3c(n,2).
%C It seems that (n - Sum_{k=1..n} a(k) )/log(n) is bounded. - _Benoit Cloitre_, Oct 03 2002
%C 2^a(n-1) is the highest power of 2 dividing the triangular number A000217(n) = n*(n+1)/2, for n >= 1. - _Benoit Cloitre_, Oct 03 2002 [corrected and rewritten by _Wolfdieter Lang_, Nov 21 2019]
%C a(n) is the number of trailing 0's in the binary reflected Gray code of n+1 (A014550). - _Amiram Eldar_, May 15 2021
%H Vincenzo Librandi, <a href="/A050605/b050605.txt">Table of n, a(n) for n = 0..5000</a>
%H Isabel Cação, Helmuth R. Malonek, Maria Irene Falcão, and Graça Tomaz, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL26/Falcao/falcao5.html">Intrinsic Properties of a Non-Symmetric Number Triangle</a>, J. Int. Seq., Vol. 26 (2023), Article 23.4.8.
%F a(4*n+2) = A001511(n). - _Johannes W. Meijer_, Jun 18 2009
%F a(n) = A007814(n+1) + A007814(n+2) - 1. - _Ridouane Oudra_, Oct 08 2019
%p with(Bits): add3c := proc(a, b) option remember; `if`(0 = And(a, b), 0, 1 + add3c(Xor(a, b), 2*And(a, b))) end: A050605 := n -> add3c(n, 2):
%p seq(A050605(n), n=0..80); # _Johannes W. Meijer_, Jun 18 2009; updated by _Peter Luschny_, Jul 12 2019
%t Table[IntegerExponent[(n + 1)(n + 2)/2, 2], {n, 0, 100}] (* _Jean-François Alcover_, Mar 04 2016 *)
%o (PARI) a(n)=valuation(n*(n+1)/2,2)
%o (Magma) [Valuation(n*(n+1)/2, 2): n in [1..120]]; // _Vincenzo Librandi_, Aug 11 2017
%Y Bisection gives column/row 1 of A050602: A007814.
%Y Cf. A000217, A001511, A161737, A069834, A014550.
%K nonn
%O 0,7
%A _Antti Karttunen_, Jun 22 1999