Can you provide a proof or a counterexample for the claim given below?

Inspired by Theorem 5 in this paper I have formulated the following claim:

Let $N=k \cdot 6^n+1$ , $k<6^n$ and $\operatorname{gcd}(k,6)=1$. Assume that $a \in \mathbb{Z}$ is a 6-th power non-residue . Let $\Phi_n(x)$ be the n-th cyclotomic polynomial, then:

$$N \text{ is a prime iff } \Phi_2\left(a^{\frac{N-1}{2}}\right)\cdot \Phi_3\left(a^{\frac{N-1}{3}}\right) \equiv 0 \pmod{N} $$

You can run this test here. I have tested this claim for many random values of $k$ and $n$ and there were no counterexamples .

Test implementation in PARI/GP without directly computing cyclotomic polynomials.

**EDIT**

More generally we can formulate the following claim:

Let $N=k \cdot (p \cdot q)^n+1$ , where $p$ and $q$ are distinct prime numbers, $k<(p \cdot q)^n$ and $\operatorname{gcd}(k,p\cdot q)=1$. Assume that $a \in \mathbb{Z}$ is a $p \cdot q$-th power non-residue . Let $\Phi_n(x)$ be the n-th cyclotomic polynomial, then:

$$N \text{ is a prime iff } \Phi_p\left(a^{\frac{N-1}{p}}\right)\cdot \Phi_q\left(a^{\frac{N-1}{q}}\right) \equiv 0 \pmod{N} $$

You can run this test here.

Test implementation in PARI/GP without directly computing cyclotomic polynomials.

**EDIT 2**

It seems that this claim can be generalized even further:

Let $N=k \cdot b^n+1$ , $k<b^n$ and $\operatorname{gcd}(k,b)=1$. Let $p_1,p_2,\ldots,p_n$ be a distinct prime factors of $b$. Assume that $a \in \mathbb{Z}$ is a $p_1\cdot p_2\cdot \ldots \cdot p_n$-th power non-residue . Let $\Phi_n(x)$ be the n-th cyclotomic polynomial, then: $$N \text{ is a prime iff } \Phi_{p_1}\left(a^{\frac{N-1}{p_1}}\right)\cdot \Phi_{p_2}\left(a^{\frac{N-1}{p_2}}\right)\cdot \ldots \cdot \Phi_{p_n}\left(a^{\frac{N-1}{p_n}}\right) \equiv 0 \pmod{N} $$