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.

Original entry on oeis.org

1, 11, 13, 17, 19, 31, 41, 61, 71, 101, 103, 107, 109, 113, 121, 125, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 241, 251, 271, 281, 311, 313, 317, 331, 401, 419, 421, 431, 461, 491, 521, 541, 571
Offset: 1

Views

Author

Amarnath Murthy, Mar 14 2004

Keywords

Comments

All primes containing 1 are members.
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

Examples

			131 is a term. 143 is not a term as the divisor 11 contains two 1's.
		

Crossrefs

Programs

  • Maple
    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
  • Mathematica
    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 *)
  • Python
    from sympy import divisors
    from collections import Counter
    def ok(n):
      ncounts = Counter(str(n))
      for d in divisors(n)[:-1]:
        divcounts = Counter(str(d))
        if any(ncounts[c] < divcounts[c] for c in divcounts): return False
      return True
    print(list(filter(ok, range(1, 630)))) # Michael S. Branicky, May 08 2021

Extensions

Corrected and extended by R. J. Mathar, Jul 26 2007