login
A288887
Triangle read by rows: T(n,k) is the number of times k is a member of a sum-free subset of {1, ..., n} for 1 <= k <= n.
3
1, 1, 1, 2, 2, 3, 3, 2, 4, 3, 5, 3, 7, 5, 7, 7, 5, 7, 8, 10, 8, 12, 8, 12, 13, 17, 13, 18, 16, 13, 17, 13, 23, 18, 25, 19, 28, 21, 30, 21, 40, 32, 43, 32, 47, 37, 29, 40, 29, 40, 45, 57, 45, 63, 43, 62, 44, 66, 45, 65, 72, 95, 71, 104, 70, 102, 85, 66, 95, 71, 89, 72, 132, 109, 139, 104, 142, 116
OFFSET
1,4
LINKS
Fausto A. C. Cariboni, Rows n = 1..70, flattened
Eric Weisstein's World of Mathematics, Sum-Free Set
EXAMPLE
For the nine sum-free subsets of {1,2,3,4}, 1 is a member of three of them, 2 is a member of two, 3 is a member of four, and 4 is a member of three, hence the 4th row is 3,2,4,3.
The triangle begins:
1;
1, 1;
2, 2, 3;
3, 2, 4, 3;
5, 3, 7, 5, 7;
7, 5, 7, 8, 10, 8;
12, 8, 12, 13, 17, 13, 18;
16, 13, 17, 13, 23, 18, 25, 19;
...
PROG
(PARI) sumfree(v) = {for(i=1, #v, for (j=1, i, if (setsearch(v, v[i]+v[j]), return (0)); ); ); return (1); }
row(n) = {my(v = vector(n)); forsubset(n, s, if (sumfree(Set(s)), for (k=1, n, if (setsearch(Set(s), k), v[k]++); ); ); ); v; } \\ Michel Marcus, Nov 08 2020
CROSSREFS
Cf. A007865, A288888 (row sums).
Sequence in context: A239330 A276273 A039643 * A154258 A253900 A327487
KEYWORD
nonn,tabl
AUTHOR
Ben Burns, Jun 18 2017
STATUS
approved