OFFSET
1,2
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..65537
MAPLE
GS(6, 1, 200); [see A135416].
PROG
(PARI)
(Python)
def A135534(n): return 1 if n == 1 else 0 if n&1 else (1<<(m:=(~(k:=n>>1) & k-1)).bit_length()+int(m==k-1)+1)-1 # Chai Wah Wu, Jul 06 2022
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, based on a message from Guy Steele and Don Knuth, Mar 01 2008
STATUS
approved