login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

a(n) is the number of terms of A333369 that divide n.
4

%I #20 Jul 30 2022 12:36:49

%S 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,

%T 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,

%U 2,4,2,3,2,2,5,2,2,4,2,2,3,1,1,3,3,1,2

%N a(n) is the number of terms of A333369 that divide n.

%t q[n_] := AllTrue[Tally @ IntegerDigits[n], EvenQ[Plus @@ #] &]; a[n_] := DivisorSum[n, 1 &, q[#] &]; Array[a, 100] (* _Amiram Eldar_, Jul 16 2022 *)

%o (Python)

%o from sympy import divisors

%o def c(n): s = str(n); return all(s.count(d)%2 == int(d)%2 for d in set(s))

%o def a(n): return sum(1 for d in divisors(n, generator=True) if c(d))

%o print([a(n) for n in range(1, 88)]) # _Michael S. Branicky_, Jul 16 2022

%o (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

%o a(n) = sumdiv(n, d, issimber(d)); \\ _Michel Marcus_, Jul 18 2022

%Y Cf. A333369, A353735, A355771, A355772, A355773.

%Y Similar sequences: A083230, A087990, A087991, A332268, A355302.

%K nonn,base

%O 1,3

%A _Bernard Schott_, Jul 16 2022

%E More terms from _Michael S. Branicky_, Jul 16 2022