%I #18 Dec 12 2023 08:36:14
%S 0,1,1,2,1,2,2,3,0,1,1,2,1,2,2,3,0,1,1,2,1,2,2,3,0,1,1,2,1,2,2,3,0,1,
%T 1,2,1,2,2,3,0,1,1,2,1,2,2,3,0,1,1,2,1,2,2,3,0,1,1,2,1,2,2,3,0,1,1,2,
%U 1,2,2,3,0,1,1,2,1,2,2,3,0,1,1,2,1,2,2,3,0,1,1,2,1,2,2,3,0,1,1
%N Period 8: repeat [0,1,1,2,1,2,2,3].
%C Also fix e = 8; then a(n) = minimal Hamming distance between the binary representation of n and the binary representation of any multiple ke (0 <= k <= n/e) which is a child of n.
%C A number m is a child of n if the binary representation of n has a 1 in every position where the binary representation of m has a 1.
%H <a href="/index/Rec#order_08">Index entries for linear recurrences with constant coefficients</a>, signature (0,0,0,0,0,0,0,1).
%F a(n) = 3/2 -cos(Pi*n/4)/4 -(1+sqrt(2))*sin(Pi*n/4)/4 -cos(Pi*n/2)/2 -sin(Pi*n/2)/2 -cos(3*Pi*n/4)/4 +(1-sqrt(2))*sin(3*Pi*n/4)/4 -(-1)^n/2. - _R. J. Mathar_, Oct 08 2011
%F a(n) = a(n-8). G.f.: -x*(3*x^6+2*x^5+2*x^4+x^3+2*x^2+x+1) / ((x-1)*(x+1)*(x^2+1)*(x^4+1)). - _Colin Barker_, Jul 26 2013
%o See link in A140080 for Fortran program.
%K nonn,easy
%O 0,4
%A _Nadia Heninger_ and _N. J. A. Sloane_, Jun 03 2008
|