OFFSET
0,1
EXAMPLE
a(0)=4 since 4_d = 100_b and its largest proper divisor is 2_d = 10_b is a substring and 4 is not prime. a(2) = 55 since 55_d = 110111_b and its largest proper divisor is 11_d = 1011_b is a substring and 55 is not prime nor congruent to 0 (modulo either 2 or 3). a(4) = 407 since 407_d = 110010111_b and its largest proper divisor is 37_d = 100101_b is a substring and 407 is not prime nor congruent to 0 (modulo either 2, 3, 5, or 7).
MATHEMATICA
a = {}; k = 1; Do[p = Table[ Prime[i], {i, 1, n}]; While[ PrimeQ[k] || Sort[Mod[k, p]] [[1]] == 0 || StringPosition[ ToString[ FromDigits[ IntegerDigits[k, 2]]], ToString[ FromDigits[ IntegerDigits[ Divisors[k] [[ -2]], 2]] ]] == {}, k++ ]; a = Append[a, k], {n, 0, 100}]; a
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Robert G. Wilson v, Nov 13 2002
STATUS
approved