I want to define polynomials with coefficients given in some range.
Namely, let $p$ be a prime number and $n$ be a positive integer. For all positive integer $k\leq n$ I want to generate all polynomials of degree $k$ with integer coefficients
such that $a[k]=1$, $a\neq0$ and $0\leq a[i]\leq p-1$ for $1\leq i\leq k-1$.
How can I do this?