OFFSET
1,1
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..10000
PROG
(Python)
from itertools import count, islice
from math import prod
def A361338(n):
c, d, m = {n}, set(), 0
while True:
c = set(prod(divmod(k, s)) for k in c for i in range(1, len(str(k))) if k%(s:=(r:=10**(i-1))*10)>=r or i==1)
d |= c
if (r:=len(d)) == m:
return sum(1 for q in d if q<10)
m = r
def A361349_gen(startvalue=1): # generator of terms >= startvalue
return filter(lambda n:A361338(n)==10, count(max(startvalue, 1)))
(Python)
from functools import lru_cache
from itertools import count, islice
@lru_cache(maxsize=None)
def f(n):
if n < 10: return {n}
s = str(n)
return {e for i in range(1, len(s)) if s[i]!="0" or i==len(s)-1 for e in f(int(s[:i])*int(s[i:]))}
def agen(): # generator of terms
yield from (k for k in count() if len(f(k)) == 10)
print(list(islice(agen(), 38))) # Michael S. Branicky, Apr 05 2023
CROSSREFS
KEYWORD
nonn,base
AUTHOR
N. J. A. Sloane, Apr 05 2023
EXTENSIONS
a(4)-a(38) from Chai Wah Wu, Apr 05 2023
STATUS
approved