For a connected $d$-regular graph $G=(V,E)$ with adjacency matrix $A$, we defined a sequence of matrices $$A_0,A_1,A_2,A_3,\dots$$ defined using powers of $A$ inductively as follows: $$A_0=I$$ $$A_1=A$$ $$A_2=A^2-dI$$ For $k \geq 3$, $$A_{k}=A_{k-1}A-(d-1)A_{k-2}$$ Just like $(A^k)_{v,w}$ counts the number of walks on $G$ from $v$ to $w$, the value $(A_k)_{v,w}$ counts the number of walks on $G$ from $v$ to $w$ without backtracking. The recurrence relation above can be used to easily show that the ordinary (matrix) generating function for the above sequence is $$\sum \limits_{k=0}^{\infty} t^k A_k = (1- t^2)I. \left( I-tA + (d-1)t^2 I \right)^{-1}$$ With some abuse of notation, we can rewrite this generating function as $$\frac{1-t^2}{I-At+(d-1)t^2}$$
On the other hand, the Ihara zeta function of the graph $G$ is given by $$\zeta_G(t) = exp \left( \sum \limits_{k=1}^{\infty} N_k \frac{t^k}{k} \right)$$ where $N_k$ is the number of closed non-backtracking walks on $G$ of length $k$. It is known that $\zeta_G(t)$ has an alternate expression using determinants as $$\zeta_G(t) = \frac{(1-t^2)^{|V|-|E|}}{det(I-At+(d-1)t^2)}$$
My question is: can the determinant formula for the Ihara zeta function be derived from the generating function for the matrices $A_k$? What exactly is the relationship between $A_k$ and $N_k$?
A similar question has been asked here How to get from Chebyshev to Ihara? and I have also been trying out ideas from here Proof of 2 Matrix identities (Traces, Logs, Determinants) But I am not interested in the Chebychev polynomial connection here: just whether the generating function can be manipulated using logarithms and traces to obtain the expression for the zeta function. Thanks.
UPDATE: Here's a partial attempt of mine. Using Chebychev polynomials of the second kind defined as $$U_0(x)=1$$ $$U_1(x) = 2x$$ and for $k \geq 2$, $$U_k(x) = U_{k-1}(x)U_1(x) - U_{k-2}(x)$$ and with generating function $$\sum \limits_{k=0}^{\infty} U_k(x)t^k = \frac{1}{1-2xt+t^2}$$ we can express the matrix $A_k$ as $$A_k = (d-1)^{k/2} U_k \left( \frac{A}{2 \sqrt{d-1}} \right) - (d-1)^{k/2-1} U_{k-2} \left( \frac{A}{2 \sqrt{d-1}} \right)$$ and so $$Tr(A_k) = (d-1)^{k/2} \sum \limits_{i=0}^{n-1} U_k \left( \frac{\mu_i}{2 \sqrt{d-1}} \right) - (d-1)^{k/2-1} \sum \limits_{i=0}^{n-1} U_{k-2} \left( \frac{\mu_i}{2 \sqrt{d-1}} \right) $$ where $$d=\mu_0 \geq \mu_1 \geq \dots \geq \mu_{n-1} \geq d$$ are the $n$ eigenvalues of the adjacency matrix $A$. Thus we have an expression for the trace of $A_k$ as a polynomial in the eigenvalues of $A$.
In a similar way, working backwards fro the definition of the Ihara zeta function, we can define another matrix sequence $B_k$ as follows: $$B_1=A$$ $$B_2 = A^2-dI$$ and for $k \geq 3$, $$B_k = \begin{cases} B_{k-1}A - (d-1)B_{k-2} - (d-2)A & \text{ if k is odd}\\ B_{k-1}A - (d-1)B_{k-2} + d(d-2)I & \text{ if k is even} \end{cases}$$ Just like $A_k$ could be expressed in terms of Chebychev polynomials $U_k$ of the second kind, the matrices $B_k$ can be expressed using Chebychev polynomials $T_k$ of the first kind defined by the recurrence $$T_0(x)=1$$ $$T_1(x)=x$$ and for $k \geq 2$, $$T_k(x)=2xT_{k-1}(x)-T_{k-2}(x)$$ The expression for $B_k$ is $$B_k=\begin{cases} 2(d-1)^{k/2}T_k \left( \frac{A}{2\sqrt{d-1}} \right) & \text{ if k is odd}\\ 2(d-1)^{k/2}T_k \left( \frac{A}{2\sqrt{d-1}} \right)+(d-2)I & \text{ if k is even} \end{cases}$$
All this is simply by reverse engineering the expression for the Ihara zeta function to obtain $N_k$ as the trace of some matrix. My question now, modulo correctness of my calculations, is whether the matrices $B_k$ as defined above have any natural interpretation in terms of walks on the graph.