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.

This page as a plain text file.
%I A350330 #25 May 22 2024 11:32:53
%S A350330 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,
%T A350330 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,
%U A350330 1,2,3,1,1,2,1,1,2,2,1,2,1,1,2,1,2,3,1
%N A350330 Lexicographically earliest sequence of positive integers such that the Hankel matrix of any odd number of consecutive terms is invertible.
%C A350330 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.
%C A350330 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?
%C A350330 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.
%C A350330 Agrees with A154402 for the first 20 terms, but differs on the 21st.
%H A350330 Robert Israel, <a href="/A350330/b350330.txt">Table of n, a(n) for n = 1..1000</a> (1..400 from _Pontus von Brömssen)
%H A350330 Wikipedia, <a href="https://en.wikipedia.org/wiki/Hankel_matrix">Hankel matrix</a>
%e A350330 a(15) = 3, because the Hankel matrix of (a(11), ..., a(15)) is
%e A350330   [1  2   1  ]
%e A350330   [2  1   2  ]
%e A350330   [1  2 a(15)],
%e A350330 which is singular if a(15) = 1, and the Hankel matrix of (a(5), ..., a(15)) is
%e A350330   [1  2  2  1  2   1  ]
%e A350330   [2  2  1  2  1   1  ]
%e A350330   [2  1  2  1  1   2  ]
%e A350330   [1  2  1  1  2   1  ]
%e A350330   [2  1  1  2  1   2  ]
%e A350330   [1  1  2  1  2 a(15)],
%e A350330 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.
%o A350330 (Python)
%o A350330 from sympy import Matrix
%o A350330 from itertools import count
%o A350330 def A350330_list(nmax):
%o A350330     a=[]
%o A350330     for n in range(nmax):
%o A350330         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))))
%o A350330     return a
%o A350330 (Python)
%o A350330 # Faster version using numpy instead of sympy.
%o A350330 # Due to floating point errors, the results may be inaccurate for large n. Correctness verified up to n=400 for numpy 1.20.2.
%o A350330 from numpy import array
%o A350330 from numpy.linalg import det
%o A350330 from itertools import count
%o A350330 def A350330_list(nmax):
%o A350330     a=[]
%o A350330     for n in range(nmax):
%o A350330         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))))
%o A350330     return a
%Y A350330 Cf. A350351, A350348, A350349, A350350, A350364, A154402.
%K A350330 nonn
%O A350330 1,3
%A A350330 _Pontus von Brömssen_, Dec 25 2021