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.

Showing 1-3 of 3 results.

A379998 Irregular triangle read by rows: T(n,k) is number of sequences of length k over {0,1,...,n-1} containing no two consecutive blocks with the same average, n >= 1, 0 <= k <= A379914(n).

Original entry on oeis.org

1, 1, 1, 2, 2, 2, 1, 3, 6, 8, 1, 4, 12, 28, 38, 50, 24, 6, 1, 5, 20, 64, 148, 316, 370, 340, 152, 38, 1, 6, 30, 126, 406, 1142, 2142, 3380, 4022, 3910, 2794, 2048, 988, 496, 234, 82, 14, 10, 4, 2, 1, 7, 42, 216, 898, 3314, 9014, 21760, 41026, 63898, 78204, 87820, 71434, 53984, 34232, 16716, 6400, 2346, 644, 148, 12
Offset: 1

Views

Author

Pontus von Brömssen, Jan 09 2025

Keywords

Comments

See A379914 for details.
A sequence, its reversal, and its complement (where all terms x are replaced by n-1-x) are all counted.

Examples

			Triangle begins:
  1, 1;
  1, 2,  2,  2;
  1, 3,  6,  8;
  1, 4, 12, 28,  38,  50,  24,   6;
  1, 5, 20, 64, 148, 316, 370, 340, 152, 38;
  ...
		

Crossrefs

Formula

T(n,0) = 1.
T(n,1) = n.
T(n,2) = n*(n-1) for n >= 2.
T(n,3) = A245996(n-1) for n >= 2.
Empirically: T(n,4) = T(n-1,4) + T(n-2,4) - T(n-5,4) - T(n-6,4) - T(n-7,4) + T(n-8,4) + T(n-9,4) + T(n-10,4) - T(n-13,4) - T(n-14,4) + T(n-15,4) for n >= 19.

A379914 Length of longest sequence over {0,1,...,n-1} containing no two consecutive blocks with the same average.

Original entry on oeis.org

1, 3, 3, 7, 9, 19, 20, 31, 37
Offset: 1

Views

Author

Jeffrey Shallit, Jan 06 2025

Keywords

Comments

Sequence S = UABV does not satisfy the desired property if nonempty blocks A and B have the same average (where U, V, or both may be empty). For example, 4,1,3,5,0,6,2,9 does not have the desired property, because it can be written as (4)(1,3,5)(0,6)(2,9) and the two consecutive blocks (1,3,5) and (0,6) have the same average 3.
The Gerver-Ramsey theorem implies that for each n, such a sequence is of bounded length; see Theorem 2 in the paper of Brown.
For all n <= 9 except n = 7 and 8, there exists a longest sequence that is also palindromic. - Pontus von Brömssen, Jan 09 2025

Examples

			For 1 <= n <= 9, the lexicographically least sequences achieving the given bound are as follows:
n=1: 0
n=2: 010
n=3: 010
n=4: 0203202
n=5: 010343010
n=6: 0501050254520501050
n=7: 03143656151050356353
n=8: 1250673747530401046047606760502
n=9: 0323725782750730106010370572875273230
		

Crossrefs

Extensions

a(9) from Pontus von Brömssen, Jan 07 2025

A380000 Number of sequences over {0,1,...,n-1} containing no two consecutive blocks with the same average.

Original entry on oeis.org

2, 7, 18, 163, 1454, 21837, 492116, 23699853, 1507394232
Offset: 1

Views

Author

Pontus von Brömssen, Jan 09 2025

Keywords

Comments

See A379914 for details.
a(n) is even if and only if n is odd; for each sequence can be paired up with its complement (where all terms x are replaced by n-1-x), and the only self-complementary sequences (that also satisfy the consecutive blocks condition) are the empty sequence and those with a single term (n-1)/2 for odd n.

Examples

			For n = 3, the a(3) = 18 sequences are: (), 0, 1, 2, 01, 02, 10, 12, 20, 21, 010, 012, 020, 101, 121, 202, 210, 212.
		

Crossrefs

Row sums of A379998.
Showing 1-3 of 3 results.