cp's OEIS Frontend

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.

Showing 1-4 of 4 results.

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.

Original entry on oeis.org

1, 0, 6, 12, 24, 24, 48, 60, 84, 120, 120, 120, 180, 180, 240, 360, 360, 360, 360, 672, 720, 720, 720, 840, 840, 1080, 1260, 1260, 1260, 1680, 1680, 1680, 2160, 2520, 2520, 2520, 2520, 2520, 2520, 3360, 4320, 5040, 5040, 5040, 5040, 5040, 5040, 5040, 5040
Offset: 1

Views

Author

Amarnath Murthy, Mar 27 2003

Keywords

Comments

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.
a(2) = 0. All other entries are nonzero.
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:
1
- -
1 2 3
1 2 3 6
1 2 3 6 12
1 2 3 4 6 8
1 2 3 6 8 12 16
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.
For n=10, a(10)=120, for example, there are the following equally valid solutions:
[1, 2, 3, 4, 5, 6, 15, 20, 24, 40]
[1, 2, 3, 4, 5, 8, 10, 12, 15, 60]
[1, 2, 3, 4, 5, 8, 12, 15, 30, 40]
[1, 2, 3, 4, 6, 8, 12, 20, 24, 40]
[1, 2, 3, 5, 6, 8, 10, 15, 30, 40]
[1, 2, 3, 5, 8, 10, 12, 15, 24, 40]
[1, 2, 3, 5, 8, 12, 15, 20, 24, 30]
[1, 2, 4, 5, 6, 8, 10, 20, 24, 40]
[1, 2, 4, 6, 8, 10, 15, 20, 24, 30]
[1, 3, 4, 5, 6, 10, 12, 15, 24, 40]
[1, 3, 4, 5, 6, 12, 15, 20, 24, 30]
[1, 3, 4, 5, 8, 10, 15, 20, 24, 30]
[1, 3, 5, 6, 8, 10, 12, 15, 20, 40]
[1, 4, 5, 6, 8, 10, 12, 20, 24, 30]
[2, 3, 4, 5, 6, 8, 10, 12, 30, 40]
[2, 3, 4, 6, 8, 10, 12, 15, 20, 40]
[2, 3, 5, 6, 8, 10, 12, 20, 24, 30]
(These solutions were provided by Jinyuan Wang.)
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.
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
...

Examples

			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.
		

Crossrefs

Programs

  • Maple
    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
  • Mathematica
    (* 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 *)

Extensions

Corrected by Caleb M. Shor (cshor(AT)bates.edu), Sep 26 2007
Extended beyond a(7) by R. J. Mathar, Nov 11 2008
a(16)-a(49) from Max Alekseyev, Jul 27 2009
Edited by N. J. A. Sloane, May 24 2020, following advice from Jinyuan Wang.

A081517 Consider the smallest number m which can be expressed as the sum of n distinct numbers coprime to m. Sequence gives triangle (read by rows) of the set of coprime numbers pertaining to m. When there is a choice, use the lexicographically earliest solution.

Original entry on oeis.org

1, 1, 2, 1, 2, 4, 1, 2, 3, 5, 1, 2, 3, 4, 7, 1, 2, 3, 4, 5, 8, 1, 2, 3, 4, 5, 6, 8, 1, 2, 3, 4, 5, 6, 7, 9, 1, 2, 3, 4, 5, 6, 7, 8, 11, 1, 2, 3, 4, 5, 6, 7, 8, 9, 14, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 19
Offset: 1

Views

Author

Amarnath Murthy, Mar 27 2003

Keywords

Comments

For n >= 2, it appears that m is the least prime >= n*(n+1)/2, and row n consists of
1,2,3,...,n-1 and m - n*(n-1)/2. Robert Israel, Dec 22 2024

Examples

			Triangle begins:
1;
1,2;
1,2,4;
1,2,3,5;
1,2,3,4,7;
1,2,3,4,5,8;
		

Crossrefs

Programs

  • Maple
    g:= proc(S,m,n) # lex-first sublist of sorted list S of size n with sum m, or FAIL
        option remember;
        local nS,i,v;
        nS:= nops(S);
        if nS < n or convert(S[1..n],`+`) > m or convert(S[-n .. -1],`+`) < m then return FAIL fi;
        if n = 0 then if m = 0 then return [] else return FAIL fi fi;
        for i from 1 to nS while S[i] <= m do
           v:= procname(S[i+1..-1],m-S[i],n-1);
           if v <> FAIL then return [S[i],op(v)] fi
        od;
        FAIL
    end proc:
    f:= proc(n) local m,v;
       for m from 1 do
         v:= g(select(t -> igcd(t,m) = 1, [$1..m]),m,n);
         if v <> FAIL then return op(v) fi
       od
    end proc:
    for n from 1 to 20 do f(n) od; # Robert Israel, Dec 22 2024
  • PARI
    row(n) = {my(m=n*(n-1)/2, v); for(k=m+n, oo, v=List([1]); for(i=2, k-m, if(gcd(k, i)==1, listput(v, i))); if(#v>=n, forsubset([#v, n], w, if(sum(i=1, n, v[w[i]])==k, return(vector(n, i, v[w[i]])))))); } \\ Jinyuan Wang, May 23 2020

Extensions

More terms from R. J. Mathar, Mar 23 2007
More terms from Jinyuan Wang, May 23 2020

A081516 Final term in n-th row of A081517.

Original entry on oeis.org

1, 2, 4, 5, 7, 8, 8, 9, 11, 14, 12, 13, 19, 16, 22, 17, 21, 20, 20, 21, 23, 26, 24, 31, 31, 28, 28, 31, 33, 32, 34, 45, 35, 38, 36, 43, 43, 40, 46, 41, 43, 46, 44, 45, 49, 52, 48, 53, 53, 52, 52, 55, 55, 56, 58, 57, 61, 68, 66, 61, 71, 82, 64, 65, 73, 68, 70, 69
Offset: 1

Views

Author

Amarnath Murthy, Mar 27 2003

Keywords

Crossrefs

Extensions

More terms from Jinyuan Wang, May 23 2020

A081513 a(2)=0; for n != 2, let m = A081512(n), then a(n) = value of d_n in the lexicographically earliest set of n distinct divisors d_1, ..., d_n of m with d_1 + ... + d_n = m.

Original entry on oeis.org

1, 0, 3, 6, 12, 8, 24, 20, 28, 40, 40, 30, 60, 45, 60, 120, 90, 72, 72, 168, 240, 180, 144, 168, 168, 216, 420, 315, 210, 420, 420, 336, 432, 1260, 840, 840, 504, 504, 315, 480, 540, 2520, 2520, 1680, 1680, 1260, 1260, 1008, 720, 2520, 2520, 1890, 1512, 945, 3360
Offset: 1

Views

Author

Amarnath Murthy, Mar 27 2003

Keywords

Examples

			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
...
		

Crossrefs

Extensions

Corrected by Caleb M. Shor (cshor(AT)bates.edu), Sep 26 2007
Terms a(8) onwards from Jinyuan Wang, May 23 2020
Definition clarified by N. J. A. Sloane, May 23 2020, following suggestions from Jinyuan Wang.
Showing 1-4 of 4 results.