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 A269781 #53 Sep 24 2018 02:40:54 %S A269781 4,3,16,4,64,24,36,16,1024,6,4096,64,4,5,65536,12,262144,6,4,1024, %T A269781 4194304,8,81,4096,4,6,268435456,16,1073741824,6,4,65536,16,9, %U A269781 68719476736,262144,4,8,1099511627776,32,4398046511104,6,36,4194304,70368744177664,10,729,48,4,6,4503599627370496,32,16,8 %N A269781 a(n) is the smallest k different from n such that (n, k) is an amicably refactorable pair (see the comments). %C A269781 Let m and k be distinct integers and numdiv(n) be the number of divisors of n (A000005(n)). We call m and k amicably refactorable if numdiv(m) divides k and numdiv(k) divides m. %C A269781 For any n with no amicably refactorable partner, a(n) = 0. %C A269781 Conjecture: the sequence contains no zeros. %C A269781 1 does not have an amicable partner as all other numbers have more than one divisor and 2 does not have an amicable partner as all other numbers with two divisors are odd primes and cannot be divided by the number of divisors of 2, also 2. All other numbers may have an amicably refactorable partner, though for some, primes, semiprimes and squares of primes in particular, this number can be quite large. %C A269781 For primes and semiprimes, a(n) = 2^(f(n) - 1), (see A061286), where f(n) is their largest prime factor. For squares of primes, a(n) = 3^(|sqrt(n)| - 1), except for n = 9 for which this formula yields 9; this forces us to choose the next best candidate: 36. %e A269781 For n=5, a(5)=16 as the number of divisors of n (2) divides a(n) while the number of divisors of a(n) (5) divides 5 and 16 is the smallest number for which this happens. %t A269781 A269781 = {}; Do[k = 1; If[PrimeQ[n] || PrimeNu[n] == 2 && PrimeOmega[n] == 2, AppendTo[A269781, 2^(First[Last[FactorInteger[n]]] - 1)], If[PrimeQ @ Sqrt @ n && (n > 9), AppendTo[A269781, 3^(Sqrt[n] - 1)],While[k != n && !(Divisible[n, DivisorSigma[0, k]] && Divisible[k, DivisorSigma[0, n]]), k++]; If[k == n, k = n + 1; While[!(Divisible[n, DivisorSigma[0, k]] && Divisible[k, DivisorSigma[0, n]]), k++]]; AppendTo[A269781, k]]], {n, 3, 56}]; A269781 %Y A269781 Cf. A000005 (number of divisors), A033950 (refactorable numbers), A061286 (subsequence for odd prime indices and semiprime indices), A268037, A272353 (related sequences). %K A269781 nonn %O A269781 3,1 %A A269781 _Waldemar Puszkarz_, May 01 2016