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.
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
Examples
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; ...
Links
- Fausto A. C. Cariboni, Rows n = 1..70, flattened
- Ben Burns, C# program to generate a(n) up to n=64
- Eric Weisstein's World of Mathematics, Sum-Free Set
Programs
-
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