OFFSET
1,2
COMMENTS
Corresponding records of number of odious divisors are 1, 2, 3, 4, 5, 6, 8, 9, 10, 12, 15, ...
EXAMPLE
MATHEMATICA
f[n_] := DivisorSum[n, 1 &, OddQ[DigitCount[#, 2, 1]] &]; fm = -1; s = {}; Do[If[(fn = f[n]) > fm, fm = fn; AppendTo[s, n]], {n, 1, 10^5}]; s (* Amiram Eldar, Jul 22 2022 *)
PROG
(PARI) lista(nn)= my(list = List(), m=0, new); for (n=1, nn, new = sumdiv(n, d, isod(d)); if (new > m, listput(list, n); m = new); ); Vec(list); \\ 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(record=-1):
for k in count(1):
if f(k) > record: record = f(k); yield k
print(list(islice(agen(), 30))) # Michael S. Branicky, Jul 23 2022
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Bernard Schott, Jul 22 2022
EXTENSIONS
More terms from Amiram Eldar, Jul 22 2022
STATUS
approved