Here, the Chebyshev polynomials

are defined in an unusual way [3]:

.

With these conventions, the first few

are

,

which provides a means to plot all

summations as wavefunctions over the domain

, as shown in the plots.

For odd primes, the factorization

requires piecewise decomposition. We always have

.

In the exceptional cases where

divides

,

,

,

with

. Otherwise, if

does not divide

,

,

.

This definition leaves

coefficients undetermined. To find the

, next we substitute the ansatz into

,

,

which requires the product-sum identity,

.

On the left- and right-hand sides, we gather constant terms and the coefficients of every

. This makes for

total constraints. The system of equations is overdetermined relative to

unknowns

. Reading as

decreases from

, coefficient

first appears as a multiplier of

. It is then trivial to solve all

in succession where

decreases. Yet the solution may not be consistent with all constraints. Define

lower constraints from the constant term and from coefficients of

and

upper constraints from the coefficients of

. The factorization

exists if and only if the solution of the

upper constraints also satisfies the

lower constraints, that is, if the over-determined system of equations is consistent. In practice, we solve the system of equations using matrices and vectors.

With matrices and vectors defined above in code, and with vector

containing the

as elements, the upper and lower constraints are written as

,

;

however, when

, the system of equations is inconsistent. In these exceptional cases,

.

To explain the case splitting, the Demonstration shows as array plots the

dimensional matrix

, the right of the

-dimensional periodic vector

and the

-dimensional periodic vector

. The color rules are:

If

, then

and the extra constraints

are always satisfied. If

, then

and the constraint check fails only when

. For all higher cases,

, and the constraint check again fails only when

. In nonexceptional cases, to evaluate the dot product by rows, we first reduce modulo

and then permute the columns by the prime period,

. This technique vastly improves on earlier case-by-case analysis [4, 5, 6].

Solvability of the system of equations is proven by pattern analysis of the matrices here defined and depicted as array plots. Detailed analysis could be the subject for a longer journal-style explication including rigorous proofs of all factorizations presented here.

[1] N. J. A. Sloane,

*The On-Line Encyclopedia of Integer Sequences.* "Define a Sequence by

, with

; then

Is the Smallest Index

Such That

Is Prime, or

if No Such

Exists."

oeis.org/A269254.