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.

A288888 a(n) is the total number of elements in all sum-free subsets of {1,...,n}.

Original entry on oeis.org

1, 2, 7, 12, 27, 45, 93, 144, 294, 428, 796, 1220, 2186, 3155, 5637, 8102, 13907, 20070, 33746, 47416, 81050, 112226, 184541, 260780, 421222, 577447, 947934, 1304821, 2087701, 2857024, 4535223, 6157288, 9878133, 13257735, 20790674, 28332734, 44304037, 59072318
Offset: 1

Views

Author

Ben Burns, Jun 18 2017

Keywords

Comments

a(n) is the sum of the n-th row of A288887.

Examples

			A288887 begins:
  1;
  1,  1;
  2,  2,  3;
  3,  2,  4,  3;
  5,  3,  7,  5,  7;
  ...
		

Crossrefs

Cf. A007865. Rows sums of triangle A288887.

Programs

  • PARI
    sumfree(v) = {for(i=1, #v, for (j=1, i, if (setsearch(v, v[i]+v[j]), return (0)););); return (1);}
    a(n) = {my(nb = 0); forsubset(n, s, if (#s && sumfree(Set(s)), nb += #s);); nb;} \\ Michel Marcus, Nov 08 2020