OFFSET
1,1
COMMENTS
For all k, let s(k) = sigma(k) - k, the aliquot sum function A001065; then this sequence is the set of k such that s(s(k)) = k. - Jeppe Stig Nielsen, Jan 12 2020
LINKS
Giovanni Resta, Table of n, a(n) for n = 1..10000 (first 1000 terms from Amiram Eldar)
Eric Weisstein's World of Mathematics, Perfect Number
Eric Weisstein's World of Mathematics, Amicable Pair
Wikipedia, Perfect number
Wikipedia, Amicable number
EXAMPLE
220 is in the sequence because sigma(220) = 504, sigma(504 - 220) = sigma(284) = 504.
MAPLE
q:= n-> (s-> s(n)=s(s(n)-n))(numtheory[sigma]):
select(q, [$1..100000])[]; # Alois P. Heinz, Jan 31 2023
MATHEMATICA
Select[Range[10^6], DivisorSigma[1, #]==DivisorSigma[1, DivisorSigma[1, #]-#]&]
PROG
(PARI) isok(k) = if (k != 1, my(sk=sigma(k)); sk == sigma(sk-k)); \\ Michel Marcus, Jun 24 2019
(Magma) [k:k in [2..154000]|s eq DivisorSigma(1, s-k) where s is DivisorSigma(1, k)]; // Marius A. Burtea, Jan 13 2020
CROSSREFS
KEYWORD
nonn
AUTHOR
Michel Lagneau, Feb 11 2012
STATUS
approved