login
A341879
a(n) is the largest d(k) such that sigma(k) = n, where d is the number of divisor function and sigma is the sum of divisors function.
1
1, 0, 2, 2, 0, 2, 3, 2, 0, 0, 0, 4, 3, 2, 4, 0, 0, 4, 0, 2, 0, 0, 0, 4, 0, 0, 0, 6, 0, 2, 5, 4, 0, 0, 0, 4, 0, 2, 6, 4, 0, 6, 0, 2, 0, 0, 0, 4, 0, 0, 0, 0, 0, 4, 0, 6, 3, 0, 0, 8, 0, 2, 6, 0, 0, 0, 0, 2, 0, 0, 0, 8, 0, 2, 0, 0, 0, 6, 0, 4, 0, 0, 0, 6, 0, 0, 0, 0, 0, 8, 9, 0, 6, 0, 0, 8, 0, 6, 0, 0, 0, 2, 0, 6, 0
OFFSET
1,3
LINKS
EXAMPLE
k that satisfies sigma(k) = 12 is 6 or 11. d(6) = 4 and d(11) = 2. So a(12) = 4.
MATHEMATICA
a[n_] := Module[{dmax = 0}, Do[If[DivisorSigma[1, k] == n && (d = DivisorSigma[0, k]) > dmax, dmax = d], {k, 1, n}]; dmax]; Array[a, 100] (* Amiram Eldar, Apr 28 2021 *)
PROG
(PARI) a(n) = my(m=0); for(k=1, n, if(sigma(k)==n, m=max(m, numdiv(k)))); m;
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Seiichi Manyama, Feb 22 2021
STATUS
approved