login

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”).

A295430
a(n) is the least nontrivial multiple of n that begins with 3.
1
3, 30, 30, 32, 30, 30, 35, 32, 36, 30, 33, 36, 39, 308, 30, 32, 34, 36, 38, 300, 315, 308, 322, 312, 300, 312, 324, 308, 319, 300, 310, 320, 330, 306, 315, 324, 333, 304, 312, 320, 328, 336, 301, 308, 315, 322, 329, 336, 343, 300, 306, 312, 318, 324, 330, 336, 342, 348, 354, 300, 305, 310, 315
OFFSET
1,1
LINKS
MAPLE
f:= proc(n) local m, k;
for m from 0 do
k := max(2, ceil(3*10^m/n));
if k*n < 4*10^m then return k*n end if
end do
end proc:
seq(f(i), i=1..100);
PROG
(PARI) a(n) = {my(k=2); while(digits(k*n)[1] != 3, k++); k*n; } \\ Michel Marcus, Feb 13 2018
(Python)
def A295430(n):
m = 2*n
while True:
if str(m)[0] == '3':
return m
m += n # Chai Wah Wu, Feb 13 2018
CROSSREFS
Cf. A082792.
Sequence in context: A154054 A118219 A186681 * A344430 A217395 A077679
KEYWORD
nonn
AUTHOR
Robert Israel, Feb 12 2018
STATUS
approved