This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A380849 #9 Feb 07 2025 00:44:34 %S A380849 27940,112420,150368,156840,225060,450340,569376,925920,1102200, %T A380849 1211232,1802020,2196592,2423648,3377640,3604260,4612644,4874400, %U A380849 4949160,5092440,6375336,6632808,6786340,7155940,7208740,7626900,7685128,9443060,9569780,9643400,9678020 %N A380849 Lesser of a pair of amicable numbers k < m such that s(k) = m and s(m) = k, where s(k) = A380845(k) - k is the sum of aliquot divisors of k that have the same binary weight as k. %C A380849 Analogous to amicable numbers (A002025 and A002046) with A380845 instead of A000203. %C A380849 The larger counterparts are in A380850. %H A380849 Amiram Eldar, <a href="/A380849/b380849.txt">Table of n, a(n) for n = 1..12000</a> %e A380849 27940 is a term since A380845(27940) - 27940 = 36068 > 27940 and A380845(36068) - 36068 = 27940. %t A380849 f[n_] := Module[{h = DigitCount[n, 2, 1]}, DivisorSum[n, # &, # < n && DigitCount[#, 2, 1] == h &]]; %t A380849 seq[lim_] := Module[{s = {}, m}, Do[m = f[n]; If[m > n && f[m] == n, AppendTo[s, n]], {n, 1, lim}]; s]; seq[10^6] %o A380849 (PARI) f(n) = {my(h = hammingweight(n)); sumdiv(n, d, d * (d < n && hammingweight(d) == h));} %o A380849 list(lim) = {my(m); for(n = 1, lim, m = f(n); if(m > n && f(m) == n, print1(n, ", ")));} %Y A380849 Cf. A000203, A002025, A002046, A380845, A380846, A380850. %K A380849 nonn,base %O A380849 1,1 %A A380849 _Amiram Eldar_, Feb 05 2025