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.

Previous Showing 31-40 of 41 results. Next

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

A065379 Palindromic squares with a prime root.

Original entry on oeis.org

4, 9, 121, 10201, 94249, 900075181570009, 12124434743442121, 12323244744232321, 12341234943214321, 1022321210249420121232201, 1210024420147410244200121, 1210222232227222322220121
Offset: 1

Views

Author

Patrick De Geest, Nov 03 2001

Keywords

Comments

Record sporadic palindromic square with a prime root is 186627875420278656872024578726681.

Examples

			a(6) = 900075181570009 = p^2 with p = 30001253, a prime.
		

Crossrefs

A131760 Numbers n such that n multiplied by its reverse yields a fourth power.

Original entry on oeis.org

1, 4, 9, 121, 484, 676, 2178, 8712, 10000, 10201, 12321, 14641, 40000, 40804, 44944, 69696, 90000, 94249, 698896, 1002001, 1210000, 1234321, 4008004, 4840000, 5221225, 6760000, 6948496, 21780000, 87120000, 100000000, 100020001
Offset: 1

Views

Author

Tanya Khovanova, Sep 17 2007

Keywords

Comments

This sequence contains palindromic squares and palindromic squares with trailing zeros. Are 2178 and 8721 the only non-palindromic reversible pair in this sequence without trailing zeros?

Examples

			2178 = 2*9*121 and 8712 = 8*9*121, 2718*8712 = (2*3*11)^4.
		

Crossrefs

Cf. A002779 = Palindromic squares.

Programs

  • Mathematica
    Select[Range[1000000], IntegerQ[(#*FromDigits[Reverse[IntegerDigits[ # ]]])^(1/4)] &]

Extensions

a(20)-a(31) from Donovan Johnson, Oct 27 2008

A176923 Squares of A057148 taken as decimal numbers.

Original entry on oeis.org

0, 1, 121, 10201, 12321, 1002001, 1234321, 100020001, 102030201, 121242121, 123454321, 10000200001, 10221412201, 12102420121, 12345654321, 1000002000001, 1002003002001, 1020304030201, 1022325232201, 1210024200121, 1212225222121, 1232346432321, 1234567654321, 100000020000001, 100220141022001
Offset: 1

Views

Author

Jeremy Gardiner, Apr 29 2010

Keywords

Comments

See comment in A057148.

Crossrefs

Programs

  • Python
    def A176923(n):
        if n == 1: return 0
        a = 1<Chai Wah Wu, Jun 10 2024

A225739 Palindromic squares whose sum of digits is also a palindromic square.

Original entry on oeis.org

1, 4, 9, 121, 10201, 12321, 1002001, 100020001, 102030201, 10000200001, 1000002000001, 1002003002001, 100000020000001, 10000000200000001, 10002000300020001, 1000000002000000001, 100000000020000000001, 100002000030000200001
Offset: 1

Views

Author

Jayanta Basu, May 14 2013

Keywords

Comments

Are there finitely many terms not of the form (10^n+1)^2 or (100^n+10^n+1)^2? I haven't found any. - Charles R Greathouse IV, May 14 2013

Examples

			12321 is included because it is a palindromic square and 1+2+3+2+1=9 is also a palindromic square.
5265533355625 is not included because although it is a palindromic square its sum of digits, 55, is not.
		

Crossrefs

Subsequence of A002779.

Programs

  • Mathematica
    id[n_]:=IntegerDigits[n]; palQ[n_]:=Reverse[id[n]]==id[n]; t={}; Do[If[palQ[x=n^2] && palQ[y=Total[id[x]]] && IntegerQ[Sqrt[y]], AppendTo[t,x]],{n,1.2*10^6}]; t
  • PARI
    ispal(n)=my(v=digits(n));for(i=1,#v\2,if(v[i]!=v[#v+1-i],return(0)));1
    for(n=1,1e6,s=sumdigits(n^2); issquare(s) && ispal(s) && ispal(n^2) && print1(n^2", ")) \\ Charles R Greathouse IV, May 14 2013

Formula

a(n) < 32^n. - Charles R Greathouse IV, May 14 2013

Extensions

a(13)-a(18) from Charles R Greathouse IV, May 14 2013

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

A358237 Palindromes of the form k^2 + 2.

Original entry on oeis.org

2, 3, 6, 11, 66, 171, 363, 7227, 66566, 154451, 685586, 3279723, 6441446, 8503058, 8916198, 13155131, 20611602, 110313011, 19833933891, 72288388227, 89064046098, 179298892971, 814860068418, 1103556553011, 3406132316043, 6205240425026, 30403655630403, 206380232083602, 666150525051666
Offset: 1

Views

Author

Robert Xiao, Nov 04 2022

Keywords

Crossrefs

Programs

  • Mathematica
    Select[Range[0,26*10^6]^2+2,PalindromeQ] (* Harvey P. Dale, Sep 01 2024 *)

A370512 Largest palindromic square which is a concatenation of partitions of n; or 0 if no such number exists.

Original entry on oeis.org

1, 0, 0, 121, 0, 0, 0, 0, 12321, 0, 0, 0, 121, 0, 0, 121242121, 0, 12321, 5221225, 0, 0, 121, 0, 0, 1212225222121, 0, 12321, 5221225, 0, 0, 10201, 0, 0, 1212225222121, 0, 12122232623222121
Offset: 1

Views

Author

Chai Wah Wu, Feb 20 2024

Keywords

Examples

			Note that a(4) = a(13) = a(22) = 121 as the digits of 121 can be partitioned as 1+2+1 or 12+1 or 1+21.
		

Crossrefs

Programs

  • Python
    from collections import Counter
    from operator import itemgetter
    from sympy.ntheory.primetest import is_square
    from sympy.utilities.iterables import partitions, multiset_permutations
    def A370512(n):
        smax, m = 0, 0
        for s, p in sorted(partitions(n,size=True),key=itemgetter(0),reverse=True):
            if s0:
                    smax=s
        return m

Formula

a(n) <= A079842(n).
If n is a palindromic square, then a(n) >= n.

A087369 Smallest palindromic square multiple of the n-th palindrome.

Original entry on oeis.org

1, 4, 9, 4, 5221225, 69696, 1002001, 44944, 9, 121, 484, 69696, 484, 522666037791100950480675576084059001197730666225, 69696, 1002001, 69696, 69696, 10201, 12321, 121, 12100022220012621002222000121, 12122010222622201022121, 123230205292502032321, 102012022050220210201, 94206450305460249, 1000220232126212320220001, 12104402820440121, 40804, 44944
Offset: 1

Views

Author

Amarnath Murthy, Sep 08 2003

Keywords

Examples

			a(5) = 5221225 = 2285^2.
		

Crossrefs

Subset of A002779.
Cf. A002778.

Extensions

a(7)-a(13) from Sean A. Irvine, Mar 01 2010
Terms a(14) onward from Max Alekseyev, Apr 02 2025

A087988 Palindromic numbers whose squares and cubes are equally palindromic.

Original entry on oeis.org

0, 1, 2, 11, 101, 111, 1001, 10001, 10101, 11011, 100001, 101101, 110011, 1000001, 1001001, 1100011, 10000001, 10011001, 10100101, 11000011, 100000001, 100010001, 100101001, 101000101, 110000011, 1000000001, 1000110001
Offset: 1

Views

Author

Labos Elemer, Oct 01 2003

Keywords

Comments

Numbers n such that n, n^2 and n^3 are all palindromes.
Essentially A002780 with two terms removed, 7 and 2201.

Examples

			11^2=121, 11^3=1331.
		

Crossrefs

Intersection of A002113, A002778 and A002780.

Programs

  • Maple
    rev:=proc(a) local aa,ct: aa:=convert(a,base,10): ct:=nops(aa): add(10^(ct-j)*aa[j],j=1..ct) end: p:=proc(n) if rev(n)=n and rev(n^2)=n^2 and rev(n^3)=n^3 then n else fi end: seq(p(n),n=0..12*10^5); # Emeric Deutsch, May 01 2005
  • PARI
    ispal(n) = my(d = digits(n)); Vecrev(d) == d;
    isok(n) = ispal(n) && ispal(n^2) && ispal(n^3); \\ Michel Marcus, Oct 25 2015

Extensions

More terms from Ray Chandler, Oct 05 2003
Edited by N. J. A. Sloane, Aug 29 2008 at the suggestion of R. J. Mathar
Previous Showing 31-40 of 41 results. Next