login
Numbers that are not divisible by each of their nonzero decimal digits.
3

%I #26 Sep 08 2022 08:45:50

%S 13,14,16,17,18,19,21,23,25,26,27,28,29,31,32,34,35,37,38,39,41,42,43,

%T 45,46,47,49,51,52,53,54,56,57,58,59,61,62,63,64,65,67,68,69,71,72,73,

%U 74,75,76,78,79,81,82,83,84,85,86,87,89,91,92,93,94,95,96,97,98,103,106

%N Numbers that are not divisible by each of their nonzero decimal digits.

%C Complement of A002796.

%C A067458(a(n)) > 0. - _Reinhard Zumkeller_, Sep 24 2015

%H Reinhard Zumkeller, <a href="/A171492/b171492.txt">Table of n, a(n) for n = 1..10000</a>

%H <a href="/index/Ar#10-automatic">Index entries for 10-automatic sequences</a>.

%F a(n) ~ k*n, where k = 2520/2519 = 1.00039.... - _Charles R Greathouse IV_, Feb 13 2017

%t a[c_]:=Module[{b=DeleteCases[IntegerDigits[c], 0]}, !And@@Divisible[c, b]]; Select[Range[250], a] (* _Metin Sariyar_, Sep 14 2019 *)

%o (Haskell)

%o import Data.List (nub, sort); import Data.Char (digitToInt)

%o a171492 n = a171492_list !! (n-1)

%o a171492_list = filter f [1..] where

%o f x = any ((> 0) . mod x) ds where

%o ds = map digitToInt (if c == '0' then cs else cs')

%o cs'@(c:cs) = nub $ sort $ show x

%o -- _Reinhard Zumkeller_, Jan 01 2014

%o (Magma) sol:=[];for k in [1..120] do a:=Set(Intseq(k)) diff {0}; if #[c:c in a|IsIntegral(k/c)] ne #a then; Append(~sol,k); end if; end for; sol; // _Marius A. Burtea_, Sep 09 2019

%Y Cf. A002796, A034838, A067458.

%K nonn,base,easy

%O 1,1

%A _Jaroslav Krizek_, Dec 10 2009