Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #14 Dec 08 2018 20:44:08
%S 0,1,1,2,3,2,3,12,12,3,4,7,12,7,4,5,24,56,56,24,5,6,51,24,15,24,51,6,
%T 7,28,3276,112,112,3276,28,7,8,15,28,455,48,455,28,15,8,9,48,240,120,
%U 25368,25368,120,240,48,9,10,99,48,31,56,51,56,31,48,99,10
%N Square array T(n, k) read by antidiagonals, n >= 0 and k >= 0: the lengths of runs in binary expansion of T(n, k) are obtained by adding those of n and of k (see Comments for precise definition).
%C For any n >= 0 and k >= 0:
%C - let r_n be the lengths of runs in binary expansion of n,
%C - for n = 0: we assume that r_0 = (0),
%C - let R_n be the #r_n-periodic sequence whose first #r_n terms match r_n,
%C - r_{T(n, k)} has lcm(#r_n, #r_k) terms and r_{T(n, k)}(i) = R_n(i) + R_k(i) for i = 1..lcm(#r_n, #r_k).
%F For any m >= 0, n >= 0 and k >= 0:
%F - T(n, k) = T(k, n) (T is commutative),
%F - T(m, T(n, k)) = T(T(m, n), k) (T is associative),
%F - T(n, 0) = n (0 is a neutral element for T),
%F - T(n, 1) = A175046(n),
%F - T(n, n) = A001196(n),
%F - A005811(T(n, k)) = max(A005811(n), A005811(k), lcm(A005811(n), A005811(k))),
%F - T(2^n - 1, 2^k - 1) = 2^(n+k) - 1,
%F - T(2^n, 2^k) = 3 * 2^(n+k) when n > 0 and k > 0,
%F - T(n, k) is odd iff both n and k are odd.
%e Array T(n, k) begins (in decimal):
%e n\k| 0 1 2 3 4 5 6 7 8 9 10
%e ---+------------------------------------------------------------------------
%e 0| 0 1 2 3 4 5 6 7 8 9 10
%e 1| 1 3 12 7 24 51 28 15 48 99 204
%e 2| 2 12 12 56 24 3276 28 240 48 12700 204
%e 3| 3 7 56 15 112 455 120 31 224 903 3640
%e 4| 4 24 24 112 48 25368 56 480 96 99896 792
%e 5| 5 51 3276 455 25368 51 29596 3855 199728 99 13421772
%e 6| 6 28 28 120 56 29596 60 496 112 116540 924
%e 7| 7 15 240 31 480 3855 496 63 960 7695 61680
%e 8| 8 48 48 224 96 199728 112 960 192 792688 3120
%e Array T(n, k) begins (in binary):
%e n\k| 0 1 10 11 100
%e ----+--------------------------------------------------------
%e 0| 0 1 10 11 100
%e 1| 1 11 1100 111 11000
%e 10| 10 1100 1100 111000 11000
%e 11| 11 111 111000 1111 1110000
%e 100| 100 11000 11000 1110000 110000
%e 101| 101 110011 110011001100 111000111 110001100011000
%e 110| 110 11100 11100 1111000 111000
%e 111| 111 1111 11110000 11111 111100000
%e 1000| 1000 110000 110000 11100000 1100000
%o (PARI) T(n,k) = my (v=0, p=1, rn=n, rk=k, b=if ((max(n,1)%2)&&(max(k,1)%2), 1, 0)); while (1, my (vn=if (rn==0, 0, valuation(rn+(rn%2), 2)), vk=if
%o (rk==0, 0, valuation(rk+(rk%2), 2)), w=vn+vk); v+=b*p*(2^w-1); rn\=2^vn; rk\=2^vk; if (rn==0 && rk==0, return (v), rn==0, rn=n, rk==0, rk=k); p*=2^w; b=1-b)
%Y See A322403 for the multiplicative variant.
%Y Cf. A001196, A005811, A175046.
%K nonn,base,tabl
%O 0,4
%A _Rémy Sigrist_, Dec 06 2018