OFFSET
0,3
LINKS
Paolo Xausa, Table of n, a(n) for n = 0..16383
EXAMPLE
a(4) = 1 because 4 in base 2 is 100 and 100 rotated left 4 times is 100 -> 001 -> 010 -> 100 -> 001 = 1.
a(5) = 6 because 5 in base 2 is 101 and 101 rotated left 5 times is 101 -> 011 -> 110 -> 101 -> 011 -> 110 = 6 in base 10.
PROG
(Python)
def A366139(n): return int((s:=bin(n))[(m:=n%n.bit_length()+2):]+s[2:m], 2) if n else 0 # Chai Wah Wu, Oct 03 2023
CROSSREFS
KEYWORD
AUTHOR
Paolo Xausa, Sep 30 2023
STATUS
approved