Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #15 Oct 11 2023 18:23:42
%S 1,2,2,2,4,2,4,4,2,2,4,4,2,2,4,4,2,8,4,4,2,8,2,6,4,4,4,2,4,4,8,2,8,2,
%T 4,2,4,2,8,4,8,4,4,2,2,4,4,8,2,4,8,2,2,4,4,8,2,4,2,4,4,4,8,2,4,4,4,4,
%U 12,2,2,8,2,8,8,4,2,2,8,4,2,8,4,4,4,16,4
%N The number of divisors of the exponentially odd numbers (A268335).
%C 1 is the only odd term in this sequence.
%H Amiram Eldar, <a href="/A366438/b366438.txt">Table of n, a(n) for n = 1..10000</a>
%F a(n) = A000005(A268335(n)).
%t f[n_] := Module[{e = FactorInteger[n][[;; , 2]]}, If[AllTrue[e, OddQ], Times @@ (e + 1), Nothing]]; f[1] = 1; Array[f, 150]
%o (PARI) lista(max) = for(k = 1, max, my(e = factor(k)[, 2], isexpodd = 1); for(i = 1, #e, if(!(e[i] % 2), isexpodd = 0; break)); if(isexpodd, print1(vecprod(apply(x -> x+1, e)), ", ")));
%o (Python)
%o from math import prod
%o from itertools import count, islice
%o from sympy import factorint
%o def A366438_gen(): # generator of terms
%o for n in count(1):
%o f = factorint(n).values()
%o if all(e&1 for e in f):
%o yield prod(e+1 for e in f)
%o A366438_list = list(islice(A366438_gen(),30)) # _Chai Wah Wu_, Oct 10 2023
%Y Cf. A000005, A268335, A366439.
%Y Similar sequences: A048691, A072048, A076400, A358040, A363194, A363195.
%K nonn,easy
%O 1,2
%A _Amiram Eldar_, Oct 10 2023