login
Irregular triangle read by rows: successive bottom and right-hand borders of the infinite square array in A072030 (number of subtraction steps needed to compute GCD) read mod 2.
1

%I #16 Apr 23 2023 12:18:23

%S 1,0,1,0,1,1,1,1,1,0,0,0,1,0,0,0,1,0,0,1,1,1,0,0,1,0,1,0,1,0,1,0,1,0,

%T 1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,1,0,1,0,0,1,0,0,1,0,1,0,0,1,0,1,0,

%U 0,1,0,1,1,1,0,1,0,0,1,0,1,0,1,0,0,0,0,0,1,0,1,0,1,0,0,0,0,0,1,0,1,1,0,0,1,1,0

%N Irregular triangle read by rows: successive bottom and right-hand borders of the infinite square array in A072030 (number of subtraction steps needed to compute GCD) read mod 2.

%H R. J. Mathar, <a href="/A267179/b267179.txt">Table of n, a(n) for n = 1..10000</a>

%e The array in A072030 begins:

%e 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, ...

%e 2, 1, 3, 2, 4, 3, 5, 4, 6, 5, ...

%e 3, 3, 1, 4, 4, 2, 5, 5, 3, 6, ...

%e 4, 2, 4, 1, 5, 3, 5, 2, 6, 4, ...

%e 5, 4, 4, 5, 1, 6, 5, 5, 6, 2, ...

%e 6, 3, 2, 3, 6, 1, 7, 4, 3, 4, ...

%e 7, 5, 5, 5, 5, 7, 1, 8, 6, 6, ...

%e 8, 4, 5, 2, 5, 4, 8, 1, 9, 5, ...

%e 9, 6, 3, 6, 6, 3, 6, 9, 1, 10, ...

%e 10, 5, 6, 4, 2, 4, 6, 5, 10, 1, ...

%e ...

%e The successive bottom and right-hand borders read mod 2 are:

%e 1,

%e 0, 1, 0,

%e 1, 1, 1, 1, 1,

%e 0, 0, 0, 1, 0, 0, 0,

%e 1, 0, 0, 1, 1, 1, 0, 0, 1,

%e 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0,

%e 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,

%e 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0,

%e 1, 0, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1, 0, 0, 1, 0, 1,

%e 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0,

%e ...

%p A267179 := proc(n,k)

%p A267177(n,k) mod 2 ;

%p end proc:

%p seq(seq(A267179(n,k),k=1..2*n-1),n=1..10) ; # _R. J. Mathar_, May 08 2016

%t A072030[n_, k_] := A072030[n, k] = Which[n < 1 || k < 1, 0, n == k, 1, n < k, A072030[k, n], True, 1+A072030[k, n-k]];

%t A267179[n_, k_] := If[k <= n, A072030[n, k], A072030[2n-k, n]]~Mod~2;

%t Table[A267179[n, k], {n, 1, 10}, {k, 1, 2n-1}] // Flatten (* _Jean-François Alcover_, Apr 23 2023, after _R. J. Mathar_ *)

%o (PARI)

%o tabl(nn) = {for (n=1, nn,

%o for (k=1, n, a = n; b = k; r = 1; s = 0; while (r, q = a\b; r = a - b*q; s += q; a = b; b = r); print1(s%2, ", "); );

%o for (k=1, n-1, a = n; b = n-k; r = 1; s = 0; while (r, q = a\b; r = a - b*q; s += q; a = b; b = r); print1(s%2, ", "); );

%o print(); ); }

%o tabl(12)

%Y This is A267177 read mod 2.

%Y Cf. A072030.

%K nonn,tabf

%O 1

%A _N. J. A. Sloane_, Jan 14 2016