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.

Previous Showing 11-15 of 15 results.

A381476 Triangle read by rows: T(n,k) is the number of subsets of {1..n} with k elements such that every pair of distinct elements has a different difference, 0 <= k <= A143824(n).

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 3, 3, 1, 4, 6, 2, 1, 5, 10, 6, 1, 6, 15, 14, 1, 7, 21, 26, 2, 1, 8, 28, 44, 10, 1, 9, 36, 68, 26, 1, 10, 45, 100, 60, 1, 11, 55, 140, 110, 1, 12, 66, 190, 190, 4, 1, 13, 78, 250, 304, 22, 1, 14, 91, 322, 466, 68, 1, 15, 105, 406, 676, 156
Offset: 0

Views

Author

Andrew Howroyd, Mar 27 2025

Keywords

Comments

Equivalently, a(n) is the number of Sidon sets of {1..n} of size k.

Examples

			Triangle begins:
   0 | 1;
   1 | 1,  1;
   2 | 1,  2,  1;
   3 | 1,  3,  3;
   4 | 1,  4,  6,   2;
   5 | 1,  5, 10,   6;
   6 | 1,  6, 15,  14;
   7 | 1,  7, 21,  26,   2;
   8 | 1,  8, 28,  44,  10;
   9 | 1,  9, 36,  68,  26;
  10 | 1, 10, 45, 100,  60;
  11 | 1, 11, 55, 140, 110;
  12 | 1, 12, 66, 190, 190, 4;
  ...
		

Crossrefs

Columns 0..5 are A000012, A001477, A161680, A212964(n-1), A241688, A241689, A241690.
Row sums are A143823.

Programs

  • PARI
    row(n)={
      local(L=List());
      my(recurse(k,r,b,w)=
          if(k > n, if(r>=#L,listput(L,0)); L[1+r]++,
             self()(k+1, r, b, w);
             b+=1<
    				

Formula

T(n,A143824(n)) = A382395(n).

A377419 Minimum sum of a maximal subset of {1..n} such that every pair of distinct elements has a different difference.

Original entry on oeis.org

0, 1, 3, 3, 5, 7, 7, 7, 10, 10, 13, 15, 15, 15, 17, 17, 19, 19, 23, 24, 28, 29, 30, 30, 33, 34, 35, 36, 41, 41, 46, 48, 50, 52, 52, 53, 56, 56, 59, 59, 61, 63, 65, 68, 71, 71, 75, 81, 83, 84, 86, 87, 88, 89, 90, 91, 92, 93, 95, 95, 98, 98, 98, 105, 112, 118, 121, 121, 124
Offset: 0

Views

Author

Andrew Howroyd, Oct 27 2024

Keywords

Comments

Also the minimum sum of a maximal subset of {1..n} such that every unordered pair of (not necessarily distinct) elements has a different sum. In other words, a(n) is the minimum sum of a maximal Sidon set of {1..n}.

Examples

			a(0) = 0 = sum of {}.
a(1) = 1 = sum of {1}.
a(2) = 3 = sum of {1,2}.
a(3) = 3 = sum of {1,2}.
a(4) = 5 = sum of {2,3}.
a(5) = 7 = sum of {1,2,4}.
a(12) = 15 = sum of {1,2,5,7} or {1,2,4,8}.
a(20) = 28 = sum of {2,5,10,11} or {1,2,4,8,13}.
See also the examples in A325879.
		

Crossrefs

Cf. A325879, A377410 (maximum sum).

Programs

  • PARI
    a(n)={
      my(ismaxl(b,w)=for(k=1, n, if(!bittest(b,k) && !bitand(w,bitor(b,1< n, if(ismaxl(b,w),0,n^2),
             my(s=self()(k+1, b,w));
             b+=1<
    				

Extensions

Name edited by Andrew Howroyd, Mar 24 2025

A382395 Number of maximum sized subsets of {1..n} such that every pair of distinct elements has a different difference.

Original entry on oeis.org

1, 1, 1, 3, 2, 6, 14, 2, 10, 26, 60, 110, 4, 22, 68, 156, 320, 584, 8, 24, 80, 206, 504, 1004, 1910, 3380, 10, 34, 98, 282, 760, 1618, 3334, 6360, 11482, 2, 22, 70, 214, 540, 1250, 2718, 5712, 10910, 20418, 2, 12, 30, 90, 230, 562, 1228, 2690, 5550, 11260, 21164, 2, 4, 6, 10, 18
Offset: 0

Views

Author

Andrew Howroyd, Mar 23 2025

Keywords

Comments

Also the number of maximum sized subsets of {1..n} such that every pair of (not necessarily distinct) elements has a different sum. In other words, a(n) is the number of Sidon sets with A143824(n) elements which are <= n.

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(4) = 2 sets: {1,2,4}, {1,3,4}.
The a(5) = 6 sets: {1,2,4}, {1,2,5}, {1,3,4}, {1,4,5}, {2,3,5}, {2,4,5}.
The a(6) = 14 sets: {1,2,4}, {1,2,5}, {1,2,6}, {1,3,4}, {1,3,6}, {1,4,5}, {1,4,6}, {1,5,6}, {2,3,5}, {2,3,6}, {2,4,5}, {2,5,6}, {3,4,6}, {3,5,6}.
The a(7) = 2 sets: {1,2,5,7}, {1,3,6,7}.
		

Crossrefs

Cf. A143823, A143824 (maximum size of set), A325879, A377410, A382396, A382398.

Programs

  • PARI
    a(n)={
       local(best,count);
       my(recurse(k,r,b,w)=
          if(k > n, if(r>=best, if(r>best,best=r;count=0); count++),
             self()(k+1, r, b, w);
             b+=1<
    				

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
    				

A382397 Minimum size of a maximal subset of {1..n} such that every pair of distinct elements has a different difference.

Original entry on oeis.org

0, 1, 2, 2, 2, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6
Offset: 0

Views

Author

Andrew Howroyd, Mar 23 2025

Keywords

Comments

Also the minimum size of a maximal subset of {1..n} such that every pair of (not necessarily distinct) elements has a different sum.
a(n) is the minimum size of a set enumerated by A325879(n).
Number of occurrences of k: 1, 1, 3, 6, 12, 20, ...
Maximum n having a(n) = k: 0, 1, 4, 10, 22, 42, ...
There are insufficient known terms in either of the above to distinguish from other sequences.

Crossrefs

Cf. A143824 (maximum size of set), A325879, A377419 (minimum sum), A382396.

Programs

  • PARI
    a(n)={
      my(ismaxl(b,w)=for(k=1, n, if(!bittest(b,k) && !bitand(w,bitor(b,1< n, if(ismaxl(b,w),0,n+1),
             my(s=self()(k+1, b,w));
             b+=1<
    				
Previous Showing 11-15 of 15 results.