OFFSET
0,2
COMMENTS
LINKS
Amiram Eldar, Table of n, a(n) for n = 0..50
EXAMPLE
a(1) = 4 since 4 is the least number with exactly one noninfinitary divisor, 2.
MATHEMATICA
f[1] = 0; f[n_] := DivisorSigma[0, n] - Times @@ Flatten[2^DigitCount[#, 2, 1] & /@ FactorInteger[n][[;; , 2]]];
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[35, 10^7]
PROG
(PARI) s(n) = {my(f = factor(n)); numdiv(f) - prod(i = 1, #f~, 2^hammingweight(f[i, 2])); }
lista(len, nmax) = {my(v = vector(len), c = 0, n = 1, i); while(c < len && n < nmax, i = s(n) + 1; if(i <= len && v[i] == 0, c++; v[i] = n); n++); v};
CROSSREFS
KEYWORD
nonn
AUTHOR
Amiram Eldar, Mar 11 2023
STATUS
approved