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-2 of 2 results.

A307717 Number of palindromic squares, k^2, of length n such that k is also palindromic.

Original entry on oeis.org

4, 0, 2, 0, 5, 0, 3, 0, 8, 0, 5, 0, 13, 0, 9, 0, 22, 0, 16, 0, 37, 0, 27, 0, 60, 0, 43, 0, 93, 0, 65, 0, 138, 0, 94, 0, 197, 0, 131, 0, 272, 0, 177, 0, 365, 0, 233, 0, 478, 0, 300, 0, 613, 0, 379, 0, 772, 0, 471, 0, 957, 0, 577, 0, 1170, 0, 698, 0, 1413, 0
Offset: 1

Views

Author

Robert Price, Apr 23 2019

Keywords

Examples

			There are only two palindromic squares of length 3 whose root is also palindromic. 11^2=121 and 22^2=484. Thus, a(3)=2.
		

Crossrefs

Programs

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

Formula

From Christoph Koutschan, Feb 19 2022: (Start)
a(2n-1) = A218035(n).
a(n) is given by a quasi-polynomial (for a proof, see A218035):
a(1) = 4;
a(2n) = 0;
a(4n+1) = (n^3-3*n^2+11*n+6)/3 (n > 0);
a(4n+3) = (n^3+5*n+12)/6 (n >= 0). (End)

Extensions

a(16)-a(20) from Robert Price, Apr 25 2019
a(21)-a(70) from Giovanni Resta, Apr 28 2019

A343098 Number of palindromes < 10^n whose squares are also palindromes.

Original entry on oeis.org

1, 4, 6, 11, 14, 22, 27, 40, 49, 71, 87, 124, 151, 211, 254, 347, 412, 550, 644, 841, 972, 1244, 1421, 1786, 2019, 2497, 2797, 3410, 3789, 4561, 5032, 5989, 6566, 7736, 8434, 9847, 10682, 12370, 13359, 15356, 16517, 18859, 20211, 22936, 24499, 27647, 29442, 33055
Offset: 0

Views

Author

Chai Wah Wu, Apr 04 2021

Keywords

Comments

Partial sum of A218035. Number of terms in A057135 < 10^n.

Examples

			a(2) = 6 since the only palindromes < 100 whose square are palindromes are 0,1,2,3,11,22.
		

Crossrefs

Programs

Formula

a(n) = #{i:A057135(i)<10^n}.
For n > 0, a(n) = Sum_{i=1..n} A218035(i).
a(n) = a(n-1) + 4*a(n-2) - 4*a(n-3) - 6*a(n-4) + 6*a(n-5) + 4*a(n-6) - 4*a(n-7) - a(n-8) + a(n-9) for n > 9.
G.f.: (-x^9 + x^7 - x^6 - 6*x^5 - x^4 + 7*x^3 + 2*x^2 - 3*x - 1)/((x - 1)^5*(x + 1)^4).
a(n) = 1491 + 904*n + 510*n^2 - 52*n^3 + 6*n^4 + (-1)^n * (45 - 296*n + 42*n^2 - 4*n^3) for n>0. - Greg Dresden, Jun 20 2021
Showing 1-2 of 2 results.