login
a(n) is the number of n-digit terms in A387866.
1

%I #21 Sep 23 2025 18:16:00

%S 0,9,46,503,6252,84201,1105270,14040589,172462528,2059008115

%N a(n) is the number of n-digit terms in A387866.

%t a[n_]:=Module[{c=0}, For[h=10^(n-1), h<10^n, h++, If[Sum[Boole[Product[Part[(digits=IntegerDigits[h]),i],{i,k}] == Product[Part[digits,i],{i,k+1,n}]],{k,n-1}]>0,c++]]; c]; Array[a,5]

%o (Python)

%o from math import prod

%o terms = [0,0,0,0,0,0,0,0,0,0,0]

%o def ok(n):

%o d = list(map(int, str(n)))

%o return any(prod(d[:i]) == prod(d[i:]) for i in range(1, len(d)))

%o start = 1

%o while 0 in terms[1:]:

%o if ok(start):

%o terms[len(str(start))-1] += 1

%o start += 1

%o print(terms)

%o # _David Consiglio, Jr._, Sep 19 2025

%Y Cf. A387866.

%K nonn,base,more

%O 1,2

%A _Stefano Spezia_, Sep 10 2025

%E a(10) from _David Consiglio, Jr._, Sep 19 2025