%I #31 Oct 31 2022 05:55:32
%S 1,2,4,8,16,28,64,56,84,112,1024,168,4096,448,336,728,36309,672,57057,
%T 1456,1344,7168,105105,2184,6384,24150,5376,5208,405405,4368,389025,
%U 11648,20020,72618,10416,8736,927675,114114,48300,24024,855855,17472,1426425,40040
%N a(n) is the smallest number that has exactly n odious divisors (A000069).
%C a(n) <= 2^(n-1) with equality for n = 1, 2, 3, 4, 5, 7, 11, 13 up to a(44).
%H Amiram Eldar, <a href="/A355968/b355968.txt">Table of n, a(n) for n = 1..100</a>
%e a(6) = 28 since 28 has 6 divisors {1, 2, 4, 7, 14, 28} that have all an odd number of 1's in their binary expansion: 1, 10, 100, 111, 1110 and 11100; also, no positive integer smaller than 28 has six divisors that are odious.
%t f[n_] := DivisorSum[n, 1 &, OddQ[DigitCount[#, 2, 1]] &]; seq[len_, nmax_] := Module[{s = Table[0, {len}], c = 0, n = 1, i}, While[c < len && n < nmax, i = f[n]; If[i <= len && s[[i]] == 0, c++; s[[i]] = n]; n++]; s]; seq[20, 10^6] (* _Amiram Eldar_, Jul 21 2022 *)
%o (PARI) isod(n) = hammingweight(n) % 2; \\ A000069
%o a(n) = my(k=1); while (sumdiv(k, d, isod(d)) != n, k++); k; \\ _Michel Marcus_, Jul 22 2022
%o (Python)
%o from sympy import divisors
%o from itertools import count, islice
%o def c(n): return bin(n).count("1")&1
%o def f(n): return sum(1 for d in divisors(n, generator=True) if c(d))
%o def agen():
%o n, adict = 1, dict()
%o for k in count(1):
%o fk = f(k)
%o if fk not in adict: adict[fk] = k
%o while n in adict: yield adict[n]; n += 1
%o print(list(islice(agen(), 36))) # _Michael S. Branicky_, Jul 25 2022
%Y Cf. A000069, A093696, A227872, A330289, A355969.
%Y Similar sequences: A087997, A333456, A355303, A355699.
%K nonn,base
%O 1,2
%A _Bernard Schott_, Jul 21 2022
%E More terms from _Amiram Eldar_, Jul 21 2022