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 A027829 #51 Jul 05 2025 16:33:55 %S A027829 698896,637832238736,4099923883299904,6916103777337773016196, %T A027829 40460195511188111559106404,4872133543202112023453312784, %U A027829 9658137819052882509187318569,46501623417708833880771432610564,1635977102407987117897042017795361,163296619873968186681869378916692361 %N A027829 Palindromic squares with an even number of digits. %D A027829 Charles Ashbacher, More on palindromic squares, J. Rec. Math. 22, no. 2 (1990), 133-135. [A scan of the first page of this article is included with the last page of the Keith (1990) scan] %H A027829 M. F. Hasler, <a href="/A027829/b027829.txt">Table of n, a(n) for n = 1..14</a> %H A027829 K. S. Brown, <a href="http://www.mathpages.com/home/kmath359.htm">On General Palindromic Numbers</a> %H A027829 Patrick De Geest, <a href="https://www.worldofnumbers.com/subsquar.htm#Squareven">Sporadic palindromic squares of even length</a> %H A027829 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] %F A027829 a(n) = A016113(n)^2. - _M. F. Hasler_, Jun 08 2014 %e A027829 836^2 = 698896, which is palindromic, so 698896 is in the sequence. %e A027829 1001^2 = 1002001, which is palindromic, but it has an odd number of digits, so it's not in the sequence. %t A027829 Select[Range[1000000]^2, PalindromeQ[#] && OddQ[Floor[Log[10, #]]] &] (* _Alonso del Arte_, Oct 11 2019 *) %o A027829 (PARI) is_A027829(n)={issquare(n)&&Vecrev(n=digits(n))==n&&!bittest(#n, 0)} \\ This is faster than first checking for even length if applied to numbers known to have an even number of digits, as should be the case for a systematic search. For this, one should only consider squares, i.e., rather use is_A016113. - _M. F. Hasler_, Jun 08 2014 %o A027829 (Scala) def isPalindromic(n: BigInt): Boolean = n.toString == n.toString.reverse %o A027829 val squares = ((1: BigInt) to (1000000: BigInt)).map(n => n * n) %o A027829 squares.filter(n => isPalindromic(n) && n.toString.length % 2 == 0) // _Alonso del Arte_, Oct 07 2019 %o A027829 (Python) %o A027829 from math import isqrt %o A027829 from itertools import count, islice %o A027829 def A027829_gen(): # generator of terms %o A027829 return filter(lambda n: (s:=str(n))[:(t:=(len(s)+1)//2)]==s[:-t-1:-1], map(lambda n: n**2, (d for l in count(2,2) for d in range(isqrt(10**(l-1))+1,isqrt(10**l)+1)))) %o A027829 A027829_list = list(islice(A027829_gen(),3)) # _Chai Wah Wu_, Jun 23 2022 %Y A027829 Cf. A002113, A002778, A002779, A016113. %K A027829 nonn,base %O A027829 1,1 %A A027829 Keith Devlin, via Boon Leong (boon_leong(AT)hotmail.com) %E A027829 Two new terms were recently found by Bennett from UK (communication from _Patrick De Geest_, Dec 1999 or before) %E A027829 Edited by _M. F. Hasler_, Jun 08 2014