login
A091821
a(n) counts the one-bits in the binary representation of n when we cycle from left to right through the individual bits of n, restarting at the leftmost bit after the rightmost is reached and performing n bitwise steps in total.
3
1, 1, 3, 2, 3, 4, 7, 2, 5, 5, 8, 6, 10, 11, 15, 4, 7, 7, 11, 8, 13, 13, 18, 10, 15, 16, 22, 18, 23, 24, 31, 6, 11, 11, 17, 12, 19, 19, 25, 14, 20, 21, 29, 22, 30, 31, 39, 16, 25, 26, 34, 27, 35, 36, 46, 29, 39, 39, 49, 40, 51, 52, 63, 10
OFFSET
1,3
COMMENTS
This might be called the bcrrpsod or binary cyclic right rotating progressive sum of digits function.
EXAMPLE
a(9) = 5 because 9 = 1001 in binary and cycling from left to right through 9 steps all the bits of 1001 are visited twice but the first bit, which is visited three times. Counting all visited one-bits evaluates to 5.
CROSSREFS
Sequence in context: A211947 A220071 A132408 * A086035 A334449 A268289
KEYWORD
easy,nonn
AUTHOR
Frank Schwellinger (nummer_eins(AT)web.de), Mar 08 2004
STATUS
approved