CINXE.COM

A002779 - OEIS

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <html> <head> <link rel="stylesheet" href="/styles.css"> <meta name="format-detection" content="telephone=no"> <meta http-equiv="content-type" content="text/html; charset=utf-8"> <meta name=viewport content="width=device-width, initial-scale=1"> <meta name="keywords" content="OEIS,integer sequences,Sloane" /> <title>A002779 - OEIS</title> <link rel="search" type="application/opensearchdescription+xml" title="OEIS" href="/oeis.xml"> <script> var myURL = "\/A002779" function redir() { var host = document.location.hostname; if(host != "oeis.org" && host != "127.0.0.1" && !/^([0-9.]+)$/.test(host) && host != "localhost" && host != "localhost.localdomain") { document.location = "https"+":"+"//"+"oeis"+".org/" + myURL; } } function sf() { if(document.location.pathname == "/" && document.f) document.f.q.focus(); } </script> </head> <body bgcolor=#ffffff onload="redir();sf()"> <div class=loginbar> <div class=login> <a href="/login?redirect=%2fA002779">login</a> </div> </div> <div class=center><div class=top> <center> <div class=donors> The OEIS is supported by <a href="http://oeisf.org/#DONATE">the many generous donors to the OEIS Foundation</a>. </div> <div class=banner> <a href="/"><img class=banner border="0" width="600" src="/banner2021.jpg" alt="A002779 - OEIS"></a> </div> </center> </div></div> <div class=center><div class=pagebody> <div class=searchbarcenter> <form name=f action="/search" method="GET"> <div class=searchbargreet> <div class=searchbar> <div class=searchq> <input class=searchbox maxLength=1024 name=q value="" title="Search Query"> </div> <div class=searchsubmit> <input type=submit value="Search" name=go> </div> <div class=hints> <span class=hints><a href="/hints.html">Hints</a></span> </div> </div> <div class=searchgreet> (Greetings from <a href="/welcome">The On-Line Encyclopedia of Integer Sequences</a>!) </div> </div> </form> </div> <div class=sequence> <div class=space1></div> <div class=line></div> <div class=seqhead> <div class=seqnumname> <div class=seqnum> A002779 </div> <div class=seqname> Palindromic squares. <br><font size=-1>(Formerly M3371 N1358)</font> </div> </div> <div class=scorerefs> 41 </div> </div> <div> <div class=seqdatabox> <div class=seqdata>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</div> <div class=seqdatalinks> (<a href="/A002779/list">list</a>; <a href="/A002779/graph">graph</a>; <a href="/search?q=A002779+-id:A002779">refs</a>; <a href="/A002779/listen">listen</a>; <a href="/history?seq=A002779">history</a>; <a href="/search?q=id:A002779&fmt=text">text</a>; <a href="/A002779/internal">internal format</a>) </div> </div> </div> <div class=entry> <div class=section> <div class=sectname>OFFSET</div> <div class=sectbody> <div class=sectline>1,3</div> </div> </div> <div class=section> <div class=sectname>COMMENTS</div> <div class=sectbody> <div class=sectline>These are numbers that are both squares (see <a href="/A000290" title="The squares: a(n) = n^2.">A000290</a>) and palindromes (see <a href="/A002113" title="Palindromes in base 10.">A002113</a>).</div> </div> </div> <div class=section> <div class=sectname>REFERENCES</div> <div class=sectbody> <div class=sectline>N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).</div> <div class=sectline>N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).</div> </div> </div> <div class=section> <div class=sectname>LINKS</div> <div class=sectbody> <div class=sectline>Hans Havermann (via Feng Yuan), T. D. Noe (from P. De Geest) [to 485], <a href="/A002779/b002779.txt">Table of n, a(n) for n = 1..1940</a></div> <div class=sectline>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-2014. - From <a href="/wiki/User:N._J._A._Sloane">N. J. A. Sloane</a>, Nov 08 2012</div> <div class=sectline>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.</div> <div class=sectline>Patrick De Geest, <a href="https://www.worldofnumbers.com/nobase10pg2.htm">Palindromic Squares in bases 2 to 17</a></div> <div class=sectline>W. R. Marshall, <a href="https://web.archive.org/web/20020614225321/http://www.geocities.com/williamrexmarshall/math/palsq.html">Palindromic Squares</a></div> <div class=sectline>Phakhinkon Phunphayap, Prapanpong Pongsriiam, <a href="https://arxiv.org/abs/1803.09621">Reciprocal sum of palindromes</a>, arXiv:1803.00161 [math.CA], 2018.</div> <div class=sectline>G. J. Simmons, <a href="/A002778/a002778_2.pdf">Palindromic powers</a>, J. Rec. Math., 3 (No. 2, 1970), 93-98. [Annotated scanned copy]</div> <div class=sectline>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]</div> <div class=sectline>Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/PalindromicNumber.html">Palindromic Number.</a></div> <div class=sectline>Feng Yuan, <a href="http://www.fengyuan.com/palindrome.html">Palindromic Square Numbers</a></div> </div> </div> <div class=section> <div class=sectname>FORMULA</div> <div class=sectbody> <div class=sectline>From <a href="/wiki/User:Reinhard_Zumkeller">Reinhard Zumkeller</a>, Oct 11 2011: (Start)</div> <div class=sectline>a(n) = <a href="/A002778" title="Numbers whose square is a palindrome.">A002778</a>(n)^2.</div> <div class=sectline><a href="/A136522" title="a(n) = 1 if n is a palindrome, otherwise 0.">A136522</a>(<a href="/A000290" title="The squares: a(n) = n^2.">A000290</a>(a(n))) = 1.</div> <div class=sectline><a href="/A010052" title="Characteristic function of squares: a(n) = 1 if n is a square, otherwise 0.">A010052</a>(a(n)) * <a href="/A136522" title="a(n) = 1 if n is a palindrome, otherwise 0.">A136522</a>(a(n)) = 1. (End)</div> </div> </div> <div class=section> <div class=sectname>EXAMPLE</div> <div class=sectbody> <div class=sectline>676 is included because it is both a perfect square and a palindrome.</div> </div> </div> <div class=section> <div class=sectname>MATHEMATICA</div> <div class=sectbody> <div class=sectline>palindromicNumberQ = ((# // IntegerDigits // Reverse // FromDigits) == #) &amp;; Select[Table[n^2, {n, 0, 9999}], palindromicNumberQ] (* <a href="/wiki/User:Herman_Beeksma">Herman Beeksma</a>, Jul 14 2005 *)</div> <div class=sectline>pb10Q[n_] := Module[{idn10 = IntegerDigits[n, 10]}, idn10 == Reverse[idn10]]; Select[Range[0, 19999]^2, pb10Q] (* <a href="/wiki/User:Vincenzo_Librandi">Vincenzo Librandi</a>, Jul 24 2014 *)</div> <div class=sectline>Select[Range[0, 22999]^2, PalindromeQ] (* Requires Mathematica version 10 or later. - <a href="/wiki/User:Harvey_P._Dale">Harvey P. Dale</a>, May 01 2017 *)</div> </div> </div> <div class=section> <div class=sectname>PROG</div> <div class=sectbody> <div class=sectline>(Haskell)</div> <div class=sectline>a002779 n = a002778_list !! (n-1)</div> <div class=sectline>a002779_list = filter ((== 1) . a136522) a000290_list</div> <div class=sectline>-- <a href="/wiki/User:Reinhard_Zumkeller">Reinhard Zumkeller</a>, Oct 11 2011</div> <div class=sectline>(PARI) is(n)=my(d=digits(n)); d==Vecrev(d) &amp;&amp; issquare(n) \\ <a href="/wiki/User:Charles_R_Greathouse_IV">Charles R Greathouse IV</a>, Feb 06 2017</div> <div class=sectline>(Scala) def isPalindromic(n: BigInt): Boolean = n.toString == n.toString.reverse</div> <div class=sectline> val squares = ((1: BigInt) to (1000000: BigInt)).map(n =&gt; n * n)</div> <div class=sectline> squares.filter(isPalindromic(_)) // <a href="/wiki/User:Alonso_del_Arte">Alonso del Arte</a>, Oct 07 2019</div> <div class=sectline>(Magma) [k^2:k in [0..100000]| Intseq(k^2) eq Reverse(Intseq(k^2)) ]; // <a href="/wiki/User:Marius_A._Burtea">Marius A. Burtea</a>, Oct 15 2019</div> <div class=sectline>(Python)</div> <div class=sectline><a href="/A002779" title="Palindromic squares.">A002779</a>_list = [int(s) for s in (str(m**2) for m in range(10**5)) if s == s[::-1]] # <a href="/wiki/User:Chai_Wah_Wu">Chai Wah Wu</a>, Aug 26 2021</div> </div> </div> <div class=section> <div class=sectname>CROSSREFS</div> <div class=sectbody> <div class=sectline>Cf. <a href="/A000290" title="The squares: a(n) = n^2.">A000290</a>, <a href="/A002113" title="Palindromes in base 10.">A002113</a>, <a href="/A002778" title="Numbers whose square is a palindrome.">A002778</a>, <a href="/A010052" title="Characteristic function of squares: a(n) = 1 if n is a square, otherwise 0.">A010052</a>, <a href="/A027829" title="Palindromic squares with an even number of digits.">A027829</a> (subsets), <a href="/A028817" title="Palindromic squares with an odd number of digits.">A028817</a>, <a href="/A029734" title="Palindromic squares in base 16.">A029734</a>.</div> <div class=sectline>Cf. <a href="/A029738" title="Palindromic squares in base 12.">A029738</a>, <a href="/A029806" title="n in base 8 is a palindromic square.">A029806</a>, <a href="/A029983" title="Squares which are palindromes in base 2.">A029983</a>, <a href="/A029985" title="Squares which are palindromes in base 3.">A029985</a>, <a href="/A029987" title="Squares which are palindromes in base 4.">A029987</a>, <a href="/A029989" title="Squares which are palindromes in base 5.">A029989</a>, <a href="/A029991" title="Squares which are palindromes in base 6.">A029991</a>, <a href="/A029993" title="Squares which are palindromes in base 7.">A029993</a>.</div> <div class=sectline>Cf. <a href="/A029995" title="Squares which are palindromes in base 9.">A029995</a>, <a href="/A029997" title="Squares which are palindromes in base 11.">A029997</a>, <a href="/A029999" title="Squares which are palindromes in base 13.">A029999</a>, <a href="/A030074" title="Squares which are palindromes in base 14.">A030074</a>, <a href="/A030075" title="Squares which are palindromes in base 15.">A030075</a>, <a href="/A057136" title="Palindromes whose square root is a palindrome.">A057136</a>, <a href="/A136522" title="a(n) = 1 if n is a palindrome, otherwise 0.">A136522</a>.</div> <div class=sectline>Sequence in context: <a href="/A229971" title="Palindromes n whose product of proper divisors is a palindrome &gt; 1 and not equal to n.">A229971</a> <a href="/A158642" title="Palindromic numbers which are the product of a number n and its reversal (n written backwards)">A158642</a> <a href="/A131760" title="Numbers n such that n multiplied by its reverse yields a fourth power.">A131760</a> * <a href="/A028817" title="Palindromic squares with an odd number of digits.">A028817</a> <a href="/A319483" title="a(n) = A128921(n)^2.">A319483</a> <a href="/A057136" title="Palindromes whose square root is a palindrome.">A057136</a></div> <div class=sectline>Adjacent sequences: <a href="/A002776" title="Terms in certain determinants.">A002776</a> <a href="/A002777" title="Restricted permutations.">A002777</a> <a href="/A002778" title="Numbers whose square is a palindrome.">A002778</a> * <a href="/A002780" title="Numbers whose cube is a palindrome.">A002780</a> <a href="/A002781" title="Palindromic cubes.">A002781</a> <a href="/A002782" title="Concatenate the natural numbers, then partition into minimal strings so that each term divides the next.">A002782</a></div> </div> </div> <div class=section> <div class=sectname>KEYWORD</div> <div class=sectbody> <div class=sectline><span title="a sequence of nonnegative numbers">nonn</span>,<span title="dependent on base used for sequence">base</span>,<span title="an exceptionally nice sequence">nice</span>,<span title="it is very easy to produce terms of sequence">easy</span></div> </div> </div> <div class=section> <div class=sectname>AUTHOR</div> <div class=sectbody> <div class=sectline><a href="/wiki/User:N._J._A._Sloane">N. J. A. Sloane</a></div> </div> </div> <div class=section> <div class=sectname>STATUS</div> <div class=sectbody> <div class=sectline>approved</div> </div> </div> </div> <div class=space10></div> </div> </div></div> <p> <div class=footerpad></div> <div class=footer> <center> <div class=bottom> <div class=linksbar> <a href="/">Lookup</a> <a href="/wiki/Welcome"><font color="red">Welcome</font></a> <a href="/wiki/Main_Page"><font color="red">Wiki</font></a> <a href="/wiki/Special:RequestAccount">Register</a> <a href="/play.html">Music</a> <a href="/plot2.html">Plot 2</a> <a href="/demo1.html">Demos</a> <a href="/wiki/Index_to_OEIS">Index</a> <a href="/webcam">WebCam</a> <a href="/Submit.html">Contribute</a> <a href="/eishelp2.html">Format</a> <a href="/wiki/Style_Sheet">Style Sheet</a> <a href="/transforms.html">Transforms</a> <a href="/ol.html">Superseeker</a> <a href="/recent">Recents</a> </div> <div class=linksbar> <a href="/community.html">The OEIS Community</a> </div> <div class=linksbar> Maintained by <a href="http://oeisf.org">The OEIS Foundation Inc.</a> </div> <div class=dbinfo>Last modified April 4 02:47 EDT 2025. Contains 382437 sequences.</div> <div class=legal> <a href="/wiki/Legal_Documents">License Agreements, Terms of Use, Privacy Policy</a> </div> </div> </center> </div> </body> </html>

Pages: 1 2 3 4 5 6 7 8 9 10