|
|
A269314
|
|
Numbers x that are the sum of the digits of k consecutive numbers starting from x+1.
|
|
3
|
|
|
15, 24, 30, 39, 48, 57, 66, 75, 84, 93, 96, 99, 108, 138, 147, 189, 198, 207, 228, 249, 258, 288, 309, 321, 351, 372, 378, 402, 414, 456, 465, 507, 600, 612, 633, 645, 705, 801, 813, 930, 1902, 1911, 1962, 1992, 2010, 2013, 2028, 2037, 2052, 2076, 2085, 2100, 2103
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
All terms are multiples of 3.
|
|
LINKS
|
|
|
EXAMPLE
|
15 = 1+6 + 1+7;
24 = 2+5 + 2+6 + 2+7;
30 = 3+1 + 3+2 + 3+3 + 3+4 + 3+5.
|
|
MAPLE
|
P:= proc(q) local a, b, c, k, n; for n from 1 to q do a:=0; b:=0;
while a<n do b:=b+1; c:=n+b; for k from 1 to ilog10(n+b)+1 do a:=a+(c mod 10); c:=trunc(c/10);
od; od; if a=n then print(n); fi; od; end: P(10^6);
|
|
MATHEMATICA
|
Select[Range[2100], (x = # + 1; s = Total[IntegerDigits[x]]; While[s < #, x++; s += Total[IntegerDigits[x]]]; s == #) &] (* Robert Price, May 22 2019 *)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|