A181434 First column in matrix inverse of a mixed convolution of A052542.
1, -3, -1, 0, -1, 1, -1, 0, 0, 1, -1, 0, -1, 1, 1, 0, -1, 0, -1, 0, 1, 1, -1, 0, 0, 1, 0, 0, -1, -1, -1, 0, 1, 1, 1, 0, -1, 1, 1, 0, -1, -1, -1, 0, 0, 1, -1, 0, 0, 0, 1, 0, -1, 0, 1, 0, 1, 1, -1, 0, -1, 1, 0, 0, 1, -1, -1, 0, 1, -1, -1, 0, -1, 1, 0, 0, 1
Offset: 1
Keywords
Links
- R. J. Mathar, Table of n, a(n) for n = 1..1085
Programs
-
Maple
b := proc(n) option remember; local c; c := 2; if n <= 2 then n; elif n = 3 then c^2 ; else c*procname(n-1)+procname(n-2) ; end if; end proc: A := proc(n,k) if n >= k then b(n-k+1) ; else 0 ; end if; end proc: B := proc(n,k) if modp(n,k) = 0 then 1; else 0; end if; end proc: AB := proc(n,k) option remember; add( A(n,j)*B(j,k),j=1..n) ; end proc: ABinv := proc(n,k) option remember; if k > n then 0; elif k = n then 1; else -add( AB(n,j)*procname(j,k),j=k..n-1) ; end if; end proc: A181434 := proc(n) ABinv(n,1) ; end proc: for n from 1 do printf("%d %d\n",n,ABinv(n,1)) ; end do: # R. J. Mathar, Oct 06 2017
-
Mathematica
Clear[t, n, k, nn, b, A, c]; nn = 77; c = 2; b[0] = 1; b[1] = 1; b[n_] := b[n] = c*b[n - 1] + b[n - 2]; t[n_, 1] = If[n >= 1, b[n], 0]; t[n_, k_] := t[n, k] = If[n >= k, Sum[t[n - i, k - 1], {i, 1, k - 1}] - Sum[t[n - i, k], {i, 1, k - 1}], 0]; MatrixForm[A = Table[Table[t[n, k], {k, 1, nn}], {n, 1, nn}]]; Inverse[A][[All, 1]] (* Mats Granvik, Sep 15 2017 *)
-
PARI
A181434(n)=if(n==2,-3,moebius(n)) \\ M. F. Hasler, Sep 15 2017. - This program seems to be based on a formula that is so far only conjectural? - Antti Karttunen, Oct 06 2017
Formula
From Mats Granvik, Sep 16 2017: (Start)
a(n) as the matrix inverse of a mixed convolution: Let c = 2 and let the sequence b be defined by the recurrence: b(1) = 1, b(2) = c, b(3) = c^2; for n >= 4, b(n) = c*b(n-1) + b(n-2), so b(n) = A052542(n-1), and let the lower triangular matrix A be: If n >= k then A(n,k) = b(n - k + 1) else A(n,k) = 0, and let B be the lower triangular matrix A051731. Then the matrix inverse (A.B)^-1 will have a(n) as its first column.
The matrix product T = A.B can be defined as follows: Let c = 2 and the sequence b be defined by the recurrence b(0) = 1, b(1) = 1; for b >= 2, b(n) = c*b(n - 1) + b(n - 2), so b(n) = A001333(n); and let T be the lower triangular matrix defined by the recurrence: T(n, 1) = If n >= 1 then T(n, 1) = b(n) else T(n, 1) = 0; for k >= 2, T(n, k) = If n >= k then (Sum_{i=1..k-1} T(n - i, k - 1) - T(n - i, k)) else 0. (Then the matrix inverse of T will have a(n) as its first column.)
(End)
Comments