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 #16 Feb 20 2018 22:51:21
%S 3,30,30,32,30,30,35,32,36,30,33,36,39,308,30,32,34,36,38,300,315,308,
%T 322,312,300,312,324,308,319,300,310,320,330,306,315,324,333,304,312,
%U 320,328,336,301,308,315,322,329,336,343,300,306,312,318,324,330,336,342,348,354,300,305,310,315
%N a(n) is the least nontrivial multiple of n that begins with 3.
%H Robert Israel, <a href="/A295430/b295430.txt">Table of n, a(n) for n = 1..10000</a>
%p f:= proc(n) local m,k;
%p for m from 0 do
%p k := max(2, ceil(3*10^m/n));
%p if k*n < 4*10^m then return k*n end if
%p end do
%p end proc:
%p seq(f(i),i=1..100);
%o (PARI) a(n) = {my(k=2); while(digits(k*n)[1] != 3, k++); k*n;} \\ _Michel Marcus_, Feb 13 2018
%o (Python)
%o def A295430(n):
%o m = 2*n
%o while True:
%o if str(m)[0] == '3':
%o return m
%o m += n # _Chai Wah Wu_, Feb 13 2018
%Y Cf. A082792.
%K nonn
%O 1,1
%A _Robert Israel_, Feb 12 2018