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 10 results.

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)

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

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 *)

A030074 Squares which are palindromes in base 14.

Original entry on oeis.org

0, 1, 4, 9, 225, 576, 900, 2209, 27225, 38809, 44521, 50625, 57121, 155236, 166464, 178084, 4796100, 5978025, 7535025, 8732025, 10017225, 30140100, 32490000, 73359225, 1475865889, 1490963769, 1506138481, 1521390025
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

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

A030075 Squares which are palindromes in base 15.

Original entry on oeis.org

0, 1, 4, 9, 16, 64, 144, 256, 361, 1024, 1521, 4096, 5776, 16384, 20736, 51076, 58081, 65536, 73441, 96721, 204304, 218089, 228484, 232324, 331776, 511225, 817216, 929296, 1048576, 3055504, 3268864, 3489424, 5308416, 7033104
Offset: 1

Views

Author

Keywords

Examples

			8^2 = 64, which in base 15 is 44, and that's palindromic, so 64 is in the sequence.
9^2 = 81, which in base 15 is 56. Since that's not palindromic, 81 is not in the sequence.
		

Crossrefs

Programs

  • Maple
    N:= 10^10: # to get all entries <= N
    count:= 0:
    for x from 0 to floor(sqrt(N)) do
        y:= x^2;
        L:= convert(y,base,15);
      if ListTools[Reverse](L) = L then
         count:= count+1;
         A[count]:= y;
       fi
    od:
    seq(A[i],i=1..count); # Robert Israel, Jul 24 2014
  • Mathematica
    palQ[n_, b_:10] := Module[{idn = IntegerDigits[n, b]}, idn == Reverse[idn]]; Select[Range[0, 2700]^2, palQ[#, 15] &]  (* Harvey P. Dale, Apr 23 2011 *)
  • PARI
    isok(n) = my(d=digits(n,15)); issquare(n) && (d == Vecrev(d)); \\ Michel Marcus, Oct 21 2016
Showing 1-10 of 10 results.