OFFSET
1,3
COMMENTS
See comment in A057148.
PROG
(Python)
def A176923(n):
if n == 1: return 0
a = 1<<n.bit_length()-2
s = bin(a|(n&a-1))[2:]
return int(s+(s[::-1] if a&n else s[-2::-1]))**2 # Chai Wah Wu, Jun 10 2024
CROSSREFS
KEYWORD
base,easy,nonn
AUTHOR
Jeremy Gardiner, Apr 29 2010
STATUS
approved