A345362 Fixed points of A345352.
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
Examples
A345352(96) = 96, so 96 belongs to this sequence.
Links
- Rémy Sigrist, Table of n, a(n) for n = 1..10000
- Index entries for sequences related to binary expansion of n
- Rémy Sigrist, Binary plot of the terms < 2^16
- Rémy Sigrist, PARI program for A345362
Programs
-
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
Comments