%I #25 Jan 04 2021 19:53:05
%S 0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,1,2,2,3,2,3,3,4,2,3,3,4,3,4,4,3,1,2,
%T 2,3,2,3,3,4,2,3,3,4,3,4,4,3,2,3,3,4,3,4,4,3,3,4,4,3,4,3,3,2,1,2,2,3,
%U 2,3,3,4,2,3,3,4,3,4,4,3,2,3,3,4,3,4,4
%N Nonlinearities of 4-variable Boolean functions ordered lexicographically.
%C Nonlinearity of a Boolean function is its minimum Hamming distance to the elements of the set of affine Boolean functions.
%C In this sequence, n represents the truth table of a Boolean function.
%C There are 2^2^4 = 65536 terms in this list, i.e. the number of 4-variable Boolean functions.
%C This is also the list of first 2^2^4 terms of r-th order nonlinearity values of (r+3)-variables Boolean functions ordered lexicographically.
%H Erdener Uyan, <a href="/A207328/b207328.txt">Table of n, a(n) for n = 0..65535</a> (complete sequence)
%e n in GF(2^4)
%e a(1)=a((0000000000000001)_2)=1;
%e a(5)=a((0000000000000101)_2)=2;
%e a(15)=a((0000000000001111)_2)=0;
%e This can also be written as a triangle, though contains outliers in later iterations:
%e 0,
%e 1,
%e 1,2,
%e 1,2,2,3,
%e 1,2,2,3,2,3,3,4,
%e 1,2,2,3,2,3,3,4,2,3,3,4,3,4,4,3,
%e 1,2,2,3,2,3,3,4,2,3,3,4,3,4,4,3,2,3,3,4,3,4,4,3,3,4,4,3,4,3,3,2...
%o (R w/ boolfun package)
%o for(n in 0:2^(2^4)-1){
%o f<- BooleanFunction(toBin(n,2^4))
%o a[n]<-nl(f)
%o }
%Y Cf. A207676 (that of 3-variable Boolean functions).
%Y Cf. A000120, A000069, A001969, A007088 (sequences dealing with binary expansion of n).
%Y Cf. A051253, A053168, A053189 (sequences that relate nonlinearity with Hamming weight for a special class of Boolean functions).
%K nonn
%O 0,4
%A _Erdener Uyan_, Feb 28 2012