OFFSET
1,3
COMMENTS
Sándor names this function the sum-of-divisors maximum function and remarks that this function is well-defined, since a(n) can be at least 1, and cannot be greater than n.
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..16384
Antti Karttunen, Data supplement: n, a(n) computed for n = 1..65537
Max Alekseyev, PARI/GP Scripts for Miscellaneous Math Problems (invphi.gp).
József Sándor, The sum-of-divisors minimum and maximum functions, Research Report Collection, Volume 8, Issue 1, 2005. See pp. 3-4.
FORMULA
a(p+1) = p, for p prime. See Sándor Theorem 2 p. 4.
MATHEMATICA
A319068[n_] := Module[{k = n}, While[!Divisible[n, DivisorSigma[1, k]], k--]; k];
Array[A319068, 100] (* Paolo Xausa, Dec 11 2024 *)
PROG
(PARI) a(n) = {forstep (k=n, 1, -1, if ((n % sigma(k)) == 0, return (k)); ); }
(PARI) a(n) = {my(d = divisors(n)); vecmax(vector(#d, i, invsigmaMax(d[i]))); } \\ Amiram Eldar, Nov 29 2024, using Max Alekseyev's invphi.gp
CROSSREFS
KEYWORD
nonn
AUTHOR
Michel Marcus, Sep 09 2018
STATUS
approved