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 A081512 #55 Oct 24 2024 09:24:36 %S A081512 1,0,6,12,24,24,48,60,84,120,120,120,180,180,240,360,360,360,360,672, %T A081512 720,720,720,840,840,1080,1260,1260,1260,1680,1680,1680,2160,2520, %U A081512 2520,2520,2520,2520,2520,3360,4320,5040,5040,5040,5040,5040,5040,5040,5040 %N A081512 a(n) = smallest number which can be expressed as the sum of n of its distinct divisors, or 0 if no such number exists. %C A081512 In other words, a(n) is the smallest number m such that m has n distinct divisors d_1, ..., d_n such that d_1+...+d_n = m. (The d_i do not need to be ALL the divisors of m.) For example, a(6) = m = 24, since the divisors of 24 are 1,2,3,4,6,8,12,24, and 1+2+3+4+6+8=24. %C A081512 a(2) = 0. All other entries are nonzero. %C A081512 In the following triangle the n-th row gives examples of the n divisors a(1), ..., a(7); a(n) = sum of the n-th row: %C A081512 1 %C A081512 - - %C A081512 1 2 3 %C A081512 1 2 3 6 %C A081512 1 2 3 6 12 %C A081512 1 2 3 4 6 8 %C A081512 1 2 3 6 8 12 16 %C A081512 For a given values of a(n) = m, however, there may be more than one way to choose d_1, ..., d_n so that d_1+...+d_n = m. %C A081512 For n=10, a(10)=120, for example, there are the following equally valid solutions: %C A081512 [1, 2, 3, 4, 5, 6, 15, 20, 24, 40] %C A081512 [1, 2, 3, 4, 5, 8, 10, 12, 15, 60] %C A081512 [1, 2, 3, 4, 5, 8, 12, 15, 30, 40] %C A081512 [1, 2, 3, 4, 6, 8, 12, 20, 24, 40] %C A081512 [1, 2, 3, 5, 6, 8, 10, 15, 30, 40] %C A081512 [1, 2, 3, 5, 8, 10, 12, 15, 24, 40] %C A081512 [1, 2, 3, 5, 8, 12, 15, 20, 24, 30] %C A081512 [1, 2, 4, 5, 6, 8, 10, 20, 24, 40] %C A081512 [1, 2, 4, 6, 8, 10, 15, 20, 24, 30] %C A081512 [1, 3, 4, 5, 6, 10, 12, 15, 24, 40] %C A081512 [1, 3, 4, 5, 6, 12, 15, 20, 24, 30] %C A081512 [1, 3, 4, 5, 8, 10, 15, 20, 24, 30] %C A081512 [1, 3, 5, 6, 8, 10, 12, 15, 20, 40] %C A081512 [1, 4, 5, 6, 8, 10, 12, 20, 24, 30] %C A081512 [2, 3, 4, 5, 6, 8, 10, 12, 30, 40] %C A081512 [2, 3, 4, 6, 8, 10, 12, 15, 20, 40] %C A081512 [2, 3, 5, 6, 8, 10, 12, 20, 24, 30] %C A081512 (These solutions were provided by _Jinyuan Wang_.) %C A081512 The lexicographically earliest solution is given as the n-th row of the triangle in A081514. The corresponding value d_n is given in A081513. %C A081512 The lexicographically earliest solutions are: %C A081512 ..n....m: d_1 d_2 ... d_n %C A081512 ------------------------- %C A081512 ..1....1: 1 %C A081512 ..2....0: - - %C A081512 ..3....6: 1, 2, 3 %C A081512 ..4...12: 1, 2, 3, 6 %C A081512 ..5...24: 1, 2, 3, 6, 12 %C A081512 ..6...24: 1, 2, 3, 4, 6, 8 %C A081512 ..7...48: 1, 2, 3, 4, 6, 8, 24 %C A081512 ..8...60: 1, 2, 3, 4, 5, 10, 15, 20 %C A081512 ..9...84: 1, 2, 3, 4, 6, 7, 12, 21, 28 %C A081512 .10..120: 1, 2, 3, 4, 5, 6, 15, 20, 24, 40 %C A081512 ... %H A081512 David A. Corneth, <a href="/A081512/b081512.txt">Table of n, a(n) for n = 1..552</a> (first 144 terms from Robert Israel) %e A081512 24 is a sum of 6 of its divisors. Namely, 1+2+3+4+6+8=24. Furthermore, 24 is the smallest natural number with at least 6 divisors (not including itself), so it must be the smallest natural number that is a sum of 6 of its divisors. %p A081512 A081512 := proc(n) local a, dvs, dset,s,p; if n= 2 then RETURN(0) ; end if; for a from 1 do dvs := numtheory[divisors](a) ; dset := combinat[choose](dvs,n) ; for s in dset do if add(p,p=s) = a then RETURN(a) ; end if; end do; end do: end: for n from 2 do a := A081512(n) ; printf("%d, ",a) ; od: # _R. J. Mathar_, Nov 11 2008 %t A081512 (* This partly empirical program is just a recomputation of existing data. *) %t A081512 f[n_, k_] := Module[{c, cc, dd}, dd = Most@ Divisors@k; cc = c[#]& /@ Range@ Length@dd; FindInstance[AllTrue[cc, 0 <= # <= 1&] && cc.dd == k && Total[cc] == n, cc, Integers, 1]]; %t A081512 a[n_] := a[n] = Switch[n, 1, 1, 2, 0, 3, 6, _, For[k = a[n - 1], True, k = k + If[n < 25, 1, 60], If[f[n, k] != {}, Return[k]]]]; %t A081512 Table[Print[n, " ", a[n]]; a[n], {n, 1, 49}] (* _Jean-François Alcover_, Oct 21 2024 *) %Y A081512 Cf. A033630, A081513, A081514. %Y A081512 See also A081515, A081516, A081517, A081521. %K A081512 nonn %O A081512 1,3 %A A081512 _Amarnath Murthy_, Mar 27 2003 %E A081512 Corrected by Caleb M. Shor (cshor(AT)bates.edu), Sep 26 2007 %E A081512 Extended beyond a(7) by _R. J. Mathar_, Nov 11 2008 %E A081512 a(16)-a(49) from _Max Alekseyev_, Jul 27 2009 %E A081512 Edited by _N. J. A. Sloane_, May 24 2020, following advice from _Jinyuan Wang_.