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.
%I A350103 #24 Jan 31 2024 22:23:37 %S A350103 1,1,1,1,1,1,1,1,2,1,1,1,3,1,1,1,1,4,2,1,1,1,1,5,2,1,1,1,1,1,6,3,2,1, %T A350103 1,1,1,1,7,3,2,1,1,1,1,1,1,8,4,2,2,1,1,1,1,1,1,9,4,3,2,1,1,1,1,1,1,1, %U A350103 10,5,3,2,2,1,1,1,1,1,1,1,11,5,3,2,2,1,1,1,1,1,1 %N A350103 Triangle read by rows. Number of self-measuring subsets of the initial segment of the natural numbers strictly below n and cardinality k. Number of subsets S of [n] with S = distset(S) and |S| = k. %C A350103 We use the notation [n] = {0, 1, ..., n-1}. If S is a subset of [n] then we define the distset of S (set of distances of S) as {|x - y|: x, y in S}. We call a subset S of the natural numbers self-measuring if and only if S = distset(S). %H A350103 Winston de Greef, <a href="/A350103/b350103.txt">Table of n, a(n) of the first 150 rows, flattened (n = 0..11324)</a> %H A350103 Peter Luschny, <a href="/A350102/a350102.png">Illustrating self-measuring subsets of {0, 1, 2, 3}</a>. %F A350103 T(n, k) = floor((n - 1) / (k - 1)) for k >= 2. %F A350103 T(n, k) = 1 if k = 0 or k = 1 or n >= k >= floor((n + 1)/2). %e A350103 Triangle starts: %e A350103 [ 0] [1] %e A350103 [ 1] [1, 1] %e A350103 [ 2] [1, 1, 1] %e A350103 [ 3] [1, 1, 2, 1] %e A350103 [ 4] [1, 1, 3, 1, 1] %e A350103 [ 5] [1, 1, 4, 2, 1, 1] %e A350103 [ 6] [1, 1, 5, 2, 1, 1, 1] %e A350103 [ 7] [1, 1, 6, 3, 2, 1, 1, 1] %e A350103 [ 8] [1, 1, 7, 3, 2, 1, 1, 1, 1] %e A350103 [ 9] [1, 1, 8, 4, 2, 2, 1, 1, 1, 1] %e A350103 [10] [1, 1, 9, 4, 3, 2, 1, 1, 1, 1, 1] %e A350103 [11] [1, 1, 10, 5, 3, 2, 2, 1, 1, 1, 1, 1] %e A350103 [12] [1, 1, 11, 5, 3, 2, 2, 1, 1, 1, 1, 1, 1] %e A350103 . %e A350103 The first column is 1,1,... because {} = distset({}) and |{}| = 0. %e A350103 The second column is 1,1,... because {0} = distset({0}) and |{0}| = 1. %e A350103 The third column is n-1 because {0, j} = distset({0, j}) and |{0, j}| = 2 for j = 1..n - 1. %e A350103 The main diagonal is 1,1,... because [n] = distset([n]) and |[n]| = n (these are the complete rulers A103295). %p A350103 T := (n, k) -> ifelse(k < 2, 1, floor((n - 1) / (k - 1))): %p A350103 seq(print(seq(T(n, k), k = 0..n)), n = 0..12); %t A350103 distSet[s_] := Union[Map[Abs[Differences[#][[1]]] &, Union[Sort /@ Tuples[s, 2]]]]; T[n_, k_] := Count[Subsets[Range[0, n - 1]], _?((ds = distSet[#]) == # && Length[ds] == k &)]; Table[T[n, k], {n, 0, 12}, {k, 0, n}] // Flatten (* _Amiram Eldar_, Dec 16 2021 *) %o A350103 (SageMath) # generating and counting (slow) %o A350103 def isSelfMeasuring(R): %o A350103 S, L = Set([]), len(R) %o A350103 R = Set([r - 1 for r in R]) %o A350103 for i in range(L): %o A350103 for j in (0..i): %o A350103 S = S.union(Set([abs(R[i] - R[i - j])])) %o A350103 return R == S %o A350103 def A349976row(n): %o A350103 counter = [0] * (n + 1) %o A350103 for S in Subsets(n): %o A350103 if isSelfMeasuring(S): counter[len(S)] += 1 %o A350103 return counter %o A350103 for n in range(10): print(A349976row(n)) %o A350103 (PARI) T(n, k) = if(k<=1, 1, (n - 1) \ (k - 1)) \\ _Winston de Greef_, Jan 31 2024 %Y A350103 Cf. A350102 (row sums), A349976, A103295, A003988, A010766, A123706. %K A350103 nonn,tabl %O A350103 0,9 %A A350103 _Peter Luschny_, Dec 14 2021