A383749 Positive numbers k whose decimal expansion does not contain the decimal expansion of any proper divisor of k.
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
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.
Links
- Rémy Sigrist, Table of n, a(n) for n = 1..10000
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(d
A383749_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
Comments