A364859 Lesser of a pair of S-amicable numbers k < m such that s(k) = m and s(m) = k, where s(k) = A364858(k).
186, 1184, 2030, 6232, 10744, 66928, 522405, 643336, 5459176, 7677248, 13223490, 16137628, 25596544, 26090325, 28118032, 31772524, 34364912, 40504324, 133178325
Offset: 1
Examples
186 is a term since A364858(186) = 198 > 186, and A364858(198) = 186.
Programs
-
Mathematica
seq[nmax_] := Module[{s = {1}, sum, sum2, am = {}, ak}, Do[sum = Total[Select[Divisors[n], MemberQ[s, #] &]]; If[sum <= n, AppendTo[s, n]; If[sum < n, sum2 = Total[Select[Most[Divisors[sum]], MemberQ[s, #] &]]; If[sum2 == n, AppendTo[am, sum]]]], {n, 2, nmax}]; am]; seq[10^4]
-
PARI
lista(nmax) = {my(c = 0, s, s2); for(n=2, nmax, s = sumdiv(n, d, !bittest(c, d)*d) - n; if(s > n, c+=1<
M. F. Hasler at A181487
Comments