Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #7 Nov 21 2013 12:50:05
%S 10,10,4,10,10,4,10,10,2,10,10,10,10,10,4,10,10,2,10,10,10,10,10,10,
%T 10,10,2,10,10,4,10,10,4,10,10,2,10,10,4,10,10,10,10,10,2,10,10,4,10,
%U 10,4,10,10,2,10,10,4,10,10,4,10,10,2,10,10,4,10,10,4,10,10,2,10,10,7,10,10
%N a(n) = smallest k > 1 such that n and kn have the same digit sum
%C 2 <= a(n) <= 10
%C Every number from 2 through 10 is in the sequence. a(9) = 2, a(144) = 3, a(3) = 4, a(243) = 5, a(5553) = 6, a(75) = 7, a(1314) = 8, a(6876) = 9, a(1) = 10. n !== 0 (mod 3) ==> a(n) = 10
%H D. W. Wilson, <a href="/A180011/b180011.txt">Table of n, a(n) for n=1..10000</a>
%p Digit sum of 15 = 6. The next multiple of 15 with digit sum 6 = 4*15 = 60, so a(15) = 4.
%t ds[n_]:=Module[{dsn=Total[IntegerDigits[n]],k=2},While[dsn!=Total[ IntegerDigits[k n]],k++];k]; Array[ds,80] (* _Harvey P. Dale_, Jan 16 2012 *)
%K base,easy,nonn
%O 1,1
%A _David W. Wilson_, Aug 06 2010