login
A110785
Palindromes in which the digits are in nonincreasing order halfway through.
4
1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 22, 33, 44, 55, 66, 77, 88, 99, 101, 111, 202, 212, 222, 303, 313, 323, 333, 404, 414, 424, 434, 444, 505, 515, 525, 535, 545, 555, 606, 616, 626, 636, 646, 656, 666, 707, 717, 727, 737, 747, 757, 767, 777, 808, 818, 828, 838, 848
OFFSET
1,2
COMMENTS
Also, palindromic valley numbers, or palindromes in A193413. - Michael S. Branicky, Feb 01 2026
EXAMPLE
After 111 the next term is 202 and not 121, 131, up to 191.
From Alexander Yutkin, Feb 02 2026: (Start)
Illustration using number 54332223345:
. . . . . . . . . . .
5 . . . . . . . . . 5
. 4 . . . . . . . 4 .
. . 3 3 . . . 3 3 . .
. . . . 2 2 2 . . . .
. . . . . . . . . . .
(End)
MATHEMATICA
A110785Q[k_] := PalindromeQ[#] && (Length[#] <= 2 || Max[Differences[#[[;; Ceiling[Length[#]/2]]]]] <= 0) & [IntegerDigits[k]];
Select[Range[2000], A110785Q] (* Paolo Xausa, Jul 31 2025, corrected on Feb 01 2026 *)
PROG
(Python)
def ok(n): return (s:=str(n)) == s[::-1] and (h:=s[:(len(s)+1)//2]) == "".join(sorted(h, reverse=True))
print([k for k in range(1, 850) if ok(k)]) # Michael S. Branicky, Feb 01 2026
CROSSREFS
Intersection of A002113 and A193413.
Sequence in context: A394545 A276354 A084982 * A193413 A087992 A062687
KEYWORD
base,easy,nonn
AUTHOR
Amarnath Murthy, Aug 12 2005
STATUS
approved