OFFSET
1,3
COMMENTS
Such points exist when the non-adjacent form representation of n is palindromic.
LINKS
Wikipedia, Non-adjacent form.
PROG
(Python)
def isok(n):
E, r = n, 0
while E:
if E & 1:
Zi = 2 - (E & 3)
E -= Zi
r += Zi
E >>= 1
r <<= 1
return (r >> 1) == n
print([n for n in range(0, 1400) if isok(n)])
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Darío Clavijo, Dec 14 2024
EXTENSIONS
Leading 0 added by Rémy Sigrist, Dec 28 2024
STATUS
approved