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.

A173070 Palindromic mountain numbers.

Original entry on oeis.org

1, 121, 131, 141, 151, 161, 171, 181, 191, 12321, 12421, 12521, 12621, 12721, 12821, 12921, 13431, 13531, 13631, 13731, 13831, 13931, 14541, 14641, 14741, 14841, 14941, 15651, 15751, 15851, 15951, 16761, 16861, 16961, 17871, 17971, 18981
Offset: 1

Views

Author

Omar E. Pol, Feb 09 2010

Keywords

Comments

There are 256 terms, the last of which is 12345678987654321. - Michael S. Branicky, Aug 04 2022

Examples

			13731 is in the sequence because it is a palindrome (A002113) and it is also a mountain number (A134941).
. . . . .
. . . . .
. . 7 . .
. . . . .
. . . . .
. . . . .
. 3 . 3 .
. . . . .
1 . . . 1
		

Crossrefs

Programs

  • Python
    from itertools import chain, combinations as combs
    def c(s): return s[0] == s[-1] == 1 and s == s[::-1]
    ups = list(chain.from_iterable(combs(range(10), r) for r in range(2, 11)))
    s = set(L[:-1] + R[::-1] for L in ups for R in ups if L[-1] == R[-1])
    afull = [1] + sorted(int("".join(map(str, t))) for t in s if c(t))
    print(afull[:40]) # Michael S. Branicky, Aug 04 2022

A182721 Mountain emirps.

Original entry on oeis.org

1231, 1321, 1381, 1471, 1741, 1831, 12491, 12641, 12841, 13591, 13751, 13781, 13841, 14591, 14621, 14821, 14831, 14891, 15731, 15791, 18731, 19421, 19531, 19541, 19751, 19841, 123731, 123821, 124951, 124981, 125641, 125651, 125791, 125821, 125941, 126761, 126851
Offset: 1

Views

Author

Omar E. Pol, Dec 21 2010

Keywords

Comments

Intersection of emirps A006567 and mountain numbers A134941.
The smallest mountain emirp 1231 and other terms of this sequence was mentioned by Loungrides in Prime Curios! (see link).
Question: How many are there?
There are 602 such terms. - Michael S. Branicky, Dec 31 2021

Examples

			Illustration of a(11) = 13751 as a mountain emirp:
  . . . . .
  . . . . .
  . . 7 . .
  . . . . .
  . . . 5 .
  . . . . .
  . 3 . . .
  . . . . .
  1 . . . 1
		

Crossrefs

Programs

  • Python
    # uses A134941()
    from sympy import isprime
    def is_emirp(n):
        if not isprime(n): return False
        revn = int(str(n)[::-1])
        return n != revn and isprime(revn)
    print([k for k in A134941() if is_emirp(k)]) # Michael S. Branicky, Dec 31 2021

Formula

A006567 INTERSECT A134941.

Extensions

More terms from Nathaniel Johnston, Dec 29 2010
Terms a(31) and beyond from Michael S. Branicky, Dec 31 2021
Showing 1-2 of 2 results.