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-1 of 1 results.

A326441 Number of subsets of {1..n} whose sum is equal to the product of their complement.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Jul 07 2019

Keywords

Comments

Essentially the same as A178830. - R. J. Mathar, Jul 12 2019

Examples

			The initial terms count the following subsets:
   1: {1}
   3: {1,2}
   5: {3,5}
   6: {3,4,5}
   7: {2,4,5,7}
   8: {2,4,5,6,7}
   9: {2,3,5,6,7,9}
  10: {4,5,6,8,9,10}
  10: {2,3,5,6,7,8,9}
  10: {1,2,3,4,5,8,9,10}
Also the number of subsets of {1..n} whose product is equal to the sum of their complement. For example, the initial terms count the following subsets:
   1: {}
   3: {3}
   5: {1,2,4}
   6: {1,2,6}
   7: {1,3,6}
   8: {1,3,8}
   9: {1,4,8}
  10: {6,7}
  10: {1,4,10}
  10: {1,2,3,7}
		

Crossrefs

Programs

  • Maple
    b:= proc(n, s, p)
          `if`(s=p, 1, `if`(n<1, 0, b(n-1, s, p)+
          `if`(s-n b(n, n*(n+1)/2, 1):
    seq(a(n), n=0..100);  # Alois P. Heinz, Jul 12 2019
  • Mathematica
    Table[Length[Select[Subsets[Range[n]],Plus@@#==Times@@Complement[Range[n],#]&]],{n,0,10}]

Extensions

a(21)-a(83) from Giovanni Resta, Jul 08 2019
Showing 1-1 of 1 results.