Interesting XOR problem

Revision en5, by pupsicek, 2024-07-30 20:55:27

I haven't found neither the solution nor the statement of the problem, so I will share it.

The statement:

Given an odd prime integer $$$n\ge 3$$$, consider the binary array of length $$$n$$$ where the first element is one and all other are zeros. What is the total number of different arrays can be obtained by applying the following operation any number of times: let $$$a$$$ be the current array and let $$$b$$$ be the binary array of length $$$n$$$ such that for $$$1\le i\le n$$$ $$$b[i]=a[i] \oplus a[i \mod n+1]$$$, then the operation is — replace the current array $$$a$$$ with $$$b$$$, i.e cyclically shift the array by one to the left and XOR it with itself.

The somewhat similar statement has the problem 1848F - Vika and Wiki, but in this case we are given $$$n=2^i$$$ for some $$$i$$$ which simplifies the problem.

The partial solution:

solution

So I want to know, is it a well-known problem and why the assumption about the answer being

answer

is wrong for $$$n=37$$$.

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en5 English pupsicek 2024-07-30 20:55:27 175 (published)
en4 English pupsicek 2024-07-30 20:50:53 1234 Tiny change: ' this.\n\n</spoi' -> ' this.\n\n\n</spoi'
en3 English pupsicek 2024-07-30 19:35:09 543
en2 English pupsicek 2024-07-30 18:50:25 2388 Tiny change: 'integer $n>3$, consid' -> 'integer $n\ge 3$, consid'
en1 English pupsicek 2024-07-30 17:15:12 419 Initial revision (saved to drafts)