1, 1, 1, 2, 3, 2, 2, 2, 2, 2, 4, 2, 6, 2, 8, 2, 4, 2, 6, 6, 6, 6, 6, 4, 6, 6, 6, 6, 6, 2, 6, 6, 6, 6, 12, 6, 6, 6, 6, 6, 18, 6, 6, 6, 6, 6, 24, 6, 6, 6, 6, 6, 24, 6, 6, 6, 24, 6, 6, 6, 6, 6, 6, 6, 24, 6, 6, 6, 6, 6, 24, 6, 6, 6, 6, 6, 24, 6, 6, 6, 6, 6, 30, 6, 30, 6, 12, 6, 30, 6, 6, 6, 6, 6, 30, 6, 30
Offset: 2
The primes among the first 5 positive integers (1,2,3,4,5) are 2, 3, and 5, then the corresponding characteristic function of primes is (0,1,1,0,1) (See A010051) and the corresponding five possible cyclic autocorrelations are the dot products between (0,1,1,0,1) and its rotations as shown here below:
(0,1,1,0,1).(0,1,1,0,1) = 0*0 + 1*1 + 1*1 + 0*0 + 1*1 = 3, (0 rotations)
(0,1,1,0,1).(1,0,1,1,0) = 0*1 + 1*0 + 1*1 + 0*1 + 1*0 = 1, (1 rotation)
(0,1,1,0,1).(0,1,0,1,1) = 0*0 + 1*1 + 1*0 + 0*1 + 1*1 = 2, (2 rotations)
(0,1,1,0,1).(1,0,1,0,1) = 0*1 + 1*0 + 1*1 + 0*0 + 1*1 = 2, (3 rotations)
(0,1,1,0,1).(1,1,0,1,0) = 0*1 + 1*1 + 1*0 + 0*1 + 1*0 = 1, (4 rotations)
The maximum value of the cyclic autocorrelation is always trivially obtained with zero rotations. In this example, the maximum value is 3 and the second maximum is 2, then a(5)=2 because it is needed a minimum of 2 rotations to obtain the second maximum.
Comments