login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A273106 Numbers representable as ror(k)+rol(k), where ror(k)=A038572(k) is k rotated one binary place to the right, rol(k)=A006257(k) is k rotated one binary place to the left. 1
0, 2, 3, 5, 6, 8, 9, 10, 14, 15, 17, 19, 20, 22, 24, 25, 27, 29, 30, 32, 33, 34, 37, 38, 39, 42, 43, 44, 47, 48, 51, 52, 53, 56, 57, 58, 61, 62, 63, 65, 66, 67, 68, 70, 71, 72, 73, 75, 76, 77, 78, 80, 81, 82, 83, 85, 86, 87, 88, 90, 91, 92, 93, 95, 96, 98 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,2
LINKS
MATHEMATICA
Take[#, 66] &@ Union@ Table[FromDigits[RotateRight@ #, 2] + FromDigits[RotateLeft@ #, 2] &@ IntegerDigits[n, 2], {n, 0, 10^3}] (* Michael De Vlieger, May 17 2016 *)
PROG
(Python)
def ROR(n): # returns A038572(n)
BL = len(bin(n))-2
return (n>>1) + ((n&1) << (BL-1))
def ROL(n): # returns A006257(n) for n>0
BL = len(bin(n))-2
return (n*2) - (1<<BL) + 1
a = [0]
for n in range(1, 1000): a.append(ROR(n) + ROL(n))
print(sorted(set(a)))
CROSSREFS
Sequence in context: A225745 A238896 A190842 * A191179 A005837 A214980
KEYWORD
nonn,base
AUTHOR
Alex Ratushnyak, May 15 2016
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 12:14 EDT 2024. Contains 371792 sequences. (Running on oeis4.)