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.

Showing 1-4 of 4 results.

A263618 Number of palindromic squares with exactly n digits.

Original entry on oeis.org

4, 0, 3, 0, 7, 1, 5, 0, 11, 0, 5, 1, 19, 0, 13, 1, 25, 0, 18, 0, 48, 1, 31, 0, 70, 1, 44, 2, 105, 0, 70, 1, 153, 1, 98, 3, 209, 0, 132, 0, 291, 1, 181, 1, 384, 0, 234, 2, 496, 1, 301, 1, 636, 0, 383, 0, 798, 1, 474, 1, 981, 0, 578, 0, 1199, 2, 701
Offset: 1

Views

Author

N. J. A. Sloane, Oct 23 2015

Keywords

Comments

Number of terms in A002779 with exactly n digits.
a(24) = a(30) = a(38) = a(40) = 0. - Robert Price, Apr 26 2019
a(2*k+1) > 0 since (10^k+1)^2 is a palindrome of 2*k+1 digits. - Chai Wah Wu, Jun 14 2024

Crossrefs

Cf. A034822 (positions of zeros).

Programs

  • Mathematica
    Table[Length[Select[Range[If[n == 1, 0, Ceiling[Sqrt[10^(n - 1)]]],Floor[Sqrt[10^n]]], #^2 == IntegerReverse[#^2] &]], {n, 15}] (* Robert Price, Apr 26 2019 *)

Extensions

a(13)-a(19) from Chai Wah Wu, Oct 24 2015
a(20) from Robert Price, Apr 26 2019
a(21)-a(44) (using A002778) from Chai Wah Wu, Sep 16 2021
a(45)-a(67) from A002778 added by Max Alekseyev, Apr 08 2025

A263619 Number of palindromic squares with at most n digits.

Original entry on oeis.org

4, 4, 7, 7, 14, 15, 20, 20, 31, 31, 36, 37, 56, 56, 69, 70, 95, 95, 113, 113, 161, 162, 193, 193, 263, 264, 308, 310, 415, 415, 485, 486, 639, 640, 738, 741, 950, 950, 1082, 1082, 1373, 1374, 1555, 1556, 1940, 1940, 2174, 2176, 2672, 2673, 2974, 2975, 3611, 3611, 3994, 3994, 4792, 4793, 5267, 5268, 6249, 6249, 6827, 6827, 8026, 8028, 8729
Offset: 1

Views

Author

N. J. A. Sloane, Oct 23 2015

Keywords

Crossrefs

Partial sums of A263618.

Programs

  • Mathematica
    Table[Length[Select[Range[0, Floor[Sqrt[10^n]]], PalindromeQ[#^2] &]], {n, 10}] (* Robert Price, Apr 26 2019 *)

Extensions

a(13)-a(19) from Chai Wah Wu, Oct 24 2015
a(20) from Robert Price, Apr 26 2019
a(21)-a(44) using A263618 from Chai Wah Wu, Jun 14 2024
a(45)-a(67) added by Max Alekseyev, Apr 08 2025

A263620 Number of nonzero palindromic squares with at most 2n digits.

Original entry on oeis.org

3, 6, 14, 19, 30, 36, 55, 69, 94, 112, 161, 192, 263, 309, 414, 485, 639, 740, 949, 1081, 1373, 1555
Offset: 1

Views

Author

N. J. A. Sloane, Oct 23 2015

Keywords

Crossrefs

Programs

  • Mathematica
    Table[Length[Select[Range[1, Floor[Sqrt[10^(2 n)]]], PalindromeQ[#^2] &]], {n, 6}] (* Robert Price, Apr 26 2019 *)
  • Python
    def ispal(n): s = str(n); return s == s[::-1]
    def a(n):
      c, k, kk = 0, 1, 1
      while kk < 10**(2*n): c, k, kk = c + (ispal(kk)), k+1, kk + 2*k + 1
      return c
    print([a(n) for n in range(1, 8)]) # Michael S. Branicky, Mar 06 2021

Formula

Equals A263619(2n)-1.

Extensions

a(7)-a(10) from Chai Wah Wu, Oct 25 2015
More terms using A263618 from Chai Wah Wu, Jun 14 2024

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

Original entry on oeis.org

4, 3, 8, 5, 11, 6, 19, 14, 25, 18, 49, 31, 71, 46, 105, 71, 154, 101, 209, 132, 292, 182, 384, 236, 497, 302, 636, 383, 799, 475, 981, 578, 1201, 701
Offset: 1

Views

Author

N. J. A. Sloane, Oct 23 2015

Keywords

Comments

Number of terms in A002778 with exactly n digits.

Examples

			a(2) = 3 because there are three 2-digit numbers with palindromic squares: 11^2 = 121, 22^2 = 484, 26^2 = 676.
		

Crossrefs

Programs

  • Mathematica
    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 *)
  • Python
    from itertools import product
    def pal(n): s = str(n); return s == s[::-1]
    def a(n): return int(n==1) + sum(pal(i**2) for i in range(10**(n-1), 10**n))
    print([a(n) for n in range(1, 8)]) # Michael S. Branicky, Apr 03 2021

Extensions

a(9)-a(10) from Chai Wah Wu, Oct 25 2015
a(11) from Michael S. Branicky, Apr 03 2021
a(12)-a(22) (using A002778) from Chai Wah Wu, Sep 16 2021
a(23)-a(34) from A002778 added by Max Alekseyev, Apr 08 2025
Showing 1-4 of 4 results.