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 A057135 #32 Aug 11 2024 14:41:33 %S A057135 0,1,2,3,11,22,101,111,121,202,212,1001,1111,2002,10001,10101,10201, %T A057135 11011,11111,11211,20002,20102,100001,101101,110011,111111,200002, %U A057135 1000001,1001001,1002001,1010101,1011101,1012101,1100011,1101011,1102011,1110111,1111111 %N A057135 Palindromes whose square is a palindrome; also palindromes whose sum of squares of digits is less than 10. %H A057135 Robert Israel, <a href="/A057135/b057135.txt">Table of n, a(n) for n = 1..10000</a> (n=1..412 from R. J. Mathar) %H A057135 P. De Geest, <a href="https://www.worldofnumbers.com/subsquar.htm">Subsets of Palindromic Squares</a> %F A057135 a(n) = sqrt(A057136(n)) %e A057135 121 is OK since 121^2=14641 is also a palindrome. %p A057135 dmax:= 7: # to get all terms with up to dmax digits %p A057135 Res:= 0,1,2,3,11,22: %p A057135 Po:= [[0],[1],[2],[3]]: Pe:= [[0,0],[1,1],[2,2]]: %p A057135 for d from 1 to dmax do %p A057135 if d::odd then %p A057135 Po:= select(t -> add(s^2,s=t) < 10, [seq(seq([i,op(t),i], t=Po),i=0..2)]); %p A057135 Res:= Res, op(map(proc(p) if p[1] <> 0 then add(p[i]*10^(i-1),i=1..nops(p)) fi end proc, Po)) %p A057135 else %p A057135 Pe:= select(t -> add(s^2,s=t) < 10, [seq(seq([i,op(t),i], t=Pe),i=0..2)]); %p A057135 Res:= Res, op(map(proc(p) if p[1] <> 0 then add(p[i]*10^(i-1),i=1..nops(p)) fi end proc, Pe)) %p A057135 fi; %p A057135 od: %p A057135 Res; # _Robert Israel_, Jun 21 2017 %t A057135 PalQ[n_] := FromDigits[Reverse[IntegerDigits[n]]] == n; t = {}; Do[ %t A057135 If[PalQ[n] && PalQ[n^2], AppendTo[t, n]], {n, 0, 1200000}]; t (* _Jayanta Basu_, May 10 2013 *) %t A057135 Select[Range[0,12*10^5],AllTrue[{#,#^2},PalindromeQ]&](* Requires Mathematica version 10 or later *) (* _Harvey P. Dale_, Feb 20 2018 *) %o A057135 (PARI) is(n) = digits(n)==Vecrev(digits(n)) && digits(n^2)==Vecrev(digits(n^2)) \\ _Felix Fröhlich_, Jun 21 2017 %Y A057135 Cf. A000290, A002113, A002779, A057136, A128921. %K A057135 base,nonn %O A057135 1,3 %A A057135 _Henry Bottomley_, Aug 12 2000 %E A057135 1001001 inserted by _R. J. Mathar_, Nov 04 2012