A081522 Last term in row n of A081521.
1, 3, 7, 7, 8, 17, 12, 15, 22, 29, 20
Offset: 1
Extensions
a(8)-a(11) from Jinyuan Wang, May 24 2020
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.
a(n) = {my(m=n*(n-1)/2, v); forstep(k=m+n/(2-n%2), oo, n, v=List([]); for(i=2, k-m, if(gcd(n, i)==1, listput(v, i))); if(#v>n-2, forsubset([#v, n-1], w, if(r=1+sum(i=1, n-1, v[w[i]])==k, return(k))))); } \\ Jinyuan Wang, May 23 2020
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.
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
(* This partly empirical program is just a recomputation of existing data. *) 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]]; 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]]]]; Table[Print[n, " ", a[n]]; a[n], {n, 1, 49}] (* Jean-François Alcover, Oct 21 2024 *)
The lexicographically earliest solutions are: ..n....m: d_1 d_2 ... d_n ------------------------- ..1....1: 1 ..2....0: - - ..3....6: 1, 2, 3 ..4...12: 1, 2, 3, 6 ..5...24: 1, 2, 3, 6, 12 ..6...24: 1, 2, 3, 4, 6, 8 ..7...48: 1, 2, 3, 4, 6, 8, 24 ..8...60: 1, 2, 3, 4, 5, 10, 15, 20 ..9...84: 1, 2, 3, 4, 6, 7, 12, 21, 28 .10..120: 1, 2, 3, 4, 5, 6, 15, 20, 24, 40 ...
Comments