A269315 Numbers x that are the sum of the digits of some consecutive run of numbers x-1, x-2, x-3, ...
3, 12, 15, 21, 24, 30, 33, 42, 51, 60, 69, 120, 135, 144, 150, 159, 168, 177, 186, 195, 210, 237, 243, 258, 267, 291, 300, 333, 342, 357, 372, 423, 447, 468, 492, 513, 540, 558, 579, 594, 603, 630, 645, 654, 660, 675, 720, 735, 747, 777, 792, 810, 825, 837, 873
Offset: 1
Examples
3 = 2 + 1; 12 = 1+1 + 1+0 + 9; 15 = 1+4 + 1+3 + 1+2 + 1+1 + 1+0.
Links
- Paolo P. Lava, Table of n, a(n) for n = 1..1000
Crossrefs
Cf. A269314.
Programs
-
Maple
P:= proc(q) local a,b,c,k,n; for n from 1 to q do a:=0; b:=0; while a
-
Mathematica
Select[Range[3,1000], (x = # - 1; s = Total[IntegerDigits[x]]; While[s < #, x--; s += Total[IntegerDigits[x]]]; s == #) &] (* Robert Price, May 22 2019 *)
Comments