OFFSET
1,3
PROG
(Python)
def A192775(n):
if n == 1: return 0
a = 1<<(l:=n.bit_length()-2)
m = a|(n&a-1)
return ((m<<l+1)+int(bin(m)[-1:1:-1]or'0', 2) if a&n else (m<<l)+int(bin(m)[-2:1:-1]or'0', 2))**2 # Chai Wah Wu, Jul 23 2024
CROSSREFS
KEYWORD
nonn,base
AUTHOR
N. J. A. Sloane, Jul 09 2011
STATUS
approved