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-3 of 3 results.

A243535 Numbers whose list of divisors contains 2 distinct digits (in base 10).

Original entry on oeis.org

2, 3, 5, 7, 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
Offset: 1

Views

Author

Jaroslav Krizek, Jun 13 2014

Keywords

Comments

Numbers k such that A037278(k), A176558(k) and A243360(k) contain 2 distinct digits.
Many of the composite terms are in A203897. - Charles R Greathouse IV, Sep 06 2016
Terms are either repdigit numbers (A010785) or contain only 1 and a single other digit. - Michael S. Branicky, Nov 16 2022

Examples

			121 is in the sequence because the list of divisors of 121, i.e., (1, 11, 121), contains 2 distinct digits (1, 2).
		

Crossrefs

Sequences of numbers n such that the list of divisors of n contains k distinct digits for 1 <= k <= 10: k = 1: A243534; k = 2: A243535; k = 3: A243536; k = 4: A243537; k = 5: A243538; k = 6: A243539; k = 7: A243540; k = 8: A243541; k = 9: A243542; k = 10: A095050.
Cf. A243543 (the smallest number m whose list of divisors contains n distinct digits).

Programs

  • Excel
    [Row n = 1..10000; Column A: A(n) = A095048(n); Column B: B(n) = IF(A(n)=2;A(n)); Arrangement of column B]
    
  • Maple
    dmax:= 6: # get all terms of <= dmax digits
    Res:= {}:
    for a in [0,$2..9] do
        S:= {0}:
        for d from 1 to dmax do
            S:= map(t -> (10*t+1,10*t+a), S);
            Res:= Res union select(filter, S)
        od
    od:
    sort(convert(Res,list)): # Robert Israel, Sep 05 2016
  • Mathematica
    Select[Range[9000],Length[Union[Flatten[IntegerDigits/@Divisors[ #]]]] == 2&] (* Harvey P. Dale, Dec 14 2017 *)
  • PARI
    isok(n) = vd = []; fordiv(n, d, vd = concat(vd, digits(d))); #Set(vd) == 2; \\ Michel Marcus, Jun 13 2014
    
  • Python
    from sympy import divisors
    from itertools import count, islice, product
    def ok(n):
        s = set("1"+str(n))
        if len(s) > 2: return False
        for d in divisors(n, generator=True):
            s |= set(str(d))
            if len(s) > 2: return False
        return len(s) == 2
    def agen():
        yield from [2, 3, 5, 7]
        for d in count(2):
            s = set()
            for first, other in product("123456789", "0123456789"):
                for p in product(sorted(set(first+other)), repeat=d-1):
                    if other not in p: continue
                    t = int(first+"".join(p))
                    if ok(t): s.add(t)
            yield from sorted(s)
    print(list(islice(agen(), 52))) # Michael S. Branicky, Nov 16 2022

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

A203304 Positive numbers n such that n and phi(n) contain digits 0 and 1 only.

Original entry on oeis.org

1, 11, 101, 1111, 10111, 101111, 1011001, 1100101, 10010101, 10011101, 10100011, 10101101, 10110011, 10111001, 11000111, 11100101, 11110111, 11111101, 100100111, 100111001, 101001001, 101001011, 101100011, 101101111, 101111011, 101111111, 110010101, 110101001
Offset: 1

Views

Author

Michel Lagneau, Jan 07 2012

Keywords

Comments

The sequence A020449 (primes that contain digits 0 and 1 only) is a subsequence because if n is prime, phi(n) = n-1 also contains only digits 0 and 1. The semiprimes in the sequence are 1111, 110111111, 1111011011, 11000111111, ... (see the sequence A203897) whose prime factors are also in the sequence, and whose smallest divisor is 11 or 101, for example 110111111=11*10010101 => 11 and 10010101 are in the sequence.
What is the smallest n with a(n) <> A209930(n)? - Alois P. Heinz, Jul 16 2014
The first term after 1 that is not a prime or semiprime is a(8079) = 111100111111111111 = 11*101*100000100010001. - Robert Israel, Mar 05 2018

Examples

			1111 is in the sequence because phi(1111) = 1000 contains digits 0 and 1 only. This number is composite, 1111 = 11*101 => 11 and 101 are in the sequence.
		

Crossrefs

Programs

  • Maple
    with(numtheory): T:=array(1..64):k:=1:a:={0,1}:b:={1}: for a9 from 0 to 1 do: for a8 from 0 to 1 do: for a7 from 0 to 1 do: for a6 from 0 to 1 do: for a5 from 0 to 1 do: for a4 from 0 to 1 do: for a3 from 0 to 1 do: for a2 from 0 to 1 do: for a1 from 0 to 1 do: for a0 from 0 to 1 do:n:=a0+a1*10+a2*10^2+ a3*10^3+ a4*10^4+ a5*10^5+ a6*10^6+ a7*10^7+ a8*10^8+ a9*10^9: m:=phi(n):x:=convert(convert(m,base,10),set): if a union x = a or  a union x = b then T[k]:=n:k:=k+1:else fi:od: od: od: od: od: od: od: od: od:od: print(T):
  • Mathematica
    d = Table[FromDigits[IntegerDigits[n, 2]], {n, 10000}]; Select[d, Max[IntegerDigits[EulerPhi[#]]] == 1 &] (* T. D. Noe, Jan 11 2012 *)
    Select[FromDigits/@Tuples[{0,1},9],SubsetQ[{0,1},IntegerDigits[ EulerPhi[ #]]]&]//Rest (* Harvey P. Dale, Dec 27 2019 *)
  • PARI
    has(n)=my(d=Set(digits(n))); d[#d]<2
    is(n)=has(n) && has(eulerphi(n)) \\ Charles R Greathouse IV, Nov 25 2014

Extensions

"Positive" added by N. J. A. Sloane, Dec 27 2019
Showing 1-3 of 3 results.