OFFSET
1,1
LINKS
PROG
(Python)
from itertools import count, islice
def agen(): # generator of terms
n = 1
for k in count(2, 2):
s = str(k)
prefixes = [int(s[:i+1]) for i in range(len(s))]
if all(any(ki%m == 0 for ki in prefixes) for m in range(3, n+1)):
yield k; n += 1
while any(ki%n == 0 for ki in prefixes):
yield k; n += 1
print(list(islice(agen(), 20))) # Michael S. Branicky, Jun 09 2023
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Zak Seidov, Jun 03 2010
EXTENSIONS
Corrected and extended by Hugo van der Sanden, Jun 01 2010
STATUS
approved