OFFSET
1,1
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
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
KEYWORD
nonn
AUTHOR
Robert Israel, Feb 12 2018
STATUS
approved