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.

A382399 Number of subsets of Z_n such that every ordered pair of distinct elements has a different difference.

Original entry on oeis.org

1, 2, 3, 7, 9, 16, 19, 43, 49, 100, 91, 177, 193, 352, 323, 691, 673, 1242, 1135, 2129, 2041, 3634, 3103, 5843, 5473, 9326, 8139, 16579, 14001, 24796, 21271, 38813, 34369, 60292, 49539, 86451, 81361, 131684, 110391, 196717, 171761, 286878, 236167, 419337, 370569, 618346, 501999, 872415, 763777, 1235438, 1028451
Offset: 0

Views

Author

Andrew Howroyd, Mar 24 2025

Keywords

Comments

Arithmetic is done modulo n.
Also the number of subsets of Z_n such that every unordered pair of (not necessarily distinct) elements has a different sum.

Examples

			The a(0) = 1 through a(5) = 16 subsets:
  {}  {}   {}     {}     {}       {}
      {0}  {0}    {0}    {0}      {0}
           {1}    {1}    {1}      {1}
                  {2}    {2}      {2}
                  {0,1}  {3}      {3}
                  {0,2}  {0,1}    {4}
                  {1,2}  {0,3}    {0,1}
                         {1,2}    {0,2}
                         {2,3}    {0,3}
                                  {0,4}
                                  {1,2}
                                  {1,3}
                                  {1,4}
                                  {2,3}
                                  {2,4}
                                  {3,4}
		

Crossrefs

Programs

  • PARI
    a(n)={
       my(recurse(k,r,b,w)=
          if(k >= n, 1,
             b+=1<
    				

Formula

a(n) = n*A325681(n) + 1.