%I #14 Jun 21 2018 03:22:53
%S 5,0,135,0,525,0,175,0,495,0,0,0,0,0,3525,0,0,0,0,0,735,0,0,0,55125,0,
%T 3915,0,0,0,0,0,0,0,1575,0,0,0,0,0,0,0,0,0,15975,0,0,0,37975,0,0,0,0,
%U 0,0,0,0,0,0,0,0,0,9765,0,0,0,0,0,0,0,0,0,0,0,155625,0,0,0,0,0,31995,0,0
%N Smallest number m such that m and the product of digits of m are both divisible by 5n, or 0 if no such number exists.
%C Here 0 is regarded as not divisible by any number.
%C a(n) = 0 if n is divisible by 2 or contains a prime divisor > 9. - _Sascha Kurz_, Aug 23 2002
%F a(n) = A085124(5*n). - _R. J. Mathar_, Jun 21 2018
%p f := 5:for i from 1 to 400 do b := ifactors(f*i)[2]: if b[nops(b)][1]>9 or (f*i mod 10) =0 then a[i] := 0:else j := 0:while true do j := j+f*i:c := convert(j,base,10): d := product(c[k],k=1..nops(c)): if (d mod f*i)=0 and d>0 then a[i] := j:break:fi: od:fi:od:seq(a[k],k=1..400);
%Y Cf. A073906, A085124, A073908, A073909, A073910, A073912.
%K nonn,base
%O 1,1
%A _Amarnath Murthy_, Aug 18 2002
%E More terms from _Sascha Kurz_, Aug 23 2002
|