login
A077489
a(n) = smallest multiple of 4 with sum of digits = n.
1
100, 20, 12, 4, 32, 24, 16, 8, 36, 28, 56, 48, 76, 68, 96, 88, 188, 288, 388, 488, 588, 688, 788, 888, 988, 1988, 2988, 3988, 4988, 5988, 6988, 7988, 8988, 9988, 19988, 29988, 39988, 49988, 59988, 69988, 79988, 89988, 99988, 199988, 299988, 399988, 499988
OFFSET
1,1
MATHEMATICA
With[{d4=Sort[{Total[IntegerDigits[#]], #}&/@(4Range[250000])]}, Table[ SelectFirst[ d4, #[[1]]==n&], {n, 50}]][[All, 2]] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jun 17 2021 *)
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Amarnath Murthy, Nov 07 2002
EXTENSIONS
More terms from Ray Chandler, Aug 03 2003
STATUS
approved