OFFSET
1,2
COMMENTS
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..87
Project Euler, Problem 520: Simbers.
EXAMPLE
15 has 4 divisors: {1, 3, 5, 15} all of which are simbers integers; no positive integer smaller than 15 has four simber divisors, hence a(4) = 15.
MATHEMATICA
q[n_] := AllTrue[Tally @ IntegerDigits[n], EvenQ[Plus @@ #] &]; f[n_] := DivisorSum[n, 1 &, q[#] &]; 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[40, 10^7] (* Amiram Eldar, Jul 17 2022 *)
PROG
(PARI) issimber(m) = my(d=digits(m), s=Set(d)); for (i=1, #s, if (#select(x->(x==s[i]), d) % 2 != (s[i] % 2), return (0))); return (1); \\ A333369
a(n) = my(k=1); while (sumdiv(k, d, issimber(d)) != n, k++); k; \\ Michel Marcus, Jul 18 2022
(Python)
from sympy import divisors
from itertools import count, islice
def c(n): s = str(n); return all(s.count(d)%2 == int(d)%2 for d in set(s))
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(), 29))) # Michael S. Branicky, Jul 23 2022
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Bernard Schott, Jul 17 2022
EXTENSIONS
More terms from Amiram Eldar, Jul 17 2022
STATUS
proposed