OFFSET
1,2
COMMENTS
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..1000
FORMULA
a(n) <= 2^(n-1).
EXAMPLE
MATHEMATICA
seq[len_, nmax_] := Module[{s = Table[0, {len}], c = 0, n = 1, i}, While[c < len && n <= nmax, i = DivisorSum[n, DigitCount[#, 2, 1] &]/DigitCount[n, 2, 1]; If[IntegerQ[i] && i <= len && s[[i]] == 0, c++; s[[i]] = n]; n++]; TakeWhile[s, # > 0 &]]; seq[50, 10^5]
PROG
(PARI) lista(len, nmax) = {my(s = vector(len), c = 0, n = 1, i); while(c < len && n <= nmax, i = sumdiv(n, d, hammingweight(d))/hammingweight(n); if(denominator(i) == 1 && i <= len && s[i] == 0, c++; s[i] = n); n++); s }
from itertools import count, islice
def agen():
n, adict = 1, dict()
for k in count(1):
v = f(k)
if v not in adict: adict[v] = k
while n in adict: yield adict[n]; n += 1
print(list(islice(agen(), 48))) # Michael S. Branicky, Feb 15 2023
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Amiram Eldar, Feb 15 2023
STATUS
approved