login
A393832
Nonnegative integers that have only one largest digit m and the sum of the digits equal to 2*m.
2
0, 112, 121, 123, 132, 134, 143, 145, 154, 156, 165, 167, 176, 178, 187, 189, 198, 211, 213, 224, 231, 235, 242, 246, 253, 257, 264, 268, 275, 279, 286, 297, 312, 314, 321, 325, 336, 341, 347, 352, 358, 363, 369, 374, 385, 396, 413, 415, 422, 426, 431, 437, 448, 451, 459, 462, 473, 484, 495
OFFSET
1,2
COMMENTS
The sequence is infinite because, apart from the initial zero term, for every term k it contains all the terms of the form k*10^h, where h is a positive integer.
LINKS
EXAMPLE
286 is a term, since it has only one largest digit, 8, and 2 + 8 + 6 = 16 = 2*8.
MATHEMATICA
Select[Range[0, 500], Count[digits=IntegerDigits[#], mx=Max[digits]]==1 && DigitSum[#]==2*mx &]
PROG
(PARI) isok(k) = if (k==0, 1, my(d=digits(k), m=vecmax(d)); (#select(x->(x==m), d) == 1) && (vecsum(d)==2*m)); \\ Michel Marcus, Mar 05 2026
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Stefano Spezia, Mar 01 2026
STATUS
approved