|
| |
|
|
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)
|
| |
|
|