login
A345362
Fixed points of A345352.
2
0, 1, 2, 3, 12, 15, 96, 102, 105, 111, 144, 150, 153, 159, 240, 246, 249, 255, 6144, 6168, 6180, 6204, 6210, 6234, 6246, 6270, 6273, 6297, 6309, 6333, 6339, 6363, 6375, 6399, 9216, 9240, 9252, 9276, 9282, 9306, 9318, 9342, 9345, 9369, 9381, 9405, 9411, 9435
OFFSET
1,3
COMMENTS
The binary expansion of a term > 1 can be split into two symmetrical parts of the same size (this size being a power of 2) (possibly after adjoining some leading 0's), and the first part contains at least one 1.
If m is a term, then A001196(m) is also a term.
EXAMPLE
A345352(96) = 96, so 96 belongs to this sequence.
PROG
(PARI) is(n) = { my (b=binary(n), x); for (k=1, oo, x=2^k-#b; if (x>=0, b=concat(vector(x), b); return (n==fromdigits(concat(Vecrev(b[1..#b/2]), Vecrev(b[#b/2+1..#b])), 2)))) }
(PARI) See Links section.
(Python)
def A345352(n):
b = bin(n)[2:]
bb = bin(len(b))[2:]
if bb != '1' + '0'*(len(bb)-1): b = '0'*(2**len(bb) - len(b)) + b
return int(b[:len(b)//2][::-1] + b[len(b)//2:][::-1], 2)
def ok(n): return A345352(n) == n
print(list(filter(ok, range(9436)))) # Michael S. Branicky, Jun 16 2021
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, Jun 16 2021
STATUS
approved