OFFSET
1,1
COMMENTS
From 23 to 199 only primes, then composites.
EXAMPLE
If m = 14473, let us cut the number into the set {1, 14, 144, 1447}. We have:
1' = 0;
14' = 9;
144' = 384;
1447' = 1.
Finally, 0 + 9 + 384 + 1 = 14473' = 394.
MAPLE
with(numtheory); P:=proc(q) local a, c, k, n, p;
for n from 10 to q do
a:=0; k:=1; while trunc(n/10^k)>0 do c:=trunc(n/10^k);
a:=a+c*add(op(2, p)/op(1, p), p=ifactors(c)[2]); k:=k+1; od;
if a=n*add(op(2, p)/op(1, p), p=ifactors(n)[2]) then print(n);
fi; od; end: P(10^10);
PROG
(PARI) ad(n) = vecsum([n/f[1]*f[2]|f<-factor(n+!n)~]); \\ A003415
isok(k) = my(d=digits(k)); if (#d>1, sum(i=1, #d-1, ad(fromdigits(Vec(d, i)))) == ad(k)); \\ Michel Marcus, Dec 05 2025
(Python)
from sympy import factorint
from functools import cache
@cache
def ad(n): return 0 if n < 2 else sum(e*n//p for p, e in factorint(n).items())
def ok(n): return len(s:=str(n)) > 1 and ad(n) == sum(ad(int(s[:k])) for k in range(1, len(s)))
print([k for k in range(10**5) if ok(k)]) # Michael S. Branicky, Dec 05 2025
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Paolo P. Lava, Jun 19 2014
EXTENSIONS
a(26)-a(37) and new name from Michel Marcus, Dec 05 2025
a(38)-a(39) from Michael S. Branicky, Dec 05 2025
STATUS
approved
