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 73 results. Next

A175440 Terms in A177950 that are not in A002778.

Original entry on oeis.org

9, 33, 48, 66, 87, 99, 117, 216, 273, 288, 297, 333, 484, 513, 528, 666, 783, 819, 999, 1323, 1331, 1452, 1474, 1602, 2178, 2622, 3333, 4884, 4961, 6666, 7161, 7575, 9999, 10989, 11979, 12969, 14652, 14733, 15972, 20402, 21021, 21534, 21648, 23331
Offset: 1

Views

Author

Zak Seidov, May 16 2010

Keywords

Comments

Terms n in A177950 such that n^2 is palindrome are also in A002778.
This sequence consists of numbers (more interesting?) that are in A177950 but not in A002778.
Notice that most terms are multiples of 3, while some are not: 484, 1331, 1474, 4961, 20402, 48884, 122221, 188887, 217822, 467126, 477773, 484484, 506506, 525503, 718189, 808808, 1461262, 1729408, 2004002, 2317315, 2920819, 4840484.

Crossrefs

Cf. A002778 Numbers whose square is a palindrome, A177950 Numbers n dividing n^2 with digits reversed.

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)

A003166 Numbers whose square in base 2 is a palindrome.

Original entry on oeis.org

0, 1, 3, 4523, 11991, 18197, 141683, 1092489, 3168099, 6435309, 12489657, 17906499, 68301841, 295742437, 390117873, 542959199, 4770504939, 17360493407, 73798050723, 101657343993, 107137400475, 202491428745, 1615452642807, 4902182461643, 9274278357017, 12863364360297
Offset: 1

Views

Author

Keywords

Comments

Numbers k such that k^2 is in A006995.
The only palindromes in this sequence are 0, 1, and 3. See AMM problem 11922. - Max Alekseyev, Oct 22 2022

Examples

			3^2 = 9 = 1001_2, a palindrome.
4523^2 = 20457529 = 1001110000010100000111001_2.
		

References

  • G. J. Simmons, On palindromic squares of non-palindromic numbers, J. Rec. Math., 5 (No. 1, 1972), 11-19.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A002778 (base 10 analog), A029983 (the actual squares). In binary: A262595, A262596.
Cf. A006995.

Programs

  • Mathematica
    Do[c = RealDigits[n^2, 2][[1]]; If[c == Reverse[c], Print[n]], {n, 0, 10^9}]
  • PARI
    is(n)=my(b=binary(n^2)); b==Vecrev(b) \\ Charles R Greathouse IV, Feb 07 2017
    
  • Python
    from itertools import count, islice
    def A003166_gen(): # generator of terms
        return filter(lambda k: (s:=bin(k**2)[2:])[:(t:=(len(s)+1)//2)]==s[:-t-1:-1],count(0))
    A003166_list = list(islice(A003166_gen(),10)) # Chai Wah Wu, Jun 23 2022

Extensions

a(16) = 4770504939 found by Patrick De Geest, May 15 1999
a(17)-a(31) from Jon E. Schoenfield, May 08 2009
a(32) = 285000288617375,
a(33) = 301429589329949,
a(34) = 1178448744881657 from Don Knuth, Jan 28 2013 [who doublechecked the previous results and searched up to 2^104]

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

A029983 Squares which are palindromes in base 2.

Original entry on oeis.org

0, 1, 9, 20457529, 143784081, 331130809, 20074072489, 1193532215121, 10036851273801, 41413201925481, 155991531977649, 320642706437001, 4665141483989281, 87463589042698969, 152191954834044129
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A003166.

Programs

  • Python
    from itertools import count, islice
    def A029983_gen(): # generator of terms
        return filter(lambda k: (s:=bin(k)[2:])[:(t:=(len(s)+1)//2)]==s[:-t-1:-1],(k**2 for k in count(0)))
    A029983_list = list(islice(A029983_gen(),10)) # Chai Wah Wu, Jun 23 2022

A029989 Squares which are palindromes in base 5.

Original entry on oeis.org

0, 1, 4, 36, 676, 961, 4356, 15876, 24336, 391876, 423801, 571536, 646416, 9771876, 10732176, 14107536, 81974916, 244171876, 248094001, 264908176, 339812356, 351787536, 1061326084, 1167042244, 2181263616, 6103671876
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    pal5Q[n_]:=Module[{idn5=IntegerDigits[n,5]},idn5==Reverse[idn5]]; Select[ Range[0,80000]^2,pal5Q] (* Harvey P. Dale, May 05 2012 *)

A029985 Squares which are palindromes in base 3.

Original entry on oeis.org

0, 1, 4, 16, 100, 121, 400, 484, 784, 1156, 3136, 6724, 7921, 12769, 23716, 26896, 59536, 68644, 238144, 274576, 532900, 570025, 643204, 743044, 1042441, 1800964, 1844164, 2131600, 4787344, 5026564, 7203856, 7376656, 9278116
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    b3pQ[n_]:=Module[{idn3=IntegerDigits[n,3]},idn3==Reverse[idn3]]; Select[ Range[0,3200]^2,b3pQ] (* Harvey P. Dale, Aug 07 2011 *)

A029986 Numbers k such that k^2 is palindromic in base 4.

Original entry on oeis.org

0, 1, 5, 17, 21, 65, 71, 83, 257, 273, 281, 317, 1025, 1055, 4097, 4161, 4193, 4401, 5157, 5179, 5221, 16385, 16511, 16865, 17239, 65537, 65793, 65921, 66753, 68695, 69521, 69777, 80739, 82053, 82171, 82309, 82885, 83301, 262145
Offset: 1

Views

Author

Keywords

Crossrefs

Numbers k such that k^2 is palindromic in base b: A003166 (b=2), A029984 (b=3), this sequence (b=4), A029988 (b=5), A029990 (b=6), A029992 (b=7), A029805 (b=8), A029994 (b=9), A002778 (b=10), A029996 (b=11), A029737 (b=12), A029998 (b=13), A030072 (b=14), A030073 (b=15), A029733 (b=16), A118651 (b=17).

Programs

  • Mathematica
    Select[Range[0,300000],IntegerDigits[#^2,4]==Reverse[ IntegerDigits[ #^2,4]]&] (* Harvey P. Dale, Dec 01 2015 *)
  • PARI
    isok(k) = my(d=digits(k^2,4)); d == Vecrev(d); \\ Michel Marcus, Jul 04 2021

A029988 Numbers k such that k^2 is palindromic in base 5.

Original entry on oeis.org

0, 1, 2, 6, 26, 31, 66, 126, 156, 626, 651, 756, 804, 3126, 3276, 3756, 9054, 15626, 15751, 16276, 18434, 18756, 32578, 34162, 46704, 78126, 78876, 81276, 93756, 390626, 391251, 393876, 406276, 468756, 487981, 1166454, 1953126, 1956876
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    pal5Q[n_]:=Module[{idn5=IntegerDigits[n^2,5]},idn5==Reverse[idn5]]; Select[ Range[ 0,2*10^6],pal5Q] (* Harvey P. Dale, Feb 02 2023 *)

A050250 Number of nonzero palindromes less than 10^n.

Original entry on oeis.org

9, 18, 108, 198, 1098, 1998, 10998, 19998, 109998, 199998, 1099998, 1999998, 10999998, 19999998, 109999998, 199999998, 1099999998, 1999999998, 10999999998, 19999999998, 109999999998, 199999999998, 1099999999998, 1999999999998, 10999999999998
Offset: 1

Views

Author

Eric W. Weisstein, Dec 11 1999

Keywords

Crossrefs

Programs

  • Maple
    A050250List := proc(len);  local s, egf, ser; s:= 11/(2*sqrt(10));
    egf := -2*exp(x) + (1-s)*exp(-sqrt(10)*x) + (1+s)*exp(sqrt(10)*x);
    ser := series(egf, x, len+2): seq(simplify(n!*coeff(ser,x,n)), n = 1..len) end:
    A050250List(25); # Peter Luschny, Jun 11 2022 after Stefano Spezia
  • Mathematica
    LinearRecurrence[{1,10,-10},{9,18,108},30] (* Harvey P. Dale, Jan 29 2012 *)
    CoefficientList[Series[2Cosh[Sqrt[10]x]-2(Cosh[x]+Sinh[x])+11Sinh[Sqrt[10]x]/Sqrt[10],{x,0,25}],x]Table[n!,{n,0,25}] (* Stefano Spezia, Jun 11 2022 *)
  • PARI
    a(n)=10^(n\2)*(13-9*(-1)^n)/2-2 \\ Charles R Greathouse IV, Jun 25 2017
    
  • Python
    def a(n):
      m = 10 ** (n >> 1)
      if n & 1 == 0:
        return (m - 1) << 1
      else:
        return (11 * m) - 2 # Darío Clavijo, Oct 16 2023

Formula

a(2*k) = 2*10^k - 2, a(2*k + 1) = 11*10^k - 2. - Sascha Kurz, Apr 14 2002
From Jonathan Vos Post, Jun 18 2008: (Start)
a(n) = Sum_{i=1..n} A050683(i).
a(n) = Sum_{i=1..n} 9*10^floor((i-1)/2).
a(n) = 9*Sum_{i=1..n} 10^floor((i-1)/2). (End)
From Bruno Berselli, Feb 15 2011: (Start)
G.f.: 9*x*(1+x)/((1-x)*(1-10*x^2)).
a(n) = (1/2)*10^((2*n + (-1)^n - 1)/4)*(13 - 9*(-1)^n) - 2. (End)
a(1)=9, a(2)=18, a(3)=108; for n>3, a(n) = a(n-1) + 10*a(n-2) - 10*a(n-3). - Harvey P. Dale, Jan 29 2012
a(n) = 10*a(n-2) + 18. - R. J. Mathar, Nov 07 2015
E.g.f.: 2*cosh(sqrt(10)*x) - 2*(cosh(x) + sinh(x)) + 11*sinh(sqrt(10)*x)/sqrt(10). - Stefano Spezia, Jun 11 2022

Extensions

More terms from Patrick De Geest, Dec 15 1999
a(24)-a(25) from Jonathan Vos Post, Jun 18 2008
Showing 1-10 of 73 results. Next