A133296 Smallest number whose sum of digits is 2n.
0, 2, 4, 6, 8, 19, 39, 59, 79, 99, 299, 499, 699, 899, 1999, 3999, 5999, 7999, 9999, 29999, 49999, 69999, 89999, 199999, 399999, 599999, 799999, 999999, 2999999, 4999999, 6999999, 8999999, 19999999, 39999999, 59999999, 79999999, 99999999, 299999999, 499999999
Offset: 0
Links
- Index entries for linear recurrences with constant coefficients, signature (1,0,0,0,0,0,0,0,100,-100).
Programs
-
Maple
a:= n-> parse(cat(irem(2*n, 9, 'r'), 9$r)): seq(a(n), n=0..38); # Alois P. Heinz, Mar 12 2025
-
Mathematica
a[n_] := (Mod[2n, 9] + 1)*10^Floor[2n/9] - 1; Table[a[n], {n, 0,38}] (* James C. McMahon, Mar 13 2025 *)
Formula
From Alois P. Heinz, Mar 12 2025: (Start)
G.f.: x*(20*x^8+20*x^7+20*x^6+20*x^5+11*x^4+2*x^3+2*x^2+2*x+2)/((x-1)*(100*x^9-1)).
a(n) = A051885(2*n). (End)