login
Minimum number k for which the digital sum of k*n is 4*n.
3

%I #13 Mar 21 2016 03:12:57

%S 0,4,4,13,22,139,133,427,1111,1111,49999,40909,49999,69223,357142,

%T 1333333,3124993,4705294,11111111,31578421,499999999,238047619,

%U 409090909,2169565213,4166666662,31999999999,26923076923,37037037037,285713928571,344824137931

%N Minimum number k for which the digital sum of k*n is 4*n.

%H Chai Wah Wu, <a href="/A147824/b147824.txt">Table of n, a(n) for n = 0..49</a>

%p 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=4*n then ok:=0; print(j); fi; od; od; end: P(100);

%o (PARI) a(n) = {my(k = 0); while (sumdigits(k*n) != 4*n, k++); k;}; \\ _Michel Marcus_, Mar 21 2016

%Y Cf. A147822, A147823, A147825-A147831.

%K easy,nonn,base

%O 0,2

%A _Paolo P. Lava_ and _Giorgio Balzarotti_, Nov 14 2008

%E Edited by _Charles R Greathouse IV_, Nov 01 2009

%E a(15)-a(29) from _Donovan Johnson_, Sep 16 2012