A Matrix With Eigenvalues Equal to The Golden Ratio and the Golden Conjugate

For $n < 500$ it seems that $6,8,9$ are the only solutions. Here is some Python code to check. The algorithm works by noting that $\phi$ and $-1/\phi$ are eigenvalues of $M$ if and only if $M^2 - M - I$ is singular. I was too lazy write code to check if an integer was a perfect power, so I copied part of the list from OEIS.

import numpy as np

def is_invertible(a):
     return a.shape[0] == a.shape[1] and np.linalg.matrix_rank(a) == a.shape[0]

perfect_powers = [1, 4, 8, 9, 16, 25, 27, 32, 36, 49, 64, 81, 100, 
                  121, 125, 128, 144, 169, 196, 216, 225, 243, 256, 
                  289, 324, 343, 361, 400, 441, 484, 512, 529, 576, 
                  625, 676, 729, 784, 841, 900, 961, 1000, 1024, 
                  1089, 1156, 1225, 1296, 1331, 1369, 1444, 1521, 
                  1600, 1681, 1728, 1764]

A = []

for n in range(1,10):

    M = [[0]*n] *n
    M = np.matrix(M)

    for m in [m for m in perfect_powers if m <= 2*n]:
        for i in range(n):
            j = m - (i+1) -1 #find solutions to (i+1) + (j+1) = m
            if j in range(n): 
                M[i,j] = 1

    if not is_invertible(M*M - M - np.identity(n)):
        A.append(n)
    print n, n in A
print A

returns

1 False
2 False
3 False
4 False
5 False
6 True
7 False
8 True
9 True
[6, 8, 9]