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.

Showing 1-7 of 7 results.

A011531 Numbers that contain a digit 1 in their decimal representation.

Original entry on oeis.org

1, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 21, 31, 41, 51, 61, 71, 81, 91, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133
Offset: 1

Views

Author

Keywords

Comments

A121042(a(n)) = 1. - Reinhard Zumkeller, Jul 21 2006
See A043493 for numbers that contain a single digit '1'. A subsequence of numbers having a digit that divides all other digits, A263314. - M. F. Hasler, Jan 11 2016

Crossrefs

Programs

  • GAP
    Filtered([1..140],n->1 in ListOfDigits(n)); # Muniru A Asiru, Feb 23 2019
    
  • Haskell
    a011531 n = a011531_list !! (n-1)
    a011531_list = filter ((elem '1') . show) [0..]
    -- Reinhard Zumkeller, Feb 05 2012
    
  • Magma
    [n: n in [0..500] | 1 in Intseq(n) ]; // Vincenzo Librandi, Jan 11 2016
    
  • Maple
    M:= 3: # to get all terms of up to M digits
    B:= {1}: A:= {1}:
    for i from 2 to M do
       B:= map(t -> seq(10*t+j,j=0..9),B) union
          {seq(10*x+1,x=2*10^(i-2)..10^(i-1)-1)}:
       A:= A union B;
    od:
    sort(convert(A,list)); # Robert Israel, Jan 10 2016
    # second program:
    A011531 := proc(n)
        if n = 1 then
            1;
        else
            for a from procname(n-1)+1 do
                if nops(convert(convert(a,base,10),set) intersect {1}) > 0 then
                    return a;
                end if;
            end do:
        end if;
    end proc: # R. J. Mathar, Jul 31 2016
  • Mathematica
    Select[Range[600] - 1, DigitCount[#, 10, 1] > 0 &] (* Vincenzo Librandi, Jan 11 2016 *)
  • PARI
    is_A011531(n)=setsearch(Set(digits(n)),1) \\ M. F. Hasler, Jan 10 2016
    
  • Python
    def aupto(nn): return [m for m in range(1, nn+1) if '1' in str(m)]
    print(aupto(133)) # Michael S. Branicky, Jan 10 2021
  • Scala
    (0 to 119).filter(.toString.indexOf('1') > -1) // _Alonso del Arte, Jan 12 2020
    

Formula

a(n) ~ n. - Charles R Greathouse IV, Nov 02 2022

A208270 Primes containing a digit 1.

Original entry on oeis.org

11, 13, 17, 19, 31, 41, 61, 71, 101, 103, 107, 109, 113, 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, 601, 613, 617, 619, 631, 641, 661
Offset: 1

Views

Author

Jaroslav Krizek, Mar 04 2012

Keywords

Comments

Subsequence of A011531, A062634, A092911 and A092912.
Supersequence of A106101, A045707 and A030430.
Complement of A208271 with respect to A011531.

Crossrefs

Cf. A208271 (nonprimes containing a digit 1), A011531 (numbers containing a digit 1).
Complement of A038603 in A000040. - M. F. Hasler, Mar 05 2012

Programs

  • Magma
    [p: p in PrimesUpTo(400) | 1 in Intseq(p)]; // Vincenzo Librandi, Apr 29 2019
  • Mathematica
    Select[Prime[Range[124]], MemberQ[IntegerDigits[#], 1] &](* Jayanta Basu, Apr 01 2013 *)
    Select[Prime[Range[200]],DigitCount[#,10,1]>0&] (* Harvey P. Dale, Dec 15 2020 *)
  • PARI
    forprime(p=2,1e3,s=vecsort(eval(Vec(Str(p))),,8);if(s[1]==1||(s[1]==0&&s[2]==1),print1(p", "))) \\ Charles R Greathouse IV, Mar 04 2012
    
  • PARI
    is_A208270(n)=isprime(n)&setsearch(Set(Vec(Str(n))),1) \\ M. F. Hasler, Mar 05 2012
    

Formula

a(n) ~ n log n since the sequence contains almost all primes. - Charles R Greathouse IV, Mar 04 2012

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

A206159 Numbers needing at most two digits to write all positive divisors in decimal representation.

Original entry on oeis.org

1, 2, 3, 5, 7, 11, 13, 17, 19, 22, 31, 33, 41, 55, 61, 71, 77, 101, 113, 121, 131, 151, 181, 191, 199, 211, 311, 313, 331, 661, 811, 881, 911, 919, 991, 1111, 1117, 1151, 1171, 1181, 1511, 1777, 1811, 1999, 2111, 2221, 3313, 3331, 4111, 4441, 6661, 7177, 7717, 8111, 9199, 10111, 11113
Offset: 1

Views

Author

Reinhard Zumkeller, Feb 05 2012

Keywords

Comments

The terms of A203897 having all divisors in A020449 (in particular, the first 1022 terms) are a subsequence. - M. F. Hasler, May 02 2022
Since 1 and the term itself are divisors, one must only check repdigits and those containing only 1 and another digit. - Michael S. Branicky, May 02 2022

Crossrefs

Cf. A203897 (an "almost subsequence"), A020449 (primes with only digits 0 & 1), A095048 (number of distinct digits in divisors(n)).

Programs

  • Mathematica
    Select[Range[12000],Length[Union[Flatten[IntegerDigits/@Divisors[#]]]]<3&] (* Harvey P. Dale, May 03 2022 *)
  • PARI
    select( {is_A206159(n)=#Set(concat([digits(d)|d<-divisors(n)]))<3}, [1..10^4]) \\ M. F. Hasler, May 02 2022
  • Python
    from sympy import divisors
    def ok(n):
        digits_used = set()
        for d in divisors(n, generator=True):
            digits_used |= set(str(d))
            if len(digits_used) > 2: return False
        return True
    print([k for k in range(1, 9000) if ok(k)]) # Michael S. Branicky, May 02 2022
    

Formula

A095048(a(n)) <= 2.

Extensions

Terms corrected by Harvey P. Dale, May 02 2022
Edited by N. J. A. Sloane, May 02 2022

A062649 Composite numbers with property that every divisor contains the digit 1.

Original entry on oeis.org

121, 143, 169, 187, 221, 341, 361, 451, 671, 781, 961, 1037, 1111, 1133, 1159, 1177, 1199, 1207, 1243, 1271, 1313, 1331, 1339, 1349, 1391, 1397, 1417, 1441, 1469, 1507, 1529, 1573, 1639, 1651, 1661, 1681, 1703, 1717, 1727, 1751, 1781, 1793, 1807, 1819
Offset: 1

Views

Author

Erich Friedman, Jul 04 2001

Keywords

Comments

Intersection of A002808 and A062634. - Michel Marcus, Sep 12 2013

Examples

			143 has divisors 1, 11, 13 and 143, all of which contain the digit 1.
		

Crossrefs

Programs

  • Mathematica
    fQ[n_, dgt_] := Union[ MemberQ[#, dgt] & /@ IntegerDigits@ Rest@ Divisors@ n][[1]]; Select[ Range[2, 1850], !PrimeQ[#] && fQ[#, 1] &] (* Robert G. Wilson v, Jun 11 2014 *)
  • PARI
    lista(nn) = {forcomposite(n = 1, nn, ok = 1; fordiv(n, d, ok = ok && setsearch(Set(digits(d)), 1)); if (ok, print1(n, ", ")););} \\ Michel Marcus, Sep 12 2013

A092912 Numbers k all of whose divisors contain only digits that occur at least once in k.

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, 143, 149, 151, 157, 163, 167, 173, 179, 181, 187, 191, 193, 197, 199, 211, 241, 251, 271, 281, 311, 313, 317, 331, 341, 401, 419, 421, 431, 451, 461, 491, 521, 541, 571
Offset: 1

Views

Author

Amarnath Murthy, Mar 14 2004

Keywords

Comments

All primes containing the digit 1 are terms.

Examples

			131 is a term. 143 is also a term with divisors 1,11,13,143.
		

Crossrefs

Programs

  • Maple
    isA092912 := proc(n) local digs, divs, d,i,j ; digs := convert(n,base,10) ; divs := numtheory[divisors](n) ; for i from 1 to nops(divs) do d := convert(op(i,divs),base,10) ; for j in d do if not j in digs then RETURN(false) ; fi ; od ; od ; RETURN(true) ; end: for n from 1 to 700 do if isA092912(n) then printf("%d, ",n) ; fi ; od ; # R. J. Mathar, Jul 26 2007
  • Mathematica
    Do[a = IntegerDigits[n]; b = Union @@ IntegerDigits[Divisors[n]]; If[Intersection[a, b] == b, Print[n]], {n, 1, 200}] (* Ryan Propper, Jul 19 2005 *)
  • PARI
    is_A092912(n)=!setminus(Set(concat(apply(digits,divisors(n)))),Set(digits(n))) \\ M. F. Hasler, Mar 09 2014

Extensions

Corrected and extended by Ryan Propper, Jul 19 2005
More terms from R. J. Mathar, Jul 26 2007

A243825 Numbers n such that every divisor greater than 1 contains the digit 0.

Original entry on oeis.org

101, 103, 107, 109, 307, 401, 409, 503, 509, 601, 607, 701, 709, 809, 907, 1009, 1013, 1019, 1021, 1031, 1033, 1039, 1049, 1051, 1061, 1063, 1069, 1087, 1091, 1093, 1097, 1103, 1109, 1201, 1301, 1303, 1307, 1409, 1601, 1607, 1609, 1709, 1801, 1901, 1907, 2003, 2011, 2017, 2027, 2029
Offset: 1

Views

Author

Barbara W. Waddell and Robert G. Wilson v, Jun 11 2014

Keywords

Comments

This is an example of a composite number in the sequence which demonstrates that A056709 is a proper subsequence. - R. J. Mathar, Jun 13 2014

Examples

			The divisors of 10201 are {1, 101 & 10201}. Except for 1 each has a 0 in its decimal expansion.
		

Crossrefs

Supersequence of A056709 (primes) and A243819 (composites).

Programs

  • Magma
    [m:m in [2..2100] |  #[d:d in Divisors(m)|0 in Intseq(d)] eq #Divisors(m)-1]; // Marius A. Burtea, Nov 08 2019
  • Mathematica
    fQ[n_, dgt_] := Union[ MemberQ[#, dgt] & /@ IntegerDigits@ Rest@ Divisors@ n][[1]]; Select[ Range[2, 2030], fQ[#, 0] &]
Showing 1-7 of 7 results.