login
A355770
a(n) is the number of terms of A333369 that divide n.
4
1, 1, 2, 1, 2, 2, 2, 1, 3, 2, 1, 2, 2, 2, 4, 1, 2, 3, 2, 2, 3, 2, 1, 2, 2, 2, 3, 2, 1, 4, 2, 1, 2, 2, 4, 3, 2, 2, 4, 2, 1, 3, 1, 3, 5, 1, 1, 2, 2, 2, 4, 2, 2, 3, 2, 2, 4, 1, 2, 4, 1, 2, 4, 1, 3, 4, 1, 2, 2, 4, 2, 3, 2, 2, 5, 2, 2, 4, 2, 2, 3, 1, 1, 3, 3, 1, 2
OFFSET
1,3
MATHEMATICA
q[n_] := AllTrue[Tally @ IntegerDigits[n], EvenQ[Plus @@ #] &]; a[n_] := DivisorSum[n, 1 &, q[#] &]; Array[a, 100] (* Amiram Eldar, Jul 16 2022 *)
PROG
(Python)
from sympy import divisors
def c(n): s = str(n); return all(s.count(d)%2 == int(d)%2 for d in 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, 88)]) # Michael S. Branicky, Jul 16 2022
(PARI) issimber(m) = my(d=digits(m), s=Set(d)); for (i=1, #s, if (#select(x->(x==s[i]), d) % 2 != (s[i] % 2), return (0))); return (1); \\ A333369
a(n) = sumdiv(n, d, issimber(d)); \\ Michel Marcus, Jul 18 2022
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Bernard Schott, Jul 16 2022
EXTENSIONS
More terms from Michael S. Branicky, Jul 16 2022
STATUS
approved