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

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A037888 a(n)=(1/2)*Sum{|d(i)-e(i)|} where Sum{d(i)*2^i} is base 2 representation of n and e(i) are digits d(i) in reverse order. 11
0, 1, 0, 1, 0, 1, 0, 1, 0, 2, 1, 2, 1, 1, 0, 1, 0, 2, 1, 1, 0, 2, 1, 2, 1, 1, 0, 2, 1, 1, 0, 1, 0, 2, 1, 2, 1, 3, 2, 2, 1, 3, 2, 1, 0, 2, 1, 2, 1, 1, 0, 3, 2, 2, 1, 3, 2, 2, 1, 2, 1, 1, 0, 1, 0, 2, 1, 2, 1, 3, 2, 1, 0, 2, 1, 2, 1, 3, 2, 2, 1, 3, 2, 1, 0, 2, 1, 2, 1, 3 (list; graph; refs; listen; history; internal format)
OFFSET

1,10

COMMENTS

a(n)=least number of digits for which the change 0->1 in (binary n) yields a palindrome.

PROG

(PARI)

for(n = 1, 90,

  v = binary(n); s = 0; j = #v;

  for(k=1, #v, s+=abs(v[k]-v[j]); j--);

  s/=2;

  print1(s, ", ")

)

[W. Bomfim webonfim(AT)bol.com Jan 13, 2011]

CROSSREFS

Sequence in context: A059782 A093654 A039924 * A052308 A116510 A128915

Adjacent sequences:  A037885 A037886 A037887 * A037889 A037890 A037891

KEYWORD

nonn,base,nice

AUTHOR

Clark Kimberling (ck6(AT)evansville.edu)

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 February 14 04:48 EST 2012. Contains 205570 sequences.