login
A355968
a(n) is the smallest number that has exactly n odious divisors (A000069).
5
1, 2, 4, 8, 16, 28, 64, 56, 84, 112, 1024, 168, 4096, 448, 336, 728, 36309, 672, 57057, 1456, 1344, 7168, 105105, 2184, 6384, 24150, 5376, 5208, 405405, 4368, 389025, 11648, 20020, 72618, 10416, 8736, 927675, 114114, 48300, 24024, 855855, 17472, 1426425, 40040
OFFSET
1,2
COMMENTS
a(n) <= 2^(n-1) with equality for n = 1, 2, 3, 4, 5, 7, 11, 13 up to a(44).
LINKS
EXAMPLE
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.
MATHEMATICA
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 *)
PROG
(PARI) isod(n) = hammingweight(n) % 2; \\ A000069
a(n) = my(k=1); while (sumdiv(k, d, isod(d)) != n, k++); k; \\ Michel Marcus, Jul 22 2022
(Python)
from sympy import divisors
from itertools import count, islice
def c(n): return bin(n).count("1")&1
def f(n): return sum(1 for d in divisors(n, generator=True) if c(d))
def agen():
n, adict = 1, dict()
for k in count(1):
fk = f(k)
if fk not in adict: adict[fk] = k
while n in adict: yield adict[n]; n += 1
print(list(islice(agen(), 36))) # Michael S. Branicky, Jul 25 2022
CROSSREFS
Similar sequences: A087997, A333456, A355303, A355699.
Sequence in context: A357763 A330289 A348413 * A177269 A018726 A049884
KEYWORD
nonn,base
AUTHOR
Bernard Schott, Jul 21 2022
EXTENSIONS
More terms from Amiram Eldar, Jul 21 2022
STATUS
approved