cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A345362 Fixed points of A345352.

This page as a plain text file.
%I A345362 #14 Jun 21 2021 03:05:26
%S A345362 0,1,2,3,12,15,96,102,105,111,144,150,153,159,240,246,249,255,6144,
%T A345362 6168,6180,6204,6210,6234,6246,6270,6273,6297,6309,6333,6339,6363,
%U A345362 6375,6399,9216,9240,9252,9276,9282,9306,9318,9342,9345,9369,9381,9405,9411,9435
%N A345362 Fixed points of A345352.
%C A345362 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.
%C A345362 If m is a term, then A001196(m) is also a term.
%H A345362 Rémy Sigrist, <a href="/A345362/b345362.txt">Table of n, a(n) for n = 1..10000</a>
%H A345362 <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a>
%H A345362 Rémy Sigrist, <a href="/A345362/a345362.png">Binary plot of the terms < 2^16</a>
%H A345362 Rémy Sigrist, <a href="/A345362/a345362.gp.txt">PARI program for A345362</a>
%e A345362 A345352(96) = 96, so 96 belongs to this sequence.
%o A345362 (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)))) }
%o A345362 (PARI) See Links section.
%o A345362 (Python)
%o A345362 def A345352(n):
%o A345362     b = bin(n)[2:]
%o A345362     bb = bin(len(b))[2:]
%o A345362     if bb != '1' + '0'*(len(bb)-1): b = '0'*(2**len(bb) - len(b)) + b
%o A345362     return int(b[:len(b)//2][::-1] + b[len(b)//2:][::-1], 2)
%o A345362 def ok(n): return A345352(n) == n
%o A345362 print(list(filter(ok, range(9436))))  # _Michael S. Branicky_, Jun 16 2021
%Y A345362 Cf. A001196, A057890, A345352.
%K A345362 nonn,base
%O A345362 1,3
%A A345362 _Rémy Sigrist_, Jun 16 2021