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.

A382396 Number of minimum sized maximal subsets of {1..n} such that every pair of distinct elements has a different difference.

Original entry on oeis.org

1, 1, 1, 3, 1, 6, 14, 18, 14, 10, 4, 110, 172, 216, 226, 214, 184, 152, 116, 82, 50, 26, 10, 3696, 3904, 3942, 3768, 3504, 3016, 2548, 2060, 1598, 1170, 832, 538, 330, 196, 106, 52, 20, 10, 4, 2, 69610, 62594, 55294, 47610, 40502, 33538, 27254, 21544, 16764, 12676, 9258, 6534, 4516, 3042, 1990, 1254, 754, 448
Offset: 0

Views

Author

Andrew Howroyd, Mar 23 2025

Keywords

Comments

Also the number of minimum sized maximal subsets of {1..n} such that every pair of (not necessarily distinct) elements has a different sum.

Examples

			The a(0) = 1 set is {}.
The a(1) = 1 set is {1}.
The a(2) = 1 set is {1,2}.
The a(3) = 3 sets: {1,2}, {1,3}, {2,3}.
The a(11) = 4 sets: {1,2,4,8}, {1,2,4,9}, {1,2,4,10}, {1,2,4,11}.
The a(42) = 2 sets: {10,18,19,25,30}, {13,18,24,25,33}.
See also the examples in A325879.
		

Crossrefs

Cf. A143823, A325879, A377419, A382395, A382397 (minimum size of set).

Programs

  • PARI
    a(n)={
      local(best,count); best=n+1;
      my(ismaxl(b,w)=for(k=1, n, if(!bittest(b,k) && !bitand(w,bitor(b,1< n, if(ismaxl(b,w),if(r