

A027829


Palindromic squares with an even number of digits.


3



698896, 637832238736, 4099923883299904, 6916103777337773016196, 40460195511188111559106404, 4872133543202112023453312784, 9658137819052882509187318569, 46501623417708833880771432610564, 1635977102407987117897042017795361, 163296619873968186681869378916692361
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,1


REFERENCES

Charles Ashbacher, More on palindromic squares, J. Rec. Math. 22, no. 2 (1990), 133135. [A scan of the first page of this article is included with the last page of the Keith (1990) scan]


LINKS

M. F. Hasler, Table of n, a(n) for n = 1..14
K. S. Brown, On General Palindromic Numbers
Patrick De Geest, Palindromic Squares
Patrick De Geest, Subsets of Palindromic Squares
Michael Keith, Classification and enumeration of palindromic squares, J. Rec. Math., 22 (No. 2, 1990), 124132. [Annotated scanned copy]


FORMULA

a(n) = A016113(n)^2.  M. F. Hasler, Jun 08 2014


EXAMPLE

836^2 = 698896, which is palindromic, so 698896 is in the sequence.
1001^2 = 1002001, which is palindromic, but it has an odd number of digits, so it's not in the sequence.


MATHEMATICA

Select[Range[1000000]^2, PalindromeQ[#] && OddQ[Floor[Log[10, #]]] &] (* Alonso del Arte, Oct 11 2019 *)


PROG

(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
(Scala) def isPalindromic(n: BigInt): Boolean = n.toString == n.toString.reverse
val squares = ((1: BigInt) to (1000000: BigInt)).map(n => n * n)
squares.filter(n => isPalindromic(n) && n.toString.length % 2 == 0) // Alonso del Arte, Oct 07 2019


CROSSREFS

Cf. A002113, A002778, A002779, A016113.
Sequence in context: A319917 A205608 A205439 * A258129 A204496 A332850
Adjacent sequences: A027826 A027827 A027828 * A027830 A027831 A027832


KEYWORD

nonn,base


AUTHOR

Keith Devlin, via Boon Leong (boon_leong(AT)hotmail.com)


EXTENSIONS

Two new terms were recently found by Bennett from UK (communication from Patrick De Geest, Dec. 1999 or before)
Edited by M. F. Hasler, Jun 08 2014


STATUS

approved



