login
A325651
Greatest k such that sigma(k) = sigma(n).
3
1, 2, 3, 4, 5, 11, 7, 8, 9, 17, 11, 12, 13, 23, 23, 25, 17, 18, 19, 41, 31, 22, 23, 59, 25, 41, 27, 39, 29, 71, 31, 32, 47, 53, 47, 36, 37, 59, 39, 89, 41, 77, 43, 83, 45, 71, 47, 75, 49, 50, 71, 97, 53, 95, 71, 95, 79, 89, 59, 167, 61, 77, 103, 64, 83, 119
OFFSET
1,2
LINKS
EXAMPLE
a(6) = 11 because sigma(6) = sigma(11) = 12.
MATHEMATICA
a[n_] := Block[{s = DivisorSigma[1, n], k}, k=s; While[ DivisorSigma[1, k] != s, k--]; k]; Array[a, 66] (* Giovanni Resta, May 20 2019 *)
PROG
(Magma) [Max([k: k in[1..10000] | SumOfDivisors(k) eq SumOfDivisors(n)]): n in [1..100]]
(PARI) a(n) = {my(s=sigma(n)); forstep(i=s, 1, -1, if (sigma(i) == s, return(i)); ); } \\ Michel Marcus, May 12 2019
CROSSREFS
Cf. A000203, A275987 (least k such that sigma(k) = sigma(n)).
See A070242, A325652 and A325653 for number, sum and product of such numbers k.
Sequence in context: A364133 A247233 A329906 * A345451 A345320 A160000
KEYWORD
nonn
AUTHOR
Jaroslav Krizek, May 12 2019
STATUS
approved