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.

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