login
Difference between the number of odd entries and the number of even entries of the n-th row of the triangle A097883.
1

%I #10 May 20 2014 13:41:17

%S 1,0,1,0,1,2,1,0,1,0,1,2,-1,2,-1,2,-1,2,-1,2,-1,4,-3,4,-3,4,-3,4,-3,6,

%T -3,8,-7,8,-7,8,-7,8,-7,8,-7,8,-7,8,-7,8,-7,8,-7,8,-7,8,-7,8,-7,8,-7,

%U 8,-7,8,-7,8,-7,8,-7,8,-7,8,-7,8,-7,8,-7,8,-7,8,-7,8,-7,8,-7,8,-7,8,-7,8,-7,8,-7,8,-7,8,-7,8,-7,8,-7,8,-7,8,-7,10,-9

%N Difference between the number of odd entries and the number of even entries of the n-th row of the triangle A097883.

%C a(n+1)-a(n) is odd and alternates in sign (after the eleventh term), at least up through the 125th row.

%C |a(j+1)-a(j)| >= |a(i+1)-a(i)| for all j>=i and the absolute difference results in 11 ones, 9 threes, 1 five, 7 sevens, 2 nines, 1 eleven, 0 thirteens, 69 fifteens, 1 seventeen, etc.

%e a(6)=2 because the sixth row of the triangle A097883 has entries {14, 15, 16, 21, 23, 25}: 4 odd entries less 2 even entries.

%t a[0, 0] = 1; a[m_, n_] := a[m, n] = Block[{p = Sort[ Flatten[ Join[ Table[ a[i, j], {i, 0, m - 1}, {j, 0, i}], Table[ a[i, j], {i, m, m}, {j, 0, n - 1}]] ]]}, k = Complement[ Range[ p[[ -1]] + 1], p][[1]]; While[ Position[p, k] != {} || If[n == 0, GCD[k, a[m - 1, 0]] != 1, If[n == m, GCD[k, a[m - 1, m - 1]] != 1, GCD[k, a[m - 1, n]] != 1 || GCD[k, a[m - 1, n - 1]] != 1]], k++ ]; k]; Table[Plus @@ (2Mod[Table[ a[m, n], {n, 0, m}], 2] - 1), {m, 0, 105}]

%Y Cf. A097883, A098382.

%K sign

%O 1,6

%A _Leroy Quet_ and _Robert G. Wilson v_, Sep 04 2004