A171492 Numbers that are not divisible by each of their nonzero decimal digits.
13, 14, 16, 17, 18, 19, 21, 23, 25, 26, 27, 28, 29, 31, 32, 34, 35, 37, 38, 39, 41, 42, 43, 45, 46, 47, 49, 51, 52, 53, 54, 56, 57, 58, 59, 61, 62, 63, 64, 65, 67, 68, 69, 71, 72, 73, 74, 75, 76, 78, 79, 81, 82, 83, 84, 85, 86, 87, 89, 91, 92, 93, 94, 95, 96, 97, 98, 103, 106
Offset: 1
Links
- Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
- Index entries for 10-automatic sequences.
Programs
-
Haskell
import Data.List (nub, sort); import Data.Char (digitToInt) a171492 n = a171492_list !! (n-1) a171492_list = filter f [1..] where f x = any ((> 0) . mod x) ds where ds = map digitToInt (if c == '0' then cs else cs') cs'@(c:cs) = nub $ sort $ show x -- Reinhard Zumkeller, Jan 01 2014
-
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
-
Mathematica
a[c_]:=Module[{b=DeleteCases[IntegerDigits[c], 0]}, !And@@Divisible[c, b]]; Select[Range[250], a] (* Metin Sariyar, Sep 14 2019 *)
Formula
a(n) ~ k*n, where k = 2520/2519 = 1.00039.... - Charles R Greathouse IV, Feb 13 2017
Comments