A002779 Palindromic squares.
0, 1, 4, 9, 121, 484, 676, 10201, 12321, 14641, 40804, 44944, 69696, 94249, 698896, 1002001, 1234321, 4008004, 5221225, 6948496, 100020001, 102030201, 104060401, 121242121, 123454321, 125686521, 400080004, 404090404, 522808225
Offset: 1
Examples
676 is included because it is both a perfect square and a palindrome.
References
- N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
Links
- Hans Havermann (via Feng Yuan), T. D. Noe (from P. De Geest) [to 485], Table of n, a(n) for n = 1..1940
- Martianus Frederic Ezerman, Bertrand Meyer and Patrick Solé, On Polynomial Pairs of Integers, arXiv:1210.7593 [math.NT], 2012-2014. - From _N. J. A. Sloane_, Nov 08 2012
- Martianus Frederic Ezerman, Bertrand Meyer and Patrick Solé, On Polynomial Pairs of Integers, Journal of Integer Sequences, Vol. 18 (2015), Article 15.3.5.
- Patrick De Geest, Palindromic Squares in bases 2 to 17
- W. R. Marshall, Palindromic Squares
- Phakhinkon Phunphayap, Prapanpong Pongsriiam, Reciprocal sum of palindromes, arXiv:1803.00161 [math.CA], 2018.
- G. J. Simmons, Palindromic powers, J. Rec. Math., 3 (No. 2, 1970), 93-98. [Annotated scanned copy]
- G. J. Simmons, On palindromic squares of non-palindromic numbers, J. Rec. Math., 5 (No. 1, 1972), 11-19. [Annotated scanned copy]
- Eric Weisstein's World of Mathematics, Palindromic Number.
- Feng Yuan, Palindromic Square Numbers
Crossrefs
Programs
-
Haskell
a002779 n = a002778_list !! (n-1) a002779_list = filter ((== 1) . a136522) a000290_list -- Reinhard Zumkeller, Oct 11 2011
-
Magma
[k^2:k in [0..100000]| Intseq(k^2) eq Reverse(Intseq(k^2)) ]; // Marius A. Burtea, Oct 15 2019
-
Mathematica
palindromicNumberQ = ((# // IntegerDigits // Reverse // FromDigits) == #) &; Select[Table[n^2, {n, 0, 9999}], palindromicNumberQ] (* Herman Beeksma, Jul 14 2005 *) pb10Q[n_] := Module[{idn10 = IntegerDigits[n, 10]}, idn10 == Reverse[idn10]]; Select[Range[0, 19999]^2, pb10Q] (* Vincenzo Librandi, Jul 24 2014 *) Select[Range[0, 22999]^2, PalindromeQ] (* Requires Mathematica version 10 or later. - Harvey P. Dale, May 01 2017 *)
-
PARI
is(n)=my(d=digits(n)); d==Vecrev(d) && issquare(n) \\ Charles R Greathouse IV, Feb 06 2017
-
Python
A002779_list = [int(s) for s in (str(m**2) for m in range(10**5)) if s == s[::-1]] # Chai Wah Wu, Aug 26 2021
-
Scala
def isPalindromic(n: BigInt): Boolean = n.toString == n.toString.reverse val squares = ((1: BigInt) to (1000000: BigInt)).map(n => n * n) squares.filter(isPalindromic()) // _Alonso del Arte, Oct 07 2019
Comments