OFFSET
1,2
COMMENTS
FORMULA
G.f.: Sum_{n in A009993} x^n/(1-x^n). - Robert Israel, Sep 16 2022
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = Sum_{n=2..512} 1/A009993(n) = 4.47614714667538759358... (this is a rational number whose numerator and denominator have 1037 and 1036 digits, respectively). - Amiram Eldar, Jan 06 2024
EXAMPLE
22 has 4 divisors {1, 2, 11, 22} of which two have decimal digits that are not in strictly increasing order: {11, 22}, hence a(22) = 4-2 = 2.
52 has divisors {1, 2, 4, 13, 26, 52} and a(52) = 5 of them have decimal digits that are in strictly increasing order (all except 52 itself).
MAPLE
f:= proc(n) local d, L, i, t;
t:= 0;
for d in numtheory:-divisors(n) do
L:= convert(d, base, 10);
if `and`(seq(L[i]>L[i+1], i=1..nops(L)-1)) then t:= t+1 fi
od;
t
end proc:
map(f, [$1..100]); # Robert Israel, Sep 16 2022
MATHEMATICA
a[n_] := DivisorSum[n, 1 &, Less @@ IntegerDigits[#] &]; Array[a, 100] (* Amiram Eldar, Sep 16 2022 *)
PROG
(PARI) isok(d) = Set(d=digits(d)) == d; \\ A009993
a(n) = sumdiv(n, d, isok(d)); \\ Michel Marcus, Sep 16 2022
(Python)
from sympy import divisors
def c(n): s = str(n); return s == "".join(sorted(set(s)))
def a(n): return sum(1 for d in divisors(n, generator=True) if c(d))
print([a(n) for n in range(1, 101)]) # Michael S. Branicky, Sep 16 2022
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Bernard Schott, Sep 16 2022
STATUS
approved