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-10 of 14 results. Next

A002779 Palindromic squares.

Original entry on oeis.org

0, 1, 4, 9, 121, 484, 676, 10201, 12321, 14641, 40804, 44944, 69696, 94249, 698896, 1002001, 1234321, 4008004, 5221225, 6948496, 100020001, 102030201, 104060401, 121242121, 123454321, 125686521, 400080004, 404090404, 522808225
Offset: 1

Views

Author

Keywords

Comments

These are numbers that are both squares (see A000290) and palindromes (see A002113).

Examples

			676 is included because it is both a perfect square and a palindrome.
		

References

  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Haskell
    a002779 n = a002778_list !! (n-1)
    a002779_list = filter ((== 1) . a136522) a000290_list
    -- Reinhard Zumkeller, Oct 11 2011
    
  • Magma
    [k^2:k in [0..100000]| Intseq(k^2) eq Reverse(Intseq(k^2)) ]; // Marius A. Burtea, Oct 15 2019
    
  • Mathematica
    palindromicNumberQ = ((# // IntegerDigits // Reverse // FromDigits) == #) &; Select[Table[n^2, {n, 0, 9999}],  palindromicNumberQ] (* Herman Beeksma, Jul 14 2005 *)
    pb10Q[n_] := Module[{idn10 = IntegerDigits[n, 10]}, idn10 == Reverse[idn10]]; Select[Range[0, 19999]^2, pb10Q] (* Vincenzo Librandi, Jul 24 2014 *)
    Select[Range[0, 22999]^2, PalindromeQ] (* Requires Mathematica version 10 or later. - Harvey P. Dale, May 01 2017 *)
  • PARI
    is(n)=my(d=digits(n)); d==Vecrev(d) && issquare(n) \\ Charles R Greathouse IV, Feb 06 2017
    
  • Python
    A002779_list = [int(s) for s in (str(m**2) for m in range(10**5)) if s == s[::-1]] # Chai Wah Wu, Aug 26 2021
  • Scala
    def isPalindromic(n: BigInt): Boolean = n.toString == n.toString.reverse
      val squares = ((1: BigInt) to (1000000: BigInt)).map(n => n * n)
      squares.filter(isPalindromic()) // _Alonso del Arte, Oct 07 2019
    

Formula

From Reinhard Zumkeller, Oct 11 2011: (Start)
a(n) = A002778(n)^2.
A136522(A000290(a(n))) = 1.
A010052(a(n)) * A136522(a(n)) = 1. (End)

A029984 Numbers k such that k^2 is palindromic in base 3.

Original entry on oeis.org

0, 1, 2, 4, 10, 11, 20, 22, 28, 34, 56, 82, 89, 113, 154, 164, 244, 262, 488, 524, 730, 755, 802, 862, 1021, 1342, 1358, 1460, 2188, 2242, 2684, 2716, 3046, 4276, 4376, 4484, 6562, 6641, 6778, 8030, 8215, 8350, 8887, 12482, 13124, 14810, 19684
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    pal3Q[n_]:=Module[{idn3=IntegerDigits[n^2,3]},idn3==Reverse[idn3]]; Select[Range[0,20000],pal3Q]  (* Harvey P. Dale, May 22 2012 *)

A029734 Palindromic squares in base 16.

Original entry on oeis.org

0, 1, 4, 9, 289, 1156, 66049, 74529, 83521, 93025, 101761, 264196, 280900, 298116, 597529, 1896129, 16785409, 19088161, 21538881, 67141636, 68128516, 71673156, 76282756, 81830116, 2665553641, 4295098369, 4328718849
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    pb16Q[n_]:=Module[{idn16=IntegerDigits[n,16]}, idn16==Reverse[idn16]]; Select[Range[0, 200000]^2, pb16Q] (* Vincenzo Librandi, Jul 24 2014 *)

A029738 Palindromic squares in base 12.

Original entry on oeis.org

0, 1, 4, 9, 169, 676, 21025, 24649, 28561, 32041, 32761, 84100, 85264, 91204, 373321, 2989441, 3045025, 3179089, 3553225, 4165681, 11957764, 13060996, 14409616, 430023169, 436016161, 442050625, 448126561, 505215529
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    pb12Q[n_]:=Module[{idn12=IntegerDigits[n, 12]}, idn12==Reverse[idn12]]; Select[Range[0, 20000]^2, pb12Q] (* Vincenzo Librandi, Jul 24 2014 *)

A029806 n in base 8 is a palindromic square.

Original entry on oeis.org

0, 1, 4, 9, 36, 81, 121, 729, 4225, 5329, 6241, 6561, 6889, 38025, 47961, 56169, 133956, 263169, 294849, 342225, 485809, 1196836, 2368521, 3080025, 3515625, 8468100, 16785409, 17313921, 17850625, 20043529, 21316689, 21911761
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    pb8Q[n_]:=Module[{idn8=IntegerDigits[n, 8]}, idn8==Reverse[idn8]]; Select[Range[0, 20000]^2, pb8Q] (* Vincenzo Librandi, Jul 24 2014 *)

A029991 Squares which are palindromes in base 6.

Original entry on oeis.org

0, 1, 4, 49, 1369, 1849, 5776, 8281, 47089, 67081, 1132096, 1682209, 1776889, 2307361, 2418025, 7311616, 11336689, 60481729, 64464841, 82428241, 389944009, 2176875649, 2197078129, 2302944121, 2323722025, 2963604721
Offset: 1

Views

Author

Keywords

Crossrefs

Squares which are palindromes in base b: A029983 (b=2), A029985 (b=3), A029987 (b=4), A029989 (b=5), this sequence (b=6), A029993 (b=7), A029806 (b=8), A029995 (b=9), A002779 (b=10), A029997 (b=11), A029738 (b=12), A029999 (b=13), A030074 (b=14), A030075 (b=15), A029734 (b=16).
Cf. A029990.

Formula

a(n) = A029990(n)^2. - Seiichi Manyama, Oct 16 2021

A029993 Squares which are palindromes in base 7.

Original entry on oeis.org

0, 1, 4, 16, 64, 100, 121, 400, 1024, 1600, 2500, 3249, 4096, 6400, 25600, 40000, 118336, 160000, 250000, 302500, 310249, 532900, 1000000, 1893376, 2050624, 3579664, 5769604, 6007401, 6250000, 7573504, 7845601, 11833600
Offset: 1

Views

Author

Keywords

Crossrefs

Squares which are palindromes in base b: A029983 (b=2), A029985 (b=3), A029987 (b=4), A029989 (b=5), A029991 (b=6), this sequence (b=7), A029806 (b=8), A029995 (b=9), A002779 (b=10), A029997 (b=11), A029738 (b=12), A029999 (b=13), A030074 (b=14), A030075 (b=15), A029734 (b=16).
Cf. A029992.

Programs

  • Mathematica
    pal7Q[n_]:=Module[{idn7=IntegerDigits[n,7]},idn7==Reverse[idn7]]; Select[Range[0,3500]^2,pal7Q] (* Harvey P. Dale, Dec 15 2011 *)

Formula

a(n) = A029992(n)^2. - Seiichi Manyama, Oct 16 2021

A029995 Squares which are palindromes in base 9.

Original entry on oeis.org

0, 1, 4, 100, 400, 6724, 8281, 10000, 26896, 532900, 672400, 2131600, 43059844, 44129449, 45212176, 53290000, 54479161, 55681444, 172239376, 186104164, 186595600, 203946961, 2921402500, 3486902500, 3583219600
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    pal9Q[n_]:=Module[{idn9=IntegerDigits[n,9]},idn9==Reverse[idn9]]; Select[ Range[0,60000]^2,pal9Q] (* Harvey P. Dale, Nov 12 2011 *)

A029997 Squares which are palindromes in base 11.

Original entry on oeis.org

0, 1, 4, 9, 36, 144, 576, 676, 5184, 7056, 14884, 17689, 20736, 59536, 65025, 77841, 145924, 535824, 1774224, 2143296, 2547216, 5827396, 7096896, 7817616, 9375844, 20034576, 63872064, 214388164, 217946169, 221533456, 255488256, 259371025
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    pb11Q[n_]:=Module[{idn11=IntegerDigits[n,11]},idn11==Reverse[idn11]]; Select[Range[0,17000]^2,pb11Q] (* Harvey P. Dale, Jul 23 2014 *)
  • Python
    from gmpy2 import digits
    A029997_list = [n for n in (x**2 for x in range(10**7)) if digits(n,11) == digits(n,11)[::-1]]
    # Chai Wah Wu, Dec 01 2014

A029999 Squares which are palindromes in base 13.

Original entry on oeis.org

0, 1, 4, 9, 196, 784, 28900, 33489, 38416, 43681, 94864, 115600, 124609, 133956, 4831204, 5664400, 6563844, 8398404, 16208676, 17994564, 19324816, 20958084, 50098084, 58706244, 815787844, 825470361, 835210000, 845006761, 946915984
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    pb13Q[n_]:=Module[{idn13=IntegerDigits[n, 13]}, idn13==Reverse[idn13]]; Select[Range[0, 20000]^2, pb13Q] (* Vincenzo Librandi, Jul 24 2014 *)
Showing 1-10 of 14 results. Next