cp's OEIS Frontend

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.

A263616 Number of n-digit numbers whose square is a palindrome.

This page as a plain text file.
%I A263616 #24 Apr 08 2025 14:10:17
%S A263616 4,3,8,5,11,6,19,14,25,18,49,31,71,46,105,71,154,101,209,132,292,182,
%T A263616 384,236,497,302,636,383,799,475,981,578,1201,701
%N A263616 Number of n-digit numbers whose square is a palindrome.
%C A263616 Number of terms in A002778 with exactly n digits.
%H A263616 G. J. Simmons, <a href="/A002778/a002778_2.pdf">Palindromic powers</a>, J. Rec. Math., 3 (No. 2, 1970), 93-98. [Annotated scanned copy] See page 95.
%e A263616 a(2) = 3 because there are three 2-digit numbers with palindromic squares: 11^2 = 121, 22^2 = 484, 26^2 = 676.
%t A263616 Join[{4},Table[Total[Table[If[PalindromeQ[n^2],1,0],{n,10^x,10^(x+1)-1}]],{x,9}]] (* _Harvey P. Dale_, Apr 09 2019 *)
%o A263616 (Python)
%o A263616 from itertools import product
%o A263616 def pal(n): s = str(n); return s == s[::-1]
%o A263616 def a(n): return int(n==1) + sum(pal(i**2) for i in range(10**(n-1), 10**n))
%o A263616 print([a(n) for n in range(1, 8)]) # _Michael S. Branicky_, Apr 03 2021
%Y A263616 Cf. A002778, A002779, A263617, A263618, A263619.
%K A263616 nonn,base,more
%O A263616 1,1
%A A263616 _N. J. A. Sloane_, Oct 23 2015
%E A263616 a(9)-a(10) from _Chai Wah Wu_, Oct 25 2015
%E A263616 a(11) from _Michael S. Branicky_, Apr 03 2021
%E A263616 a(12)-a(22) (using A002778) from _Chai Wah Wu_, Sep 16 2021
%E A263616 a(23)-a(34) from A002778 added by _Max Alekseyev_, Apr 08 2025