OFFSET
1,2
COMMENTS
A subsequence of A092911 (all divisors can be formed using the digits of the number) which is a subsequence of A011531 (numbers having the digit 1).
Are 1 and 125 the only nonprime terms in this sequence?
No: 17692313, 4482669527413081, 21465097175420089, and 567533481816008761 are members. - Charles R Greathouse IV, Mar 09 2014
LINKS
EXAMPLE
All primes having the digit 1 (A208270) are in this sequence, because {1, p} are the only divisors of a prime p.
The divisors of 125 are {1, 5, 25, 125}; it can be seen that all of them occur as a substring in 125, therefore 125 is in this sequence.
PROG
(PARI) is(n, d=vecextract(divisors(n), "^-1"))={ setminus(select(x->x<10, d), Set(digits(n)))&&return; !for(L=2, #Str(d[#d]), setminus(select(x->x
<10^L&&x>=10^(L-1), d), Set(concat(vector(L, o, digits(n\10^(L-o), 10^L)))))&&return)}
(PARI) overlap(long, short)=my(D=10^#digits(short)); while(long>=short, if(long%D==short, return(1)); long\=10); 0
is(n)=my(d=divisors(n)); forstep(i=#d-1, 1, -1, if(!overlap(n, d[i]), return(0))); 1 \\ Charles R Greathouse IV, Mar 09 2014
CROSSREFS
KEYWORD
nonn,base
AUTHOR
M. F. Hasler, Mar 09 2014
STATUS
approved