This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A256786 #36 Dec 23 2024 14:53:44 %S A256786 12,14,42,55,154,222,228,714,1122,1196,1212,1414,2112,2142,2262,3355, %T A256786 4144,4242,5335,5544,5555,6162,9499,11112,11144,11214,11424,11466, %U A256786 11622,11818,11914,12222,12882,14112,15554,16666,21216,21222,21252,21888,22122,22212 %N A256786 Numbers which are divisible by prime(d) for all digits d in their decimal representation. %C A256786 All terms are zerofree, cf. A052382; %C A256786 there is no term containing digits 1 and 3 simultaneously; %C A256786 a(n) contains at least one digit 1 iff a(n) is even, cf. A011531, A005843; %C A256786 a(n) contains at least one digit 2 iff a(n) mod 3 = 0, cf. A011532, A008585; %C A256786 a(n) contains at least one digit 3 iff a(n) mod 10 = 5, cf. A011533, A017329; %C A256786 A020639(a(n)) <= 23. %C A256786 The equivalent in base 2 is the empty sequence, in base 3 it is A191681\{0}; see A256874-A256879 for the base 4 - base 9 variant, and A256870 for a variant where digits 0 are allowed but divisibility by prime(d+1) is required instead. - _M. F. Hasler_, Apr 11 2015 %H A256786 Lars Blomberg and Reinhard Zumkeller, <a href="/A256786/b256786.txt">Table of n, a(n) for n = 1..10000</a> %H A256786 Éric Angelini, <a href="https://web.archive.org/web/*/http://list.seqfan.eu/oldermail/seqfan/2015-April/014678.html">Divisibility by primes</a>, SeqFan list, Apr 10 2015. %H A256786 <a href="/index/Ar#10-automatic">Index entries for 10-automatic sequences</a>. %e A256786 Smallest terms containing the nonzero decimal digits: %e A256786 . d | prime(d) | n | a(n) %e A256786 . ---+----------+-------------------------- %e A256786 . 1 | 2 | 1 | 12 = 2^2 * 3 %e A256786 . 2 | 3 | 1 | 12 = 2^2 * 3 %e A256786 . 3 | 5 | 16 | 3355 = 5 * 11 * 61 %e A256786 . 4 | 7 | 2 | 14 = 2 * 7 %e A256786 . 5 | 11 | 4 | 55 = 5 * 11 %e A256786 . 6 | 13 | 10 | 1196 = 2^2 * 13 * 23 %e A256786 . 7 | 17 | 8 | 714 = 2 * 3 * 7 * 17 %e A256786 . 8 | 19 | 7 | 228 = 2^2 * 3 * 19 %e A256786 . 9 | 23 | 10 | 1196 = 2^2 * 13 * 23 . %t A256786 Select[Range@22222,FreeQ[IntegerDigits[#],0]&&Total[Mod[#,Prime[IntegerDigits[#]]]]==0&] (* _Ivan N. Ianakiev_, Apr 11 2015 *) %o A256786 (Haskell) %o A256786 a256786 n = a256786_list !! (n-1) %o A256786 a256786_list = filter f a052382_list where %o A256786 f x = g x where %o A256786 g z = z == 0 || x `mod` a000040 d == 0 && g z' %o A256786 where (z', d) = divMod z 10 %o A256786 (PARI) is_A256786(n)=!for(i=1,#d=Set(digits(n)),(!d[i]||n%prime(d[i]))&&return) \\ _M. F. Hasler_, Apr 11 2015 %o A256786 (Python) %o A256786 primes = [1, 2, 3, 5, 7, 11, 13, 17, 19, 23] %o A256786 def ok(n): %o A256786 s = str(n) %o A256786 return "0" not in s and all(n%primes[int(d)] == 0 for d in s) %o A256786 print([k for k in range(22213) if ok(k)]) # _Michael S. Branicky_, Dec 14 2021 %Y A256786 Cf. A000040, A005843, A008585, A011531, A011532, A011533, A017329, A020639, A052382, A256874-A256879, A256882-A256884, A256865-A256870. %K A256786 nonn,base %O A256786 1,1 %A A256786 _Eric Angelini_ and _Reinhard Zumkeller_, Apr 10 2015