I was reading about the Linear Feedback Shift Registers and I am confused about the technique to find the period of a primitive polynomial. Consider the polynomial $x^5 + x^2 + 1$. As this is a primitive polynomial, it should be a maximal period LFSR. Its period should be $2^5 - 1 = 31$. However, when I tried to generate a pseudo random sequence from this, the period turns out to be $15$.
01 -> 11111 32 -> 01111
02 -> 01111 33 -> 10111
03 -> 10111 34 -> 01011
04 -> 01011 35 -> 10101
05 -> 10101 36 -> 11010
06 -> 11010 37 -> 01101
07 -> 01101 38 -> 00110
08 -> 00110 39 -> 10011
09 -> 10011 40 -> 01001
10 -> 01001 41 -> 00100
11 -> 00100 42 -> 00010
12 -> 00010 43 -> 10001
13 -> 10001 44 -> 11000
14 -> 11000 45 -> 11100
15 -> 11100 46 -> 11110
16 -> 11110 47 -> 01111
17 -> 01111 48 -> 10111
18 -> 10111 49 -> 01011
19 -> 01011 50 -> 10101
20 -> 10101 51 -> 11010
21 -> 11010 52 -> 01101
22 -> 01101 53 -> 00110
23 -> 00110 54 -> 10011
24 -> 10011 55 -> 01001
25 -> 01001 56 -> 00100
26 -> 00100 57 -> 00010
27 -> 00010 58 -> 10001
28 -> 10001 59 -> 11000
29 -> 11000 60 -> 11100
30 -> 11100 61 -> 11110
31 -> 11110
1, 111101011001000, 111101011001000, 111101011001000, 111101011001000, 11
What is the correct period of this sequence? Is it 15
or 31
?