login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Smallest m such that m * prime(n) consists of decimal digits not greater than 1.
1

%I #11 Jul 19 2016 11:07:16

%S 5,37,2,143,1,77,653,579,4787,37969,3581,3,271,25607,213,1887,186629,

%T 1641,16433,141,137,126709,1217,123709,114433,1,107767,934673,9183579,

%U 8947,86693,771,73,792159,739,7351,64338223,6197,66533,5843937

%N Smallest m such that m * prime(n) consists of decimal digits not greater than 1.

%C a(n) is the smallest number m such that the largest digit of m*prime(n) is 1. - _Farideh Firoozbakht_, Jun 03 2006

%e a(1)=37 because 3*37=111.

%t a[n_]:=(For[m=1, Max[IntegerDigits[m*Prime[n]]]!=1,m++ ];m); Do[Print[a[n]],{n,1,40}] - _Farideh Firoozbakht_, Jun 03 2006

%o (UBASIC)

%o 10 'inspired by Carlos Rivera's Puz361

%o 20 N=19:Y=Y+1:K=0

%o 30 Z=N*Y

%o 40 S=str(Z)

%o 50 A=alen(Z)

%o 60 for X=2 to A+1

%o 70 M=val(mid(S,X,1))

%o 80 if M>1 then K=K+1

%o 90 next X

%o 100 if K=0 then print Z,N,Y,K:stop

%o 110 Y=Y+1:K=0:goto 30

%o 120 'neils361, _Enoch Haga_, May 20 2006

%Y Cf. A119484, A007088.

%K nonn,base

%O 1,1

%A _Enoch Haga_, May 23 2006

%E Edited by _Charles R Greathouse IV_, Aug 05 2010