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-4 of 4 results.

A350330 Lexicographically earliest sequence of positive integers such that the Hankel matrix of any odd number of consecutive terms is invertible.

Original entry on oeis.org

1, 1, 2, 1, 1, 2, 2, 1, 2, 1, 1, 2, 1, 2, 3, 1, 1, 2, 1, 1, 2, 2, 1, 2, 1, 1, 2, 2, 3, 2, 2, 1, 1, 2, 2, 3, 1, 1, 2, 1, 1, 2, 2, 1, 2, 1, 1, 2, 1, 2, 3, 1, 1, 2, 1, 1, 2, 2, 1, 2, 1, 1, 2, 2, 3, 2, 2, 1, 1, 2, 3, 1, 1, 2, 1, 1, 2, 2, 1, 2, 1, 1, 2, 1, 2, 3, 1
Offset: 1

Views

Author

Pontus von Brömssen, Dec 25 2021

Keywords

Comments

No linear relation of the form c_1*a(j) + ... + c_k*a(j+k-1) = 0, with at least one c_i nonzero, holds for k consecutive values of j.
Is a(n) <= 3 for all n? (It is true for n <= 400.) If not, what is the largest term? Or is the sequence unbounded?
There seems to be some regularity in the sequence of values of n for which a(n) > 2: 15, 29, 36, 51, 65, 71, 86, 100, ... . The first differences of these are: 14, 7, 15, 14, 6, 15, 14, 5, 15, 14, 3, 15, 14, 1, 15, 13, 11, 15, 14, 7, 15, 14, 5, 15, 14, 3, 15, 14, 1, ... . The differences are all less than or equal to 15, because A350364(15,2) = 0.
Agrees with A154402 for the first 20 terms, but differs on the 21st.

Examples

			a(15) = 3, because the Hankel matrix of (a(11), ..., a(15)) is
  [1  2   1  ]
  [2  1   2  ]
  [1  2 a(15)],
which is singular if a(15) = 1, and the Hankel matrix of (a(5), ..., a(15)) is
  [1  2  2  1  2   1  ]
  [2  2  1  2  1   1  ]
  [2  1  2  1  1   2  ]
  [1  2  1  1  2   1  ]
  [2  1  1  2  1   2  ]
  [1  1  2  1  2 a(15)],
which is singular if a(15) = 2, but if a(15) = 3 the Hankel matrix of (a(k), ..., a(15)) is invertible for all odd k <= 15.
		

Crossrefs

Programs

  • Python
    from sympy import Matrix
    from itertools import count
    def A350330_list(nmax):
        a=[]
        for n in range(nmax):
            a.append(next(k for k in count(1) if all(Matrix((n-r)//2+1,(n-r)//2+1,lambda i,j:(a[r:]+[k])[i+j]).det()!=0 for r in range(n-2,-1,-2))))
        return a
    
  • Python
    # Faster version using numpy instead of sympy.
    # Due to floating point errors, the results may be inaccurate for large n. Correctness verified up to n=400 for numpy 1.20.2.
    from numpy import array
    from numpy.linalg import det
    from itertools import count
    def A350330_list(nmax):
        a=[]
        for n in range(nmax):
            a.append(next(k for k in count(1) if all(abs(det(array([[(a[r:]+[k])[i+j] for j in range((n-r)//2+1)] for i in range((n-r)//2+1)])))>0.5 for r in range(n-2,-1,-2))))
        return a

A350529 Square array read by antidiagonals downwards: T(n,k) is the number of sequences of length n with terms in 1..k such that no iterated difference is zero, n, k >= 0.

Original entry on oeis.org

1, 1, 0, 1, 1, 0, 1, 2, 0, 0, 1, 3, 2, 0, 0, 1, 4, 6, 2, 0, 0, 1, 5, 12, 10, 2, 0, 0, 1, 6, 20, 32, 16, 2, 0, 0, 1, 7, 30, 72, 86, 26, 2, 0, 0, 1, 8, 42, 138, 256, 232, 42, 2, 0, 0, 1, 9, 56, 234, 624, 906, 622, 68, 2, 0, 0
Offset: 0

Views

Author

Pontus von Brömssen, Jan 03 2022

Keywords

Comments

For fixed n, T(n,k) is a quasi-polynomial of degree n in k. For example, T(4,k) = k^4 - (116/27)*k^3 + (25/3)*k^2 + b(k)*k + c(k), where b and c are periodic with period 6.

Examples

			  n\k|  0  1  2   3     4      5       6        7         8         9         10
  ---+--------------------------------------------------------------------------
   0 |  1  1  1   1     1      1       1        1         1         1          1
   1 |  0  1  2   3     4      5       6        7         8         9         10
   2 |  0  0  2   6    12     20      30       42        56        72         90
   3 |  0  0  2  10    32     72     138      234       368       544        770
   4 |  0  0  2  16    86    256     624     1278      2370      4030       6462
   5 |  0  0  2  26   232    906    2790     6900     15096     29536      53678
   6 |  0  0  2  42   622   3180   12366    36964     95494    215146     443464
   7 |  0  0  2  68  1662  11116   54572   197294    601986   1562274    3652850
   8 |  0  0  2 110  4426  38754  240278  1051298   3788268  11325490   30041458
   9 |  0  0  2 178 11774 134902 1056546  5595236  23814458  82024662  246853482
  10 |  0  0  2 288 31316 469306 4643300 29762654 149631992 593798912 2027577296
For n = 4 and k = 3, the following T(4,3) = 16 sequences are counted: 1212, 1213, 1312, 1313, 1323, 2121, 2131, 2132, 2312, 2313, 2323, 3121, 3131, 3132, 3231, 3232.
		

Crossrefs

Rows: A000012 (n=0), A001477 (n=1), A002378 (n=2), A055232 (terms of row n=3 divided by 2).
Columns: A000007 (k=0), A019590 (k=1), A040000 (k=2), A054886 (k=3).

Programs

  • Python
    def A350529_col(k,nmax):
        d = []
        c = [0]*(nmax+1)
        while 1:
            if not d or all(d[-1]):
                c[len(d)] += 1 + (bool(d) and 2*d[0][0] != k+1)
                if len(d) < nmax:
                    d.append([0])
                    for i in range(len(d)-1):
                        d[-1].append(d[-1][-1]-d[-2][i])
            while d and d[-1][0] == k:
                d.pop()
            if not d or len(d) == 1 and 2*d[0][0] >= k: return c
            for i in range(len(d)):
                d[-1][i] += 1

A350365 Array read by antidiagonals: T(n,k) is the number of sequences of length 2*n+1 with terms in 0..k such that the Hankel matrix of the sequence is singular, but the Hankel matrix of any proper subsequence with an odd number of consecutive terms is invertible, n, k >= 0.

Original entry on oeis.org

1, 1, 0, 1, 1, 0, 1, 2, 0, 0, 1, 3, 2, 0, 0, 1, 6, 6, 10, 0, 0, 1, 7, 16, 52, 0, 0, 0, 1, 8, 36, 148, 116, 8, 0, 0, 1, 9, 58, 448, 644, 528, 12, 0, 0, 1, 12, 82, 885, 2932, 4032, 1326, 0, 0, 0
Offset: 0

Views

Author

Pontus von Brömssen, Dec 27 2021

Keywords

Comments

T(n,2) = 0 for n = 4 and for n >= 7.

Examples

			Array begins:
  n\k|  0  1  2   3   4    5
  ---+----------------------
   0 |  1  1  1   1   1    1
   1 |  0  1  2   3   6    7
   2 |  0  0  2   6  16   36
   3 |  0  0 10  52 148  448
   4 |  0  0  0 116 644 2932
For n = 2 and k = 4, the following T(2,4) = 16 sequences are counted:
  (1, 1, 2, 2, 4),
  (1, 2, 1, 2, 1),
  (1, 2, 2, 4, 4),
  (1, 3, 1, 3, 1),
  (1, 4, 1, 4, 1),
  (2, 1, 2, 1, 2),
  (2, 3, 2, 3, 2),
  (2, 4, 2, 4, 2),
  (3, 1, 3, 1, 3),
  (3, 2, 3, 2, 3),
  (3, 4, 3, 4, 3),
  (4, 1, 4, 1, 4),
  (4, 2, 2, 1, 1),
  (4, 2, 4, 2, 4),
  (4, 3, 4, 3, 4),
  (4, 4, 2, 2, 1).
		

Crossrefs

Cf. A000012 (row n = 0), A132188 (row n = 1), A000007 (column k = 0), A019590 (column k = 1).

A353435 Array read by descending antidiagonals: T(n,m) is the number of sequences of length n >= 0 with elements in 0..m-1 such that the Hankel matrix of any odd number of consecutive terms is invertible over the ring of integers modulo m >= 1.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 4, 0, 1, 1, 4, 4, 4, 0, 1, 1, 2, 16, 0, 4, 0, 1, 1, 6, 4, 48, 0, 0, 0, 1, 1, 4, 36, 0, 144, 0, 0, 0, 1, 1, 6, 16, 180, 0, 320, 0, 0, 0, 1, 1, 4, 36, 0, 900, 0, 720, 0, 0, 0, 1, 1, 10, 16, 108, 0, 3744, 0, 1312, 0, 0, 0, 1
Offset: 0

Views

Author

Pontus von Brömssen, Apr 21 2022

Keywords

Comments

T(n,m) is divisible by T(2,m) = A127473(n) for n >= 2, because if r and s are coprime to m, the sequence (x_1, ..., x_n) satisfies the conditions if and only if the sequence (r*s^0*x_1 mod m, ..., r*s^(n-1)*x_n mod m) does.

Examples

			Array begins:
  n\m| 1  2  3  4    5  6        7  8   9 10
  ---+--------------------------------------
   0 | 1  1  1  1    1  1        1  1   1  1
   1 | 1  1  2  2    4  2        6  4   6  4
   2 | 1  1  4  4   16  4       36 16  36 16
   3 | 1  0  4  0   48  0      180  0 108  0
   4 | 1  0  4  0  144  0      900  0 324  0
   5 | 1  0  0  0  320  0     3744  0   0  0
   6 | 1  0  0  0  720  0    15552  0   0  0
   7 | 1  0  0  0 1312  0    54216  0   0  0
   8 | 1  0  0  0 2400  0   189468  0   0  0
   9 | 1  0  0  0 3232  0   550728  0   0  0
  10 | 1  0  0  0 4560  0  1604088  0   0  0
  11 | 1  0  0  0 4656  0  3895560  0   0  0
  12 | 1  0  0  0 4928  0  9467856  0   0  0
  13 | 1  0  0  0 4368  0 19185516  0   0  0
		

Crossrefs

Rows: A000012 (n=0), A000010 (n=1), A127473 (n=2).
Columns: A000012 (m=1), A130716 (m=2), A166926 (m=4 and m=6).

Formula

For fixed n, T(n,m) is multiplicative with T(n,p^e) = T(n,p)*p^(n*(e-1)).
T(n,m) = A353436(n,m) if m is prime.
T(3,m) = (m-1)^2*(m-2) = A045991(m-1) if m is prime.
T(4,m) = (m-1)^2*(m-2)^2 = A035287(m-1) if m is prime.
Empirically: T(5,m) = (m-1)^2*(m-3)*(m^2-4*m+5) if m >= 3 is prime.
T(n,2) = 0 for n >= 3.
T(n,3) = 0 for n >= 5.
T(n,5) = 0 for n >= 23.
Showing 1-4 of 4 results.