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-4 of 4 results.

A059868 There exist no palindromic pentagonal numbers of length a(n).

Original entry on oeis.org

3, 9, 11, 12, 24, 30, 32, 33
Offset: 1

Views

Author

Patrick De Geest, Feb 15 2000

Keywords

Crossrefs

Programs

  • Mathematica
    A002069 = {0, 1, 5, 22, 1001, 2882, 15251, 720027, 7081807, 7451547, 26811862, 54177145, 1050660501, 1085885801, 1528888251, 2911771192, 2376574756732, 5792526252975, 5875432345785, 10810300301801, 264571020175462, 5292834004382925, 10808388588380801, 15017579397571051, 76318361016381367, 150621384483126051, 735960334433069537, 1003806742476083001, 1087959810189597801, 2716280733370826172};
    A059868[n_] := Length[Select[A002069, IntegerLength[#] == n  || (n == 1 && # == 0) &]];
    Select[Range[18], A059868[#] == 0 &] (* Robert Price, Apr 26 2019 *)
  • Python
    def ispal(n): s = str(n); return s == s[::-1]
    def penpals(limit):
      for k in range(limit+1):
        if ispal(k*(3*k-1)//2): yield k*(3*k-1)//2
    def aupto(limit):
      lengths = set(range(1, limit+1))
      for p in penpals(10**limit):
        lp, minlen = len(str(p)), min(lengths)
        for li in list(lengths):
          if li < lp: print(li, "in A059868"); lengths.discard(li)
        if lp in lengths: lengths.discard(lp); print("... discarding", lp)
        if len(lengths) == 0: return
    aupto(15) # Michael S. Branicky, Mar 09 2021

Extensions

Name clarified by David A. Corneth, Apr 26 2019
a(6)-a(8) from Bert Dobbelaere, Apr 15 2025

A002069 Palindromic pentagonal numbers.

Original entry on oeis.org

0, 1, 5, 22, 1001, 2882, 15251, 720027, 7081807, 7451547, 26811862, 54177145, 1050660501, 1085885801, 1528888251, 2911771192, 2376574756732, 5792526252975, 5875432345785, 10810300301801, 264571020175462, 5292834004382925, 10808388588380801, 15017579397571051
Offset: 1

Views

Author

Keywords

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

  • Mathematica
    Select[PolygonalNumber[5,Range[0,6*10^7]],PalindromeQ] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jan 15 2018 *)

A307752 Number of n-digit palindromic pentagonal numbers.

Original entry on oeis.org

3, 1, 0, 2, 1, 1, 2, 2, 0, 4, 0, 0, 3, 1, 1, 1, 3, 2, 4, 1, 3, 1, 1, 0, 3, 3, 2, 2, 2, 0, 2, 0, 0, 1, 1, 1, 1, 1, 1, 1
Offset: 1

Views

Author

Robert Price, Apr 26 2019

Keywords

Comments

Number of n-digit terms in A002069.

Examples

			There are only two 4-digit pentagonal number that are palindromic, 1001 and 2882. Thus, a(4)=2.
		

Crossrefs

Programs

  • Mathematica
    A002069 = {0, 1, 5, 22, 1001, 2882, 15251, 720027, 7081807, 7451547, 26811862, 54177145, 1050660501, 1085885801, 1528888251, 2911771192, 2376574756732, 5792526252975, 5875432345785, 10810300301801, 264571020175462, 5292834004382925, 10808388588380801, 15017579397571051, 76318361016381367, 150621384483126051, 735960334433069537, 1003806742476083001, 1087959810189597801, 2716280733370826172};
    Table[Length[Select[A002069, IntegerLength[#] == n  || (n == 1 && # == 0) &]], {n, 18}] (* Robert Price, Apr 26 2019 *)
  • Python
    def afind(terms):
      m, n, c = 0, 1, 0
      while n <= terms:
        p = m*(3*m-1)//2
        s = str(p)
        if len(s) == n:
           if s == s[::-1]: c += 1
        else:
          print(c, end=", ")
          n, c = n+1, int(s == s[::-1])
        m += 1
    afind(14) # Michael S. Branicky, Mar 01 2021

Extensions

a(19)-a(22) from Michael S. Branicky, Mar 01 2021
a(23)-a(40) from Bert Dobbelaere, Apr 15 2025

A307753 Number of palindromic pentagonal numbers of length n whose index is also palindromic.

Original entry on oeis.org

3, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
Offset: 1

Views

Author

Robert Price, Apr 26 2019

Keywords

Comments

Is there a nonzero term beyond a(5)?

Examples

			There is only one palindromic pentagonal number of length 4 whose index is also palindromic, 44->2882. Thus, a(4)=1.
		

Crossrefs

Programs

  • Mathematica
    A002069 = {0, 1, 5, 22, 1001, 2882, 15251, 720027, 7081807, 7451547, 26811862, 54177145, 1050660501, 1085885801, 1528888251, 2911771192, 2376574756732, 5792526252975, 5875432345785, 10810300301801, 264571020175462, 5292834004382925, 10808388588380801, 15017579397571051, 76318361016381367, 150621384483126051, 735960334433069537, 1003806742476083001, 1087959810189597801, 2716280733370826172};
    A028386 = {0, 1, 2, 4, 26, 44, 101, 693, 2173, 2229, 4228, 6010, 26466, 26906, 31926, 44059, 1258723, 1965117, 1979130, 2684561, 13280839, 59401650, 84885761, 100058581, 225563533, 316882086, 700457153, 818049201, 851649306, 1345679688};
    Table[Length[Select[A028386[[Table[Select[Range[18], IntegerLength[A002069[[#]]] == n  || (n == 1 && A002069[[#]] == 0) &], {n, 18}][[n]]]], PalindromeQ[#] &]], {n, 18}]

Extensions

a(19)-a(35) from Chai Wah Wu, Sep 07 2019
Showing 1-4 of 4 results.