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.

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).

This page as a plain text file.
%I A381476 #9 Mar 27 2025 21:31:40
%S A381476 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,
%T A381476 10,1,9,36,68,26,1,10,45,100,60,1,11,55,140,110,1,12,66,190,190,4,1,
%U A381476 13,78,250,304,22,1,14,91,322,466,68,1,15,105,406,676,156
%N 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).
%C A381476 Equivalently, a(n) is the number of Sidon sets of {1..n} of size k.
%H A381476 Andrew Howroyd, <a href="/A381476/b381476.txt">Table of n, a(n) for n = 0..464</a> (rows 0..60)
%H A381476 Wikipedia, <a href="https://en.wikipedia.org/wiki/Sidon_sequence">Sidon sequence</a>.
%H A381476 <a href="/index/Go#Golomb">Index entries for sequences related to Golomb rulers</a>.
%F A381476 T(n,A143824(n)) = A382395(n).
%e A381476 Triangle begins:
%e A381476    0 | 1;
%e A381476    1 | 1,  1;
%e A381476    2 | 1,  2,  1;
%e A381476    3 | 1,  3,  3;
%e A381476    4 | 1,  4,  6,   2;
%e A381476    5 | 1,  5, 10,   6;
%e A381476    6 | 1,  6, 15,  14;
%e A381476    7 | 1,  7, 21,  26,   2;
%e A381476    8 | 1,  8, 28,  44,  10;
%e A381476    9 | 1,  9, 36,  68,  26;
%e A381476   10 | 1, 10, 45, 100,  60;
%e A381476   11 | 1, 11, 55, 140, 110;
%e A381476   12 | 1, 12, 66, 190, 190, 4;
%e A381476   ...
%o A381476 (PARI)
%o A381476 row(n)={
%o A381476   local(L=List());
%o A381476   my(recurse(k,r,b,w)=
%o A381476       if(k > n, if(r>=#L,listput(L,0)); L[1+r]++,
%o A381476          self()(k+1, r, b, w);
%o A381476          b+=1<<k; if(!bitand(w,b<<k), self()(k+1, r+1, b, w + (b<<k)));
%o A381476         );
%o A381476   );
%o A381476   recurse(1,0,0,0);
%o A381476   Vec(L)
%o A381476 }
%Y A381476 Columns 0..5 are A000012, A001477, A161680, A212964(n-1), A241688, A241689, A241690.
%Y A381476 Row sums are A143823.
%Y A381476 Cf. A003022, A143824, A325879, A382395.
%K A381476 nonn,tabf
%O A381476 0,5
%A A381476 _Andrew Howroyd_, Mar 27 2025