|
|
A332046
|
|
a(n) is the smallest positive integer such that there exist exactly n positive integers less than a(n) whose digital sum in base 10 is equal to the digital sum of a(n).
|
|
0
|
|
|
10, 20, 30, 40, 50, 60, 70, 80, 90, 108, 117, 126, 135, 144, 153, 162, 171, 180, 207, 216, 225, 234, 243, 252, 261, 270, 280, 307, 316, 325, 334, 343, 352, 361, 370, 406, 415, 424, 433, 442, 451, 460, 470, 506, 515, 524, 533, 542, 551, 560, 605, 614, 623, 632, 641, 650, 660
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
LINKS
|
|
|
EXAMPLE
|
For n=10, 108 is the smallest positive integer for which there exists exactly 10 smaller integers whose digit sum in base 10 is the same as the digit sum of 108 (i.e., 1+0+8=9). These integers are 9, 18, 27, 36, 45, 54, 63, 72, 81, 90.
|
|
PROG
|
(PARI) isok(k, n) = {my(v=vector(k, j, sumdigits(j))); #select(x->(x==v[k]), v) == n+1; }
a(n) = {my(k=1); while(! isok(k, n), k++); k; } \\ Michel Marcus, Feb 16 2020
|
|
CROSSREFS
|
Cf. A081926 (similar but different definition).
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|