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.

A092911 Numbers all of whose divisors can be formed using their digits. Divisor digits are a subset of the digits of the number.

This page as a plain text file.
%I A092911 #18 May 08 2021 23:00:25
%S A092911 1,11,13,17,19,31,41,61,71,101,103,107,109,113,121,125,127,131,137,
%T A092911 139,149,151,157,163,167,173,179,181,191,193,197,199,211,241,251,271,
%U A092911 281,311,313,317,331,401,419,421,431,461,491,521,541,571
%N A092911 Numbers all of whose divisors can be formed using their digits. Divisor digits are a subset of the digits of the number.
%C A092911 All primes containing 1 are members.
%C A092911 Sequence is a subsequence of A011531. The first nonprime terms of the sequence are 1, 121, 125, 1207, 1255, 1379, 10201, 10379, 11009, 11209, 12419, 12709, 12755, ... - _R. J. Mathar_, Jul 26 2007
%H A092911 Amiram Eldar, <a href="/A092911/b092911.txt">Table of n, a(n) for n = 1..10000</a>
%e A092911 131 is a term. 143 is not a term as the divisor 11 contains two 1's.
%p A092911 isA092911 := proc(n) local digs, digsleft,divs, d,i,j ; digs := convert(n,base,10) ; divs := numtheory[divisors](n) ; for i from 1 to nops(divs) do digsleft := digs ; d := convert(op(i,divs),base,10) ; for j in d do if member(j,digsleft,'jposit') then digsleft := subsop(jposit=NULL,digsleft) ; else RETURN(false) ; fi ; od ; od ; RETURN(true) ; end: for n from 1 to 600 do if isA092911(n) then printf("%d, ",n) ; fi ; od ; # _R. J. Mathar_, Jul 26 2007
%t A092911 subQ[s1_, s2_] := AllTrue[Count[s1, #] & /@ (First /@ (t = Tally[s2])) - Last /@ t, # >= 0 &]; digQ[n1_, n2_] := subQ[IntegerDigits[n1], IntegerDigits[n2]]; seqQ[n_] := AllTrue[Most@Divisors[n], digQ[n, #] &]; Select[Range[600], seqQ] (* _Amiram Eldar_, Nov 12 2020 *)
%o A092911 (Python)
%o A092911 from sympy import divisors
%o A092911 from collections import Counter
%o A092911 def ok(n):
%o A092911   ncounts = Counter(str(n))
%o A092911   for d in divisors(n)[:-1]:
%o A092911     divcounts = Counter(str(d))
%o A092911     if any(ncounts[c] < divcounts[c] for c in divcounts): return False
%o A092911   return True
%o A092911 print(list(filter(ok, range(1, 630)))) # _Michael S. Branicky_, May 08 2021
%Y A092911 Cf. A011531, A062634, A092912.
%K A092911 base,nonn
%O A092911 1,2
%A A092911 _Amarnath Murthy_, Mar 14 2004
%E A092911 Corrected and extended by _R. J. Mathar_, Jul 26 2007