login
A098381
Difference between the number of odd entries and the number of even entries of the n-th row of the triangle A097883.
1
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, -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, 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
OFFSET
1,6
COMMENTS
a(n+1)-a(n) is odd and alternates in sign (after the eleventh term), at least up through the 125th row.
|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.
EXAMPLE
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.
MATHEMATICA
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}]
CROSSREFS
Sequence in context: A097468 A339975 A283144 * A318463 A030372 A065363
KEYWORD
sign
AUTHOR
STATUS
approved