login
A192775
The numbers n^2 as n runs through the numbers which are palindromes in base 2.
4
0, 1, 9, 25, 49, 81, 225, 289, 441, 729, 961, 1089, 2025, 2601, 3969, 4225, 5329, 7225, 8649, 9801, 11449, 14161, 16129, 16641, 23409, 27225, 35721, 38025, 47961, 53361, 65025, 66049, 74529, 88209, 97969, 105625, 116281, 133225, 145161, 149769, 162409, 182329, 196249, 207025, 221841, 245025, 261121, 263169, 314721, 342225, 400689, 416025, 480249, 514089, 585225
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
Cf. A006995, A057148. See A192776 for these numbers written in base 2.
Sequence in context: A259417 A030156 A331587 * A318737 A246331 A141768
KEYWORD
nonn,base
AUTHOR
N. J. A. Sloane, Jul 09 2011
STATUS
approved