login
A176923
Squares of A057148 taken as decimal numbers.
1
0, 1, 121, 10201, 12321, 1002001, 1234321, 100020001, 102030201, 121242121, 123454321, 10000200001, 10221412201, 12102420121, 12345654321, 1000002000001, 1002003002001, 1020304030201, 1022325232201, 1210024200121, 1212225222121, 1232346432321, 1234567654321, 100000020000001, 100220141022001
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