Construction of a recurrence sequence with given period

108 Views Asked by At

I want to construct a binary recurrence sequence which has period 1023. Moreover, it shouldn't have pre-period.
Can anyone help me with the procedure? I truly have no ideas where to start.
Also, I don't expect a full solution, but at least some help would be very much appreciated.

Thank you in advance

1

There are 1 best solutions below

0
On

To give a unified answer, if you want a linear recurrence of period $2^n-1$ you need to use a recurrence whose characteristic polynomial $c(x)$ is primitive, i.e., $n$ is the smallest value of $k$ for which $c(x)$ divides $x^{2^k-1}-1$ as polynomials in $\mathbb{F}_2[x].$ There are tables of these polynomials you can refer to, for example see here.

And since you did not specify that the recurrence had to be linear note that there are nonlinear recurrences which can also give periodic sequences (as pointed out by @JyrkiLahtonen). Just as an example the nonlinear recurrence $$ s(t+3)=s(t)+s(t+1)+s(t+1)s(t+2)\pmod 2 $$ with the initial condition $(s(0),s(1),s(2))=(0,0,1)$ generates the sequence below which has period 4: $$ 00110011\cdots $$