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.
%I A354832 #10 Jul 31 2022 13:56:48 %S A354832 0,1,2,5,10,26,37,90,165,421,933,1957,4005,8101,8282,24666,40869, %T A354832 106405,237477,286810,811098,1286053,3383205,5005402,11771813, %U A354832 28549029,38559834,105668698,239886426,296984485,833855397,1313628250,3461111898,7756079194,9423789989 %N A354832 Integers m such that iterating the map f(x) = x^2 + 1 on m generates a number ending with m in binary format. %C A354832 It seems that 2^(n-2) <= a(n) < 2^(n-1) for n > 1. %C A354832 All terms are part of a cycle under x -> f(x) mod 2^L. For example, 5 = f(2), 10 = f(5) mod (2^4), 26 = f(5), 37 = f(10) mod (2^6), and 90 = f(5) mod (2^6). %C A354832 It takes 2 iterations for a term in the sequence to generate a number ending with the term itself in binary format. Endings of the numbers in the 2 iterations, m1 -> m2 -> m1, for the number of binary digits (d) up to 10 are given below. Note that m1 and m2 are bit-by-bit complement to each other, due to the fact that f(f(x)) = x mod 2^L as pointed out by Kevin Ryde in Discussion. %C A354832 d m1 or m2 (bin) m2 or m1 (bin) m1 (decimal) %C A354832 -- ------------------ ------------------ ------------------ %C A354832 1 0 (m1/m2) 1 (m2/m1) a(1) = 0; a(2) = 1 %C A354832 2 10 (m1) 01 (m2) a(3) = 2 %C A354832 3 010 (m2) 101 (m1) a(4) = 5 %C A354832 4 1010 (m1) 0101 (m2) a(5) = 10 %C A354832 5 11010 (m1) 00101 (m2) a(6) = 26 %C A354832 6 011010 (m2) 100101 (m1) a(7) = 37 %C A354832 7 1011010 (m1) 0100101 (m2) a(8) = 90 %C A354832 8 01011010 (m2) 10100101 (m1) a(9) = 165 %C A354832 9 001011010 (m2) 110100101 (m1) a(10)= 421 %C A354832 10 0001011010 (m2) 1110100101 (m1) a(11)= 933 %e A354832 26 is a term because iterating the map on 26 gives, in binary format, 11010 -> 1010100101 -> 1101111111001011010, which ends with 11010. %o A354832 (Python) %o A354832 R = [] %o A354832 for i in range(0, 34): %o A354832 t = 2**i; L = [] %o A354832 while t not in L: L.append(t); t = (t*t + 1) % 2**(i+1) %o A354832 {R.append(j) for j in {L[-1], L[-2]} if j not in R} %o A354832 R.sort(); print(*R, sep = ', ') %Y A354832 Cf. A002522, A350130, A350590, A352973. %K A354832 nonn,base %O A354832 1,3 %A A354832 _Ya-Ping Lu_, Jun 07 2022