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

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

Original entry on oeis.org

1, 2, 3, 4, 6, 5, 7, 8, 9, 10, 12, 11, 13, 14, 16, 15, 17, 18, 19, 20, 22, 21, 23, 24, 25, 26, 29, 27, 28, 30, 31, 32, 33, 35, 34, 36, 37, 38, 39, 41, 40, 42, 44, 43, 45, 46, 47, 48, 50, 49, 51, 52, 53, 54, 56, 57, 55, 58, 59, 60, 61, 63, 62, 64, 65, 66, 67
Offset: 1

Views

Author

Pontus von Brömssen, Dec 26 2021

Keywords

Comments

From Robert Israel, May 19 2024: (Start)
Given a(1),...,a(n-1), the determinant of the Hankel matrix of [a(n-2*k), ..., a(n-1), x] is of the form A*x + B where A is the determinant of the Hankel matrix of [a(n-2*k), ..., a(n-2)]. Thus if A <> 0 there is only one x that makes this determinant 0. For a(n) there are at most n-1+ceil(n/2) "prohibited" values, namely a(1) to a(n-1) and ceil(n/2) values that make Hankel determinants 0. We conclude that a(n) always exists and a(n) <= 3*n/2. (End)

Crossrefs

Programs

  • Maple
    with(LinearAlgebra):
    R:= [1]: S:= {1};
    for i from 2 to 100 do
      for y from 1 do
        if member(y,S) then next fi;
        found:= false;
        for j from i-2 to 1 by -2 do if Determinant(HankelMatrix([op(R[j..i-1]),y]))=0 then found:= true; break fi od;
        if not found then break fi;
      od;
      R:= [op(R),y];
      S:= S union {y};
    od:
    R; # Robert Israel, May 19 2024
  • Python
    from sympy import Matrix
    from itertools import count
    def A350348_list(nmax):
        a=[]
        for n in range(nmax):
            a.append(next(k for k in count(1) if k not in a and 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

A350350 Lexicographically earliest nondecreasing 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, 2, 3, 3, 5, 5, 6, 6, 7, 7, 9, 9, 11, 11, 12, 12, 14, 14, 15, 15, 16, 16, 18, 18, 19, 19, 21, 21, 24, 24, 25, 25, 26, 26, 28, 28, 29, 29, 30, 30, 32, 32, 34, 34, 35, 35, 37, 37, 38, 38, 39, 39, 41, 41, 43, 43, 46, 46, 48, 48, 50, 50, 51, 51, 52, 52, 55
Offset: 1

Views

Author

Pontus von Brömssen, Dec 26 2021

Keywords

Comments

For 1 <= n <= 34, a(2*n-1) = a(2*n) = 1 + Sum_{k=1..n-1} A350330(k), but this does not hold for n = 35.

Crossrefs

Programs

  • Python
    from sympy import Matrix
    from itertools import count
    def A350350_list(nmax):
        a=[1]
        for n in range(1,nmax):
            a.append(next(k for k in count(a[-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

A376277 The least increasing sequence starting with 1, such that the determinants of the Hankel matrices H1 = [a(0), a(1), ..., a(n); ...; a(n), a(n+1), ..., a(2*n)] and H2 = [a(1), a(2), ..., a(n+1); ...; a(n+1), a(n+2), ..., a(2*n+1)] are > 0.

Original entry on oeis.org

1, 2, 5, 13, 35, 98, 287, 883, 2858, 9708, 34411, 126337, 476767, 1836851, 7185420, 28420613, 113317776, 454468077, 1830556209, 7397188271, 29965426959, 121620119888, 494365414071, 2011965781648, 8196475452837, 33419092543257, 136353532725534, 556669705441210
Offset: 0

Views

Author

Thomas Scheuerle, Sep 23 2024

Keywords

Comments

A Stieltjes moment sequence by its definition.
The Hankel sequence transform gives {1, 1, 1, 1, 1, ...}.
The definition causes that the Hankel sequence transform starting with the second term of this sequence becomes {2, 1, 1, 1, ...}. This single exceptional 2 causes high complexity in the generating function and makes a nice combinatorial interpretation less likely, therefore the keyword "less" was considered.

Crossrefs

Cf. A000108 (We obtain the Catalan numbers if we use "least positive sequence" in the definition instead of "least increasing").
Cf. A375181 (Binomial transform).

Programs

  • PARI
    hankelok(s) = {my(m1=floor((#s+1)/2)); my(m2=floor(#s/2)); my(h1=matrix(m1,m1,x,y,s[x+y-1]));  my(h2=matrix(m2,m2,x,y,s[x+y])); return((matdet(h1) > 0) && (matdet(h2) > 0))}
    a(max_n) = {my(s=[1,2],k=3); while(#s < max_n, while(hankelok(concat(s,[k]))==0,k=k+1); s=concat(s,[k])); return(s)}
    
  • PARI
    my(N=30, x='x+O('x^N)); Vec(1/(1-2*x/(1-(1/2)*x/(1-(1/2)*x/(1-2*x/(1-((1-sqrt(1-4*x))/(2*x))*x))))))
    
  • PARI
    a(n) = if(n<3, [1, 2, 5][n+1], sum(k=1, floor((n+1)/2), (binomial(n-k+1, k)+binomial(n-k, k-1)-binomial(n-k-3, k-4))*(-1)^(k+1)*a(n-k)))

Formula

G.f.: 1/(1-2*x/(1-(1/2)*x/(1-(1/2)*x/(1-2*x/(1-C(x)*x))))), C(x) is the generating function of the Catalan numbers.
G.f.: (1 - sqrt(1 - 4*x)*(-1 + x) - 5*x + 2*x^2)/(1 - 7*x + 11*x^2 + sqrt(1 - 4*x)*(1 - 3*x + x^2)).
(sqrt((x - 4)/x) + 2*x*(13 + (x - 7)*x) - 9)/(2*((x - 4)*(x - 3)*(x - 2)*x - 1)) = Sum_{k>=0} a(k)/x^(k+1).
a(n) = Sum_{k=1..floor((n+1)/2)} (binomial(n-k+1, k) + binomial(n-k, k-1) - binomial(n-k-3, k-4))*(-1)^(k+1)*a(n-k), for n >= 3.
a(n) = Sum_{k=1..floor((n+1)/2)} (A034807(n+1, k) - A011973(n+1, k-4))*(-1)^(k+1)*a(n-k), for n >= 3.
Showing 1-4 of 4 results.