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 A002778 M0907 N0342 #94 Apr 02 2025 18:04:06 %S A002778 0,1,2,3,11,22,26,101,111,121,202,212,264,307,836,1001,1111,2002,2285, %T A002778 2636,10001,10101,10201,11011,11111,11211,20002,20102,22865,24846, %U A002778 30693,100001,101101,110011,111111,200002,798644,1000001,1001001 %N A002778 Numbers whose square is a palindrome. %C A002778 A002779(n) = a(n)^2; A136522(A000290(a(n))) = 1. - _Reinhard Zumkeller_, Oct 11 2011 %C A002778 See A016113 for the subset of numbers whose palindromic squares have an even number of digits. - _M. F. Hasler_, Jun 08 2014 %D A002778 N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence). %D A002778 N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence). %H A002778 Patrick De Geest, <a href="/A002778/b002778.txt">Table of n, a(n) for n = 1..8729</a> (communicated by Max Alekseyev) %H A002778 Patrick De Geest, <a href="https://www.worldofnumbers.com/Plain%20Text%20Squares.txt">Table of square palindromes</a> %H A002778 Patrick De Geest, <a href="https://www.worldofnumbers.com/nobase10pg2.htm">Palindromic Squares in bases 2 to 17</a> %H A002778 Martianus Frederic Ezerman, Bertrand Meyer and Patrick Solé, <a href="http://arxiv.org/abs/1210.7593">On Polynomial Pairs of Integers</a>, arXiv:1210.7593 [math.NT], 2012. - From _N. J. A. Sloane_, Nov 08 2012 %H A002778 Martianus Frederic Ezerman, Bertrand Meyer and Patrick Solé, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL18/Ezerman/eze3.html">On Polynomial Pairs of Integers</a>, Journal of Integer Sequences, Vol. 18 (2015), Article 15.3.5. %H A002778 Michael Keith, <a href="/A002778/a002778_1.pdf">Classification and enumeration of palindromic squares</a>, J. Rec. Math., 22 (No. 2, 1990), 124-132. [Annotated scanned copy] %H A002778 William Rex Marshall, <a href="https://web.archive.org/web/20020614225321/http://www.geocities.com/williamrexmarshall/math/palsq.html">Palindromic Squares</a> %H A002778 Gustavus J. Simmons, <a href="/A002778/a002778_2.pdf">Palindromic powers</a>, J. Rec. Math., 3 (No. 2, 1970), 93-98. [Annotated scanned copy] %H A002778 Gustavus 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] %H A002778 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/PalindromicNumber.html">Palindromic Number.</a> %H A002778 Feng Yuan, <a href="http://www.fengyuan.com/palindrome.html">Palindromic Square Numbers</a> %e A002778 26^2 = 676, which is a palindrome, so 26 is in the sequence. %e A002778 27^2 = 729, which is not a palindrome, so 27 is not in the sequence. %t A002778 palsquareQ[n_] := (n2 = IntegerDigits[n^2]; n2 == Reverse[n2]); A002778 = {}; Do[ If[palsquareQ[n], Print[n]; AppendTo[A002778, n]], {n, 0, 2 * 10^6}]; A002778 (* _Jean-François Alcover_, Dec 01 2011 *) %t A002778 Sqrt[#]&/@Select[Range[0, 12 * 10^5]^2, # == IntegerReverse[#] &] (* The program uses the IntegerReverse function from Mathematica version 10. - _Harvey P. Dale_, Mar 04 2016 *) %t A002778 Select[Range[0, 1001001], PalindromeQ[#^2] &] (* _Michael De Vlieger_, Dec 06 2017 *) %o A002778 (Haskell) %o A002778 a002778 n = a002778_list !! (n-1) %o A002778 a002778_list = filter ((== 1) . a136522 . (^ 2)) [0..] %o A002778 -- _Reinhard Zumkeller_, Oct 11 2011 %o A002778 (PARI) is_A002778(n)=is_A002113(n^2) \\ _M. F. Hasler_, Jun 08 2014 %o A002778 (Magma) [n: n in [0..2*10^6] | Intseq(n^2) eq Reverse(Intseq(n^2))]; // _Vincenzo Librandi_, Apr 07 2015 %o A002778 (Python) %o A002778 from itertools import count, islice %o A002778 def A002778_gen(): # generator of terms %o A002778 return filter(lambda k: (s:=str(k**2))[:(t:=(len(s)+1)//2)]==s[:-t-1:-1],count(0)) %o A002778 A002778_list = list(islice(A002778_gen(),20)) # _Chai Wah Wu_, Jun 23 2022 %Y A002778 Cf. A002779, A002113, A016113, A136522, A000290. %Y A002778 See A003166 for binary analog. %Y A002778 For analogs in bases 2,3,4,5,etc. see A003166 onwards, A029984 onwards, and A263607 onwards. %K A002778 base,nonn,nice,easy %O A002778 1,3 %A A002778 _N. J. A. Sloane_ %E A002778 More terms from _Patrick De Geest_