cp's OEIS Frontend

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.

A330562 Positive numbers k with property that if d is any nonzero digit of k then k mod d is also a digit of k.

This page as a plain text file.
%I A330562 #28 Dec 23 2024 21:49:59
%S A330562 10,20,30,40,50,60,70,80,90,100,101,102,103,104,105,109,110,120,130,
%T A330562 140,150,190,200,201,202,204,206,208,210,220,230,240,250,260,280,290,
%U A330562 300,301,302,303,306,309,310,320,330,360,390,400,401,402,404,408,420,440,460,480,500,501,502,504,505,510,520,540,550,590
%N A330562 Positive numbers k with property that if d is any nonzero digit of k then k mod d is also a digit of k.
%C A330562 Theorem: k must have a zero digit.
%C A330562 Proof: If not, let s be the smallest digit in k. Then d = (k mod s) is a digit of k, and d < s. Contradiction.
%C A330562 Pandigital numbers (A171102) are necessarily an infinite subset. - _Hans Havermann_, Jan 02 2020
%H A330562 Rémy Sigrist, <a href="/A330562/b330562.txt">Table of n, a(n) for n = 1..25000</a>
%e A330562 401 is a term since 401 mod 4 = 1 and 401 mod 1 = 0, and 1 and 0 are both digits of 401.
%t A330562 Select[Range@ 600, Function[{k, d}, AllTrue[DeleteCases[d, 0], ! FreeQ[d, Mod[k, #]] &]] @@ {#, IntegerDigits[#]} &] (* _Michael De Vlieger_, Jan 01 2020 *)
%o A330562 (PARI) is(k) = my (d=Set(digits(k))); for (i=1, #d, if (d[i] && setsearch(d, k%d[i])==0, return (0))); return (1) \\ _Rémy Sigrist_, Jan 01 2020
%o A330562 (Magma) [k:k in [1..600]| forall{c:c in Set(Intseq(k)) diff {0}| k mod c in Intseq(k)}]; // _Marius A. Burtea_, Jan 01 2020
%o A330562 (Python)
%o A330562 def ok(n): s = set(map(int, str(n))); return all(n%d in s for d in s-{0})
%o A330562 print([k for k in range(1, 600) if ok(k)]) # _Michael S. Branicky_, Dec 23 2024
%Y A330562 Cf. A330563 (primes), A171102 (pandigital subset).
%K A330562 nonn,base
%O A330562 1,1
%A A330562 _N. J. A. Sloane_, Dec 31 2019, following a suggestion from _Eric Angelini_