OFFSET
0,2
LINKS
David A. Corneth, Table of n, a(n) for n = 0..396
David A. Corneth, Upperbounds on a(n), terms <= 8*10^9 are certain
FORMULA
a(n) <= A356040(n). - David A. Corneth, Jul 26 2022
EXAMPLE
a(4) = 18 since 18 has six divisors: {1, 2, 3, 6, 9, 18} of which four {3, 6, 9, 18} have an even number of 1's in their binary expansion: 11, 110, 1001 and 10010 respectively; also, no positive integer smaller than 18 has exactly four divisors that are evil.
MAPLE
# output in unsorted b-file style
A356019_list := [seq(0, i=1..1000)] ;
for n from 1 do
evd := A356018(n) ;
if evd < nops(A356019_list) then
if op(evd+1, A356019_list) <= 0 then
printf("%d %d\n", evd, n) ;
end if;
end if;
end do: # R. J. Mathar, Aug 07 2022
MATHEMATICA
f[n_] := DivisorSum[n, 1 &, EvenQ[DigitCount[#, 2, 1]] &]; seq[len_, nmax_] := Module[{s = Table[0, {len}], c = 0, n = 1, i}, While[c < len && n < nmax, i = f[n] + 1; If[i <= len && s[[i]] == 0, c++; s[[i]] = n]; n++]; s]; seq[50, 10^6] (* Amiram Eldar, Jul 23 2022 *)
PROG
(Python)
from sympy import divisors
from itertools import count, islice
def c(n): return bin(n).count("1")&1 == 0
def f(n): return sum(1 for d in divisors(n, generator=True) if c(d))
def agen():
n, adict = 0, 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(), 50))) # Michael S. Branicky, Jul 23 2022
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Bernard Schott, Jul 23 2022
EXTENSIONS
More terms from Amiram Eldar, Jul 23 2022
STATUS
approved