[go: up one dir, main page]

login
A pseudorandom binary sequence with minimum peak to peak distance of the absolute values of its discrete Fourier transform.
1

%I #8 Feb 28 2017 22:56:14

%S 1,0,1,1,1,0,0,1,0,1,1,0,1,1,1,1,0,0,0,0,1,1,1,1,1,1,0,1,1,0,0,0,0,0,

%T 0,0,0,0,0,0,0,1,0,1,0,0,1,1,0,0,1,1,0,1,0,1,0,0,0,1,0,0,0,1,0,0,0,0,

%U 0,1,0,0,1,0,1,0,0,1,0,0,0,0,0,1,0,1,1,1,0,0,0,1,0,1,0,0,1,0,0,1,1,1,0,1,0,0,1,0,1,1,0,0,1,1,1,1,0,1,0,0,1

%N A pseudorandom binary sequence with minimum peak to peak distance of the absolute values of its discrete Fourier transform.

%C a(1) = 1. Each subsequent term is chosen so as to minimize the peak to peak distance of the absolute values of the discrete Fourier transform of the partial sequence. If the peak to peak distance doesn't change with different choices for the next term, then the complement of the previous term is used. The algorithm works on a sequence of 1's and -1's then, as a last step, all -1's are replaced by 0's.

%C This sequence is similar to A282339 where it is considered the variance instead of the peak to peak distance.

%t peaktopeakfourier[x_] := Max[Abs[Fourier[x]]] - Min[Abs[Fourier[x]]];

%t a = {1};(*First element*)

%t nmax = 120;(*number of appended elements*)

%t Do[If[peaktopeakfourier[Append[a, 1]] <

%t peaktopeakfourier[Append[a, -1]], AppendTo[a, 1],

%t If[peaktopeakfourier[Append[a, 1]] >

%t peaktopeakfourier[Append[a, -1]], AppendTo[a, -1],

%t AppendTo[a, -a[[-1]]]]], {j, nmax}];

%t a = a /. {-1 -> 0};

%t print[a]

%Y Cf. A280711, A280816, A282339.

%K nonn,base

%O 1,1

%A _Andres Cicuttin_, Feb 12 2017