|
|
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.
|
|
4
|
|
|
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
(list;
table;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,3
|
|
LINKS
|
|
|
EXAMPLE
|
Triangle begins:
1;
1,2;
1,2,4;
1,2,3,5;
1,2,3,4,7;
1,2,3,4,5,8;
|
|
PROG
|
(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
|
|
CROSSREFS
|
|
|
KEYWORD
|
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|