OFFSET
1,8
LINKS
Roger Bagula and Gary Adamson, Pascal's Triangle in Gray Code: its Hadamard and IFS.
EXAMPLE
Triangle:
n\k| 0 1 2 3 4 5 6 7 8 9 10 11
---+-------------------------------------------
0| 1,
1|-1, 1
2|-1,-1, 1
3| 0,-2, -1, 1
4| 1,-1, -4, -1, 1
5| 0, 2, -2, -6, -1, 1
6| 0, 0, 4, -2, -7, -1, 1
7| 0,-2, 1, 9, -3, -9, -1, 1
8| 1, 1,-13, 8, 20, -8,-13, -1, 1
9| 0, 2, 2,-24, 15, 31,-13,-17, -1, 1
10| 0, 0, 4, 4,-40, 20, 44,-14,-19, -1, 1
11| 0, 0, 0, 8, 4,-56, 24, 54,-14,-20,-1, 1
Polynomials:
1,
-1 + x,
-1 - x + x^2,
-2x - x^2 + x^3,
1 - x -4x^2 - x^3 + x^4,
2x -2x^2 -6x^3 - x^4 + x^5,
4x^2 -2x^3 -7x^4 - x^5 + x^6,
-2x + x^2 +9x^3 -3x^4 -9x^5 - x^6 + x^7
MATHEMATICA
An[n_]:=CoefficientList[(-1)^n*CharacteristicPolynomial[Table[If[BitAnd[BitXor[i, Floor[i/2]], BitXor[j, Floor[j/2]]]==0, 1, 0], {i, 0, n-1}, {j, 0, n-1}], x], x]
a=Join[{{1}}, Table[An[d], {d, 1, 20}]]
Flatten[a]
RowSum=Table[Apply[Plus, Abs[a[[n]]]], {n, 1, Length[a]}] (* reduced by Natalia L. Skirrow, Nov 17 2025 *)
PROG
(SageMath)
def A122944(n: int) -> list[int]:
def gray_code(x: int) -> int: return x^^(x >> 1)
data = [[int(not (gray_code(i) & gray_code(j)))
for j in range(n)] for i in range(n)]
poly = matrix(ZZ, data).charpoly()
return [int(c) for c in poly.list()]
for n in range(12): print(A122944(n)) # Peter Luschny, Nov 18 2025
CROSSREFS
KEYWORD
tabl,sign
AUTHOR
Roger L. Bagula and Gary W. Adamson, Oct 24 2006
EXTENSIONS
Name updated and sign convention changed (multiplied by (-1)^n to keep T(n,n) positive) by Natalia L. Skirrow, Nov 17 2025
STATUS
approved
