login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A173070
Palindromic mountain numbers.
2
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,2
COMMENTS
There are 256 terms, the last of which is 12345678987654321. - Michael S. Branicky, Aug 04 2022
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..256 (full sequence)
EXAMPLE
13731 is in the sequence because it is a palindrome (A002113) and it is also a mountain number (A134941).
. . . . .
. . . . .
. . 7 . .
. . . . .
. . . . .
. . . . .
. 3 . 3 .
. . . . .
1 . . . 1
PROG
(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
KEYWORD
nonn,base,fini,full
AUTHOR
Omar E. Pol, Feb 09 2010
STATUS
approved