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.

A325880 Number of maximal subsets of {1..n} containing n such that every ordered pair of distinct elements has a different difference.

This page as a plain text file.
%I A325880 #10 Mar 23 2025 23:40:11
%S A325880 1,1,2,2,4,8,8,10,18,34,50,70,78,89,120,181,277,401,561,728,867,1031,
%T A325880 1219,1537,2013,2684,3581,4973,6435,8124,9974,12054,14057,16890,19783,
%U A325880 24102,29539,37247,46301,59825,74556,94064,115057,141068,167521,200790,232798,273734
%N A325880 Number of maximal subsets of {1..n} containing n such that every ordered pair of distinct elements has a different difference.
%C A325880 Also the number of maximal subsets of {1..n} containing n such that every orderless pair of (not necessarily distinct) elements has a different sum.
%H A325880 Andrew Howroyd, <a href="/A325880/b325880.txt">Table of n, a(n) for n = 1..60</a>
%e A325880 The a(2) = 1 through a(9) = 18 subsets:
%e A325880   {1,2}  {1,3}  {1,2,4}  {1,2,5}  {1,2,6}  {2,3,7}    {3,5,8}    {4,6,9}
%e A325880          {2,3}  {1,3,4}  {1,4,5}  {1,3,6}  {2,4,7}    {4,5,8}    {5,6,9}
%e A325880                          {2,3,5}  {1,4,6}  {2,6,7}    {1,2,4,8}  {1,2,4,9}
%e A325880                          {2,4,5}  {1,5,6}  {3,4,7}    {1,2,6,8}  {1,2,6,9}
%e A325880                                   {2,3,6}  {4,5,7}    {1,3,4,8}  {1,2,7,9}
%e A325880                                   {2,5,6}  {4,6,7}    {1,3,7,8}  {1,3,4,9}
%e A325880                                   {3,4,6}  {1,2,5,7}  {1,5,6,8}  {1,3,8,9}
%e A325880                                   {3,5,6}  {1,3,6,7}  {1,5,7,8}  {1,4,8,9}
%e A325880                                                       {2,3,6,8}  {1,6,7,9}
%e A325880                                                       {2,4,7,8}  {1,6,8,9}
%e A325880                                                                  {2,3,5,9}
%e A325880                                                                  {2,3,7,9}
%e A325880                                                                  {2,4,5,9}
%e A325880                                                                  {2,4,8,9}
%e A325880                                                                  {2,6,7,9}
%e A325880                                                                  {2,6,8,9}
%e A325880                                                                  {3,4,7,9}
%e A325880                                                                  {3,5,8,9}
%t A325880 fasmax[y_]:=Complement[y,Union@@(Most[Subsets[#]]&/@y)];
%t A325880 Table[Length[fasmax[Select[Subsets[Range[n]],MemberQ[#,n]&&UnsameQ@@Subtract@@@Subsets[Union[#],{2}]&]]],{n,0,10}]
%o A325880 (PARI)
%o A325880 a(n)={
%o A325880   my(ismaxl(b,w)=for(k=1, n, if(!bittest(b,k) && !bitand(w,bitor(b,1<<k)<<k), return(0))); 1);
%o A325880   my(recurse(k,b,w)=
%o A325880       if(k >= n, ismaxl(b,w),
%o A325880          my(s=self()(k+1, b,w));
%o A325880          b+=1<<k; if(!bitand(w,b<<k), s+=self()(k+1, b, w + (b<<k)));
%o A325880          s);
%o A325880   );
%o A325880   recurse(1,1<<n,1<<(2*n));
%o A325880 } \\ _Andrew Howroyd_, Mar 23 2025
%Y A325880 Cf. A002033, A108917, A143823, A143824, A196723.
%Y A325880 Cf. A325858, A325859, A325861, A325867, A325869, A325879, A325992.
%K A325880 nonn
%O A325880 1,3
%A A325880 _Gus Wiseman_, Jun 02 2019
%E A325880 a(25) onwards from _Andrew Howroyd_, Mar 23 2025