OFFSET
0,2
LINKS
Chai Wah Wu, Table of n, a(n) for n = 0..79
MAPLE
P:=proc(i) local j, k, n, ok, w; for n from 0 by 1 to i do j:=-1; ok:=1; while ok=1 do j:=j+1; w:=0; k:=n*j; while k>0 do w:=w+k-(trunc(k/10)*10); k:=trunc(k/10); od; if w=2*n then ok:=0; print(j); fi; od; od; end: P(100);
MATHEMATICA
cmnk=Compile[{{n, _Integer}}, Module[{k=0}, While[Total[ IntegerDigits[ k*n]] != 2n, k++]; k], RuntimeAttributes -> {Listable}, Parallelization -> True]; Array[cmnk, 41, 0] (* Harvey P. Dale, Mar 01 2016 *)
PROG
(PARI) a(n) = {my(k = 0); while (sumdigits(k*n) != 2*n, k++); k; }; \\ Michel Marcus, Mar 21 2016
CROSSREFS
KEYWORD
easy,nonn,base
AUTHOR
Paolo P. Lava and Giorgio Balzarotti, Nov 14 2008
EXTENSIONS
Edited by Charles R Greathouse IV, Nov 01 2009
a(35)-a(40) from Donovan Johnson, Sep 16 2012
STATUS
approved