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

A307765 Number of palindromic hexagonal numbers with exactly n digits.

Original entry on oeis.org

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

Views

Author

Robert Price, Apr 27 2019

Keywords

Comments

Number of terms in A054969 with exactly n digits.

Examples

			There are only two 4-digit hexagonal numbers that are palindromic, 3003 and 5995. Thus, a(4)=2.
		

Crossrefs

Programs

  • Mathematica
    A054969 = {0, 1, 6, 66, 3003, 5995, 15051, 66066, 617716, 828828, 1269621, 1680861, 5073705, 5676765, 1264114621, 5289009825, 6172882716, 13953435931, 1313207023131, 5250178710525, 6874200024786, 61728399382716, 602224464422206, 636188414881636, 1250444114440521, 16588189498188561, 58183932923938185, 66056806460865066, 67898244444289876, 514816979979618415, 3075488771778845703, 6364000440440004636, 15199896744769899151}; Table[Length[ Select[A054969, IntegerLength[#] == n || (n == 1 && # == 0) &]], {n, 19}]
  • Python
    def afind(terms):
      m, n, c = 0, 1, 0
      while n <= terms:
        p = m*(2*m-1)
        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(20)-a(22) from Michael S. Branicky, Mar 01 2021

A307766 Number of palindromic hexagonal numbers of length n whose index is also palindromic.

Original entry on oeis.org

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

Views

Author

Robert Price, Apr 27 2019

Keywords

Comments

Is there a nonzero term beyond a(7)?

Examples

			There is only one palindromic hexagonal number of length 4 whose index is also palindromic, 55->5995. Thus, a(4)=1.
		

Crossrefs

Programs

  • Mathematica
    A054969 = {0, 1, 6, 66, 3003, 5995, 15051, 66066, 617716, 828828, 1269621, 1680861, 5073705, 5676765, 1264114621, 5289009825, 6172882716, 13953435931, 1313207023131, 5250178710525, 6874200024786, 61728399382716, 602224464422206, 636188414881636, 1250444114440521, 16588189498188561, 58183932923938185, 66056806460865066, 67898244444289876, 514816979979618415, 3075488771778845703, 6364000440440004636, 15199896744769899151};
    A054970 = {0, 1, 2, 6, 39, 55, 87, 182, 556, 644, 797, 917, 1593, 1685, 25141, 51425, 55556, 83527, 810311, 1620213, 1853942, 5555556, 17352586, 17835196, 25004441, 91071921, 170563673, 181737182, 184252876, 507354403, 1240058219, 1783816196, 2756800387};
    Table[Length[ Select[A054970[[Table[ Select[Range[18], IntegerLength[A054969[[#]]] == n || (n == 1 && A054969[[#]] == 0) &], {n, 19}][[n]]]], PalindromeQ[#] &]], {n, 19}]
Showing 1-2 of 2 results.