login
This site is supported by donations to The OEIS Foundation.
Logo

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A140085 Period 8: repeat 0,1,1,2,1,2,2,3. 1
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, 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, 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 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,4

COMMENTS

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.

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.

LINKS

Table of n, a(n) for n=0..98.

FORMULA

a(n)=(1/56)*{24*(n mod 8)-4*[(n+1) mod 8]+3*[(n+2) mod 8]-4*[(n+3) mod 8]+10*[(n+4) mod 8]-4*[(n+5) mod 8]+3*[(n+6) mod 8]-4*[(n+7) mod 8]}, with n>=0 - Paolo P. Lava, Jun 06 2008

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

PROG

See link in A140080 for Fortran program.

CROSSREFS

Sequence in context: A071227 A108115 A089254 * A071445 A144081 A140086

Adjacent sequences:  A140082 A140083 A140084 * A140086 A140087 A140088

KEYWORD

nonn

AUTHOR

Nadia Heninger and N. J. A. Sloane, Jun 03 2008

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
Recent Additions | More pages | Superseeker | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified May 22 19:51 EDT 2013. Contains 225568 sequences.