%I #46 Mar 30 2024 15:37:01
%S 1,2,3,4,5,6,7,8,9,11,15,24,36,115,175,212,624,735,816,1115,1184,1197,
%T 1416,2144,3171,3276,3915,6624,7119,8832,9612,11133,11212,11331,12128,
%U 12216,12768,13131,21184,21728,24912,31113,31488,32172,32616,35175
%N Numbers k such that (k / product of digits of k) is 1 or a prime.
%C For terms > 10 the quotient (k / product of digits of k) is prime. - _David A. Corneth_, Mar 30 2021
%H David A. Corneth, <a href="/A001103/b001103.txt">Table of n, a(n) for n = 1..12677</a> (terms <= 10^12; first 448 terms from Klaus Brockhaus)
%e 21728 is in the sequence as 21728/(2*1*7*2*8) = 97 which is prime. - _David A. Corneth_, Mar 30 2021
%t okQ[n_] := Block[{p = Times @@ IntegerDigits[n]}, n == p || PrimeQ[n/p]]; Select[ Range[36000], okQ]
%t Select[Range[40000],FreeQ[IntegerDigits[#],0]&&!CompositeQ[#/Times@@IntegerDigits[#]]&] (* _Harvey P. Dale_, Mar 30 2024 *)
%o (Magma) IsA001103:=func< n | p ne 0 and n mod p eq 0 and (q eq 1 or IsPrime(q)) where q is (p eq 0 select 0 else n div p) where p is &*Intseq(n) >; [ n: n in [1..40000] | IsA001103(n) ]; // _Klaus Brockhaus_, Jan 24 2011
%o (Haskell)
%o a001103 n = a001103_list !! (n-1)
%o a001103_list = filter f a052382_list where
%o f x = m == 0 && (x' == 1 || a010051 x' == 1) where
%o (x',m) = divMod x $ a007954 x
%o -- _Reinhard Zumkeller_, Nov 02 2011
%o (PARI) is(n) = { my(vp = vecprod(digits(n))); if(vp > 0, c = n/vp; if(denominator(c) == 1, if(c == 1 || isprime(c), return(1)))); 0} \\ _David A. Corneth_, Mar 30 2021
%Y Cf. A007954, A066577.
%Y Cf. A052382, A010051, A007602, A188642.
%K nonn,base,nice
%O 1,2
%A _N. J. A. Sloane_, Bill Moran (moran1(AT)llnl.gov)