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 A003166 M3181 #72 Feb 10 2025 20:58:03 %S A003166 0,1,3,4523,11991,18197,141683,1092489,3168099,6435309,12489657, %T A003166 17906499,68301841,295742437,390117873,542959199,4770504939, %U A003166 17360493407,73798050723,101657343993,107137400475,202491428745,1615452642807,4902182461643,9274278357017,12863364360297 %N A003166 Numbers whose square in base 2 is a palindrome. %C A003166 Numbers k such that k^2 is in A006995. %C A003166 The only palindromes in this sequence are 0, 1, and 3. See AMM problem 11922. - _Max Alekseyev_, Oct 22 2022 %D A003166 G. J. Simmons, On palindromic squares of non-palindromic numbers, J. Rec. Math., 5 (No. 1, 1972), 11-19. %D A003166 N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence). %H A003166 Don Knuth, <a href="/A003166/b003166.txt">Table of n, a(n) for n = 1..50</a> [This table extends earlier work of Gus Simmons, Jon Schoenfield, Don Knuth, and Michael Coriand] %H A003166 M. A. Alekseyev, <a href="http://doi.org/10.4169/amer.math.monthly.123.7.722">Problem 11922</a>. American Mathematical Monthly 123:7 (2016), 722. %H A003166 Patrick De Geest, <a href="https://www.worldofnumbers.com/nobase10pg2.htm">Palindromic Squares in bases 2 to 17</a> %H A003166 Carlos Rivera, <a href="http://www.primepuzzles.net/puzzles/puzz_280.htm">Problem 89. Palindromic binary expression of primes squared</a>, The Prime Puzzles & Problems Connection. %H A003166 G. J. Simmons, <a href="/A002778/a002778.pdf">On palindromic squares of non-palindromic numbers</a>, J. Rec. Math., 5 (No. 1, 1972), 11-19. [Annotated scanned copy] %e A003166 3^2 = 9 = 1001_2, a palindrome. %e A003166 4523^2 = 20457529 = 1001110000010100000111001_2. %t A003166 Do[c = RealDigits[n^2, 2][[1]]; If[c == Reverse[c], Print[n]], {n, 0, 10^9}] %o A003166 (PARI) is(n)=my(b=binary(n^2)); b==Vecrev(b) \\ _Charles R Greathouse IV_, Feb 07 2017 %o A003166 (Python) %o A003166 from itertools import count, islice %o A003166 def A003166_gen(): # generator of terms %o A003166 return filter(lambda k: (s:=bin(k**2)[2:])[:(t:=(len(s)+1)//2)]==s[:-t-1:-1],count(0)) %o A003166 A003166_list = list(islice(A003166_gen(),10)) # _Chai Wah Wu_, Jun 23 2022 %Y A003166 Cf. A002778 (base 10 analog), A029983 (the actual squares). In binary: A262595, A262596. %Y A003166 Cf. A006995. %K A003166 base,nonn,hard,nice %O A003166 1,3 %A A003166 _N. J. A. Sloane_, _R. H. Hardin_ %E A003166 a(16) = 4770504939 found by _Patrick De Geest_, May 15 1999 %E A003166 a(17)-a(31) from _Jon E. Schoenfield_, May 08 2009 %E A003166 a(32) = 285000288617375, %E A003166 a(33) = 301429589329949, %E A003166 a(34) = 1178448744881657 from _Don Knuth_, Jan 28 2013 [who doublechecked the previous results and searched up to 2^104]