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 11-20 of 41 results. Next

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

A057135 Palindromes whose square is a palindrome; also palindromes whose sum of squares of digits is less than 10.

Original entry on oeis.org

0, 1, 2, 3, 11, 22, 101, 111, 121, 202, 212, 1001, 1111, 2002, 10001, 10101, 10201, 11011, 11111, 11211, 20002, 20102, 100001, 101101, 110011, 111111, 200002, 1000001, 1001001, 1002001, 1010101, 1011101, 1012101, 1100011, 1101011, 1102011, 1110111, 1111111
Offset: 1

Views

Author

Henry Bottomley, Aug 12 2000

Keywords

Examples

			121 is OK since 121^2=14641 is also a palindrome.
		

Crossrefs

Programs

  • Maple
    dmax:= 7: # to get all terms with up to dmax digits
    Res:= 0,1,2,3,11,22:
    Po:= [[0],[1],[2],[3]]: Pe:= [[0,0],[1,1],[2,2]]:
    for d from 1 to dmax do
      if d::odd then
        Po:= select(t -> add(s^2,s=t) < 10, [seq(seq([i,op(t),i], t=Po),i=0..2)]);
        Res:= Res, op(map(proc(p) if p[1] <> 0 then add(p[i]*10^(i-1),i=1..nops(p)) fi end proc, Po))
      else
        Pe:= select(t -> add(s^2,s=t) < 10, [seq(seq([i,op(t),i], t=Pe),i=0..2)]);
        Res:= Res, op(map(proc(p) if p[1] <> 0 then add(p[i]*10^(i-1),i=1..nops(p)) fi end proc, Pe))
      fi;
    od:
    Res; # Robert Israel, Jun 21 2017
  • Mathematica
    PalQ[n_] := FromDigits[Reverse[IntegerDigits[n]]] == n; t = {}; Do[
    If[PalQ[n] && PalQ[n^2], AppendTo[t, n]], {n, 0, 1200000}]; t (* Jayanta Basu, May 10 2013 *)
    Select[Range[0,12*10^5],AllTrue[{#,#^2},PalindromeQ]&](* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Feb 20 2018 *)
  • PARI
    is(n) = digits(n)==Vecrev(digits(n)) && digits(n^2)==Vecrev(digits(n^2)) \\ Felix Fröhlich, Jun 21 2017

Formula

a(n) = sqrt(A057136(n))

Extensions

1001001 inserted by R. J. Mathar, Nov 04 2012

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

A057136 Palindromes whose square root is a palindrome.

Original entry on oeis.org

0, 1, 4, 9, 121, 484, 10201, 12321, 14641, 40804, 44944, 1002001, 1234321, 4008004, 100020001, 102030201, 104060401, 121242121, 123454321, 125686521, 400080004, 404090404, 10000200001, 10221412201, 12102420121, 12345654321, 40000800004
Offset: 1

Views

Author

Henry Bottomley, Aug 12 2000

Keywords

Comments

Always contain an odd number of digits.

Examples

			a(8) = 14641 since 14641 = 121^2 and 121 is also a palindrome
		

Crossrefs

Cf. A000290, A002113, A002779, A057135 (the square roots).

Programs

  • Maple
    dmax:= 7: # to get all terms with up to dmax digits
    Res:= 0,1,2^2,3^2,11^2,22^2:
    Po:= [[0],[1],[2],[3]]: Pe:= [[0,0],[1,1],[2,2]]:
    for d from 1 to dmax do
      if d::odd then
        Po:= select(t -> add(s^2,s=t) < 10, [seq(seq([i,op(t),i], t=Po),i=0..2)]);
        Res:= Res, op(map(proc(p) if p[1] <> 0 then add(p[i]*10^(i-1),i=1..nops(p))^2 fi end proc, Po))
      else
        Pe:= select(t -> add(s^2,s=t) < 10, [seq(seq([i,op(t),i], t=Pe),i=0..2)]);
        Res:= Res, op(map(proc(p) if p[1] <> 0 then add(p[i]*10^(i-1),i=1..nops(p))^2 fi end proc, Pe))
      fi;
    od:
    Res; # Robert Israel, Jun 21 2017
  • Mathematica
    Select[Range[0, 10^6], PalindromeQ[#] && PalindromeQ[#^2] &]^2 (* Robert Price, Apr 26 2019 *)

Formula

a(n) = A057135(n)^2

A319388 Non-palindromic squares.

Original entry on oeis.org

16, 25, 36, 49, 64, 81, 100, 144, 169, 196, 225, 256, 289, 324, 361, 400, 441, 529, 576, 625, 729, 784, 841, 900, 961, 1024, 1089, 1156, 1225, 1296, 1369, 1444, 1521, 1600, 1681, 1764, 1849, 1936, 2025, 2116, 2209, 2304, 2401, 2500, 2601, 2704, 2809, 2916, 3025
Offset: 1

Views

Author

Seiichi Manyama, Sep 18 2018

Keywords

Comments

Intersection of A000290 and A029742. - Felix Fröhlich, Sep 18 2018

Crossrefs

Programs

  • Magma
    [n^2: n in [0..60] | not Intseq(n^2) eq Reverse(Intseq(n^2))]; // Vincenzo Librandi, Sep 19 2018
  • Maple
    ispali:= proc(n) local L;
    L:= convert(n,base,10);
    L = ListTools:-Reverse(L)
    end proc:
    remove(ispali, [seq(i^2,i=1..100)]); # Robert Israel, Sep 18 2018
  • Mathematica
     pb10Q[n_]:=!Module[{idn10=IntegerDigits[n, 10]}, idn10==Reverse[idn10]]; Select[Range[0, 3100]^2, pb10Q] (* Vincenzo Librandi, Sep 19 2018 *)
  • PARI
    terms(n) = my(i=0); for(k=0, oo, if(i==n, break); my(s=k^2, d=digits(s)); if(d!=Vecrev(d), print1(s, ", "); i++))
    /* Print initial 50 terms as follows */
    terms(50) \\ Felix Fröhlich, Sep 18 2018
    

A007573 a(n) is the number of base numbers with 2n+1 digits in the asymmetric families of palindromic squares.

Original entry on oeis.org

1, 2, 5, 6, 9, 10, 10, 15, 15, 16, 18, 24, 18, 26, 24, 30, 27, 33, 28, 40, 33, 40, 35, 48, 37, 50, 42, 53, 45, 58, 46, 64, 50, 64, 54, 72, 55, 73, 60, 78, 63, 82, 63, 88, 69, 88, 72, 95, 73, 98, 78, 102, 80, 106, 82, 112, 87, 111, 90, 120, 91, 122, 95, 126, 99, 130, 100, 135
Offset: 3

Views

Author

Keywords

Examples

			a(3) = 1: The only base number of length 2*3 + 1 = 7 is 1109111 = A060087(1);
a(4) = 2 indicates the existence of two length 2*4 + 1 = 9 base numbers, 110091011 = A060087(2) and 111091111 = A060087(3).
		

References

  • M. Keith, Classification and enumeration of palindromic squares, J. Rec. Math., 22 (No. 2, 1990), 124-132.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • PARI
    \\ see P. De Geest link.

Extensions

a(17)-a(31) from Sean A. Irvine, Jan 10 2018
Name and offset corrected by Hugo Pfoertner, Oct 04 2023
a(32)-a(70) from Hugo Pfoertner, Oct 07 2023

A027720 Palindromes of form k^2 + 1.

Original entry on oeis.org

1, 2, 5, 101, 626, 10001, 1000001, 1040401, 2217122, 5053505, 100000001, 101808101, 10000000001, 10182828101, 10408080401, 28053235082, 1000000000001, 1000400040001, 1018262628101, 7534662664357, 100000000000001, 100018000810001, 101826464628101
Offset: 1

Views

Author

Keywords

Comments

10^(2*m) + 1 for m >= 0 are terms. - Chai Wah Wu, May 25 2017

Crossrefs

Programs

  • Mathematica
    palQ[n_] := Block[{d = IntegerDigits[n]}, d == Reverse[d]]; Select[Range[0, 10^5]^2 + 1, palQ] (* Giovanni Resta, Aug 29 2018 *)

Formula

a(n) = A027719(n)^2 + 1. - Giovanni Resta, Aug 29 2018

Extensions

More terms from Giovanni Resta, Aug 28 2018
Previous Showing 11-20 of 41 results. Next