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.

A325878 Number of maximal subsets of {1..n} such that every orderless pair of distinct elements has a different sum.

This page as a plain text file.
%I A325878 #12 Mar 24 2025 15:15:21
%S A325878 1,1,1,1,4,5,8,22,40,56,78,124,222,390,616,892,1220,1620,2182,3042,
%T A325878 4392,6364,9054,12608,16980,22244,28482,36208,45864,58692,75804,98440,
%U A325878 128694,168250,218558,281210,357594,449402,560034,693332,853546,1050118,1293458,1596144,1975394
%N A325878 Number of maximal subsets of {1..n} such that every orderless pair of distinct elements has a different sum.
%H A325878 Andrew Howroyd, <a href="/A325878/b325878.txt">Table of n, a(n) for n = 0..60</a>
%e A325878 The a(1) = 1 through a(6) = 8 subsets:
%e A325878   {1}  {1,2}  {1,2,3}  {1,2,3}  {1,2,4}    {1,2,3,5}
%e A325878                        {1,2,4}  {2,3,4}    {1,2,3,6}
%e A325878                        {1,3,4}  {2,4,5}    {1,2,4,6}
%e A325878                        {2,3,4}  {1,2,3,5}  {1,3,4,5}
%e A325878                                 {1,3,4,5}  {1,3,5,6}
%e A325878                                            {1,4,5,6}
%e A325878                                            {2,3,4,6}
%e A325878                                            {2,4,5,6}
%t A325878 fasmax[y_]:=Complement[y,Union@@(Most[Subsets[#]]&/@y)];
%t A325878 Table[Length[fasmax[Select[Subsets[Range[n]],UnsameQ@@Plus@@@Subsets[Union[#],{2}]&]]],{n,0,10}]
%o A325878 (PARI)
%o A325878 a(n)={
%o A325878    my(ismaxl(b,w)=for(k=1, n, if(!bittest(b,k) && !bitand(w,b<<k), return(0))); 1);
%o A325878    my(recurse(k,r,b,w)=
%o A325878       if(k > n, ismaxl(b,w),
%o A325878          my(s=self()(k+1, r, b, w));
%o A325878          if(!bitand(w,b<<k), s+=self()(k+1, r+1, b+(1<<k), w + (b<<k)));
%o A325878          s)
%o A325878    );
%o A325878    recurse(1,0,0,0);
%o A325878 } \\ _Andrew Howroyd_, Mar 23 2025
%Y A325878 The subset case is A196723.
%Y A325878 The integer partition case is A325857.
%Y A325878 The strict integer partition case is A325877.
%Y A325878 Heinz numbers of the counterexamples are given by A325991.
%Y A325878 Cf. A002033, A108917, A143823, A143824, A276024.
%Y A325878 Cf. A325858, A325859, A325864, A325865, A325867, A325879, A325880, A382398.
%K A325878 nonn
%O A325878 0,5
%A A325878 _Gus Wiseman_, Jun 02 2019
%E A325878 a(21) onwards from _Andrew Howroyd_, Mar 23 2025