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

A383749 Positive numbers k whose decimal expansion does not contain the decimal expansion of any proper divisor of k.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 23, 27, 29, 34, 37, 38, 43, 46, 47, 49, 53, 54, 56, 57, 58, 59, 67, 68, 69, 73, 74, 76, 78, 79, 83, 86, 87, 89, 94, 97, 98, 203, 207, 209, 223, 227, 229, 233, 239, 247, 249, 253, 257, 259, 263, 267, 269, 277, 283, 289, 293, 299, 307
Offset: 1

Views

Author

Rémy Sigrist, May 08 2025

Keywords

Comments

Also fixed points of A121042.
This sequence is infinite as it contains A173041.
a(n) > 5 contains no decimal digit 1 and does not end in 2 or 5. - Michael S. Branicky, May 11 2025

Examples

			The proper divisors of 54 are 1, 2, 3, 6, 9, 18 and 27; none of them appear in the decimal expansion of 54 so 54 belongs to this sequence.
		

Crossrefs

A038603 and A173041 are subsequences.

Programs

  • Mathematica
    A383749Q[k_] := SelectFirst[Divisors[k], StringContainsQ[IntegerString[k], IntegerString[#]] &] == k;
    Select[Range[500], A383749Q] (* Paolo Xausa, May 12 2025 *)
  • PARI
    is(n, base = 10) = {
        my (d = digits(n, base));
        for (i = 1, #d,
            if (d[i],
                for (j = i, #d,
                    if ((i!=1 || j!=#d) && n % fromdigits(d[i..j], base)==0,
                        return (0);););););
        return (1);}
    
  • Python
    from itertools import count, islice
    from sympy import divisors
    def A383749_gen(startvalue=1): # generator of terms >= startvalue
        return filter(lambda n:not any(dA383749_list = list(islice(A383749_gen(),40)) # Chai Wah Wu, May 10 2025
    
  • Python
    def ok(n):
        s = str(n)
        subs = (s[i:j] for i in range(len(s)) for j in range(i+1, len(s)+1) if s[i]!='0')
        return n and not any(n%v == 0 for ss in subs if n > (v:=int(ss)) > 0)
    print([k for k in range(308) if ok(k)]) # Michael S. Branicky, May 11 2025
Showing 1-1 of 1 results.