login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A147823 Minimum number k for which the digital sum of k*n is 3*n. 3

%I #15 Mar 21 2016 03:12:37

%S 0,3,3,3,12,39,33,57,111,111,3999,3909,2499,3846,6357,33333,43743,

%T 52347,111111,310521,3999999,947619,3090909,3473913,16666662,39999999,

%U 34576923,37037037,246428571,310337931,3333333333,2193516129,6249999684,33303030303

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

%H Chai Wah Wu, <a href="/A147823/b147823.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=3*n then ok:=0; print(j); fi; od; od; end: P(100);

%t dskn[n_]:=Module[{k=0},While[Total[IntegerDigits[k*n]]!=3n,k++];k]; Array[dskn, 20, 0] (* _Harvey P. Dale_, Sep 14 2012 *)

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

%Y Cf. A147822, A147824-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(20)-a(33) from _Donovan Johnson_, Sep 16 2012

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 2 09:03 EDT 2024. Contains 372178 sequences. (Running on oeis4.)