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.

Previous Showing 11-15 of 15 results.

A100329 a(n) = -a(n-1) -a(n-2) -a(n-3) +a(n-4), a(0)=0, a(1)=1, a(2)=-1, a(3)=0.

Original entry on oeis.org

0, 1, -1, 0, 0, 2, -3, 1, 0, 4, -8, 5, -1, 8, -20, 18, -7, 17, -48, 56, -32, 41, -113, 160, -120, 114, -267, 433, -400, 348, -648, 1133, -1233, 1096, -1644, 2914, -3599, 3425, -4384, 7472, -10112, 10449, -12193, 19328, -27696, 31010, -34835, 50849, -74720, 89716, -100680
Offset: 0

Views

Author

Mitch Harris, Nov 16 2004

Keywords

Comments

Reflected tetranacci numbers (see 1st formula).

Crossrefs

Cf. A000078.
Cf. A000073 (tribonacci), A057597 (reflected tribonacci).

Programs

  • Magma
    I:=[0,1,-1,0]; [n le 4 select I[n] else -Self(n-1) -Self(n-2) -Self(n-3) +Self(n-4): n in [1..61]]; // G. C. Greubel, Jan 30 2023
    
  • Maple
    a:= n-> (<<1|1|0|0>, <1|0|1|0>, <1|0|0|1>, <1|0|0|0>>^(-n))[1, 4]:
    seq(a(n), n=0..50);  # Alois P. Heinz, Jun 12 2008
  • Mathematica
    CoefficientList[Series[x/(1+x+x^2+x^3-x^4), {x, 0, 50}], x]
    LinearRecurrence[{-1,-1,-1,1},{0,1,-1,0},60] (* Harvey P. Dale, May 20 2018 *)
  • SageMath
    @CachedFunction
    def a(n): # a=A100329
        if (n<4): return (0,1,-1,0)[n]
        else: return -a(n-1)-a(n-2)-a(n-3)+a(n-4)
    [a(n) for n in range(61)] # G. C. Greubel, Jan 30 2023

Formula

a(n) = A000078(-n).
Let Q(n) = A000078, then a(n) = (-1)^(n+1)*(Q(n)^3 - 2*Q(n-1)*Q(n) *Q(n+1) + Q(n-2)*Q(n+1)^2 + Q(n-1)^2*Q(n+2) - Qn(-2)*Q(n)*Q(n+2)) derived from powers of the inverse of a generalized Fibonacci matrix.
G.f.: x/(1+x+x^2+x^3-x^4).
G.f. of absolute values: x/(1-x+x^2-x^3-x^4). - Vaclav Kotesovec, Oct 18 2013
a(n) = term (1,4) in the 4 X 4 matrix [1,1,0,0; 1,0,1,0; 1,0,0,1; 1,0,0,0]^(-n). - Alois P. Heinz, Jun 12 2008

A180735 Expansion of (1+x)*(1-x)/(1 - x + x^2 + x^3).

Original entry on oeis.org

1, 1, -1, -3, -3, 1, 7, 9, 1, -15, -25, -11, 29, 65, 47, -47, -159, -159, 47, 365, 477, 65, -777, -1319, -607, 1489, 3415, 2533, -2371, -8319, -8481, 2209, 19009, 25281, 4063, -40227, -69571, -33407, 76391, 179369, 136385
Offset: 0

Views

Author

Gary W. Adamson, Jan 22 2011

Keywords

Comments

Let r1 be the tribonacci constant A058265, and r2 = -0.41964... + 0.6062...*i, where i = sqrt(-1), and r3 the complex conjugate of r2, the other constants also defined in A058265.
A formula in terms of cubic roots is known for r1 (see A058265), and Re(r2) = Re(r3) = (1-r1)/2 and Im(r2) = -Im(r3) = sqrt( 1/r1-Re^2(r2)).
Then the denominator of the g.f. is (x+r1)*(x+r2)*(x+r3) = x^3 + x^2 + 1 - x,
and the Binet formula is a(n) = (r3^2-1)*(-r3)^(-n-1)/( (r2-r3)*(r1-r3) ) -(r2^2-1)*(-r2)^(-n-1)/( (r2-r3)*(r1-r2) ) +(r1^2-1)*(-r1)^(-n-1)/( (r1-r2)*(r1-r3) ). - R. J. Mathar, based on input from Alexander R. Povolotsky and T. D. Noe

Examples

			a(6) = 7 = (1, 1, 1, -1, -3, -3, 1) dot (-2, 0, 2, 0, -2, 0, 1) = (-2, 0, 2, 0, 6, 0, 1) = 7.
		

Programs

  • Mathematica
    CoefficientList[Series[(1 + x)*(1 - x)/(1 - x + x^2 + x^3), {x, 0, 50}], x] (* G. C. Greubel, Feb 22 2017 *)
    LinearRecurrence[{1,-1,-1},{1,1,-1},50] (* Harvey P. Dale, Aug 10 2021 *)
  • PARI
    x='x+O('x^50); Vec((1 + x)*(1 - x)/(1 - x + x^2 + x^3)) \\ G. C. Greubel, Feb 22 2017

Formula

INVERT transform of (1, 0, -2, 0, 2, 0, -2, 0, 2, 0, ...) = INVERT transform of (1 - 2x^2 + 2x^4 - 2x^6 + 2x^8 - ...).
a(n) = a(n-1) - a(n-2) - a(n-3), n > 3.
a(n) = (-1)^n*(A057597(n+2) - A057597(n)). - R. J. Mathar, Jan 27 2011

A321196 Riordan triangle T = (1/(1 + x^2 - x^3), x/(1 + x^2 - x^3)).

Original entry on oeis.org

1, 0, 1, -1, 0, 1, 1, -2, 0, 1, 1, 2, -3, 0, 1, -2, 3, 3, -4, 0, 1, 0, -6, 6, 4, -5, 0, 1, 3, -1, -12, 10, 5, -6, 0, 1, -2, 12, -4, -20, 15, 6, -7, 0, 1, -3, -7, 30, -10, -30, 21, 7, -8, 0, 1, 5, -16, -15, 60, -20, -42, 28, 8, -9, 0, 1
Offset: 0

Views

Author

Wolfdieter Lang, Nov 09 2018

Keywords

Comments

This is the (ordinary) convolution triangle based on A077961 (the column k = 0 of T).
The row polynomials R(n, x) := Sum_{k=0..n} T(n, k)*x^k, with R(-1, x) = 0, appear in the Cayley-Hamilton formula for nonnegative powers of a 3 X 3 matrix with Det M = sigma(3; 3) = x1*x2*x3 = +1, sigma(3; 2) := x1*x2 + x1*x*3 + x2*x^3 = +1 and Tr M = sigma(3; 1) = x1 + x2 = x, where x1, x2, and x3 are the eigenvalues of M, and sigma the elementary symmetric functions, as M^n = R(n-2, x)*M^2 + (-R(n-3, x) + R(n-4, x))*M + R(n-3, x)*1_3, for n >= 3, where M^0 = 1_3 is the 3 X 3 unit matrix.
For the Cayley-Hamilton formula for 3 X 3 matrices with Det M = +1, sigma(3,2) = -1 and Tr(M) = x see A104578.
The row sums give A133872 (repeat(1, 1, 0, 0)). The alternating row sums give A057597(n+2), for n >= 0.
The Riordan triangle (1/(1 + x^2 + x^3), x/(1 + x^2 + x^3)) has entries t(n, m) = (-1)^(n-m)*T(n, m) (from the g.f. G(-x, -z), where the g.f. G of T is given below).
The inverse of Riordan T is T^{-1}, given in A321198.

Examples

			The triangle T(n, k) begins:
n\k  0   1   2   3   4   5  6  7  8  9 10 ...
---------------------------------------------
0:   1
1:   0   1
2:  -1   0   1
3:   1  -2   0   1
4:   1   2  -3   0   1
5:  -2   3   3  -4   0   1
6:   0  -6   6   4  -5   0  1
7:   3  -1 -12  10   5  -6  0  1
8:  -2  12  -4 -20  15   6 -7  0  1
9:  -3  -7  30 -10 -30  21  7 -8  0  1
10:  5 -16 -15  60 -20 -42 28  8 -9  0  1
...
Cayley-Hamilton formula for the matrix TS(x) =[[x,-1,1], [1,0,0], [0,1,0]] with Det(TS(x)) = +1, sigma(3, 2) = +1, and Tr(TS(x)) = x. For n = 3: TS(x)^3 = R(1, x)*TS(x)^2 + (-R(0, x) + R(-1, x))*TS(x) + R(0, x)*1_3 = x*TS(x)^2 - TS(x) + 1_3. Compare this for x = -1 with r^3 = R(3)*r^2 + (-R(2) + R(1))*r + R(2)*1 = r^2 - r + 1, where r = 1/t = A192918, with the tribonacci constant t = A058265, and R(n) = A057597(n) = R(n-2, -1).
Recurrence: T(5, 2) = T(4, 1) - T(3, 2) + T(2, 2) = 1 -(-1) + 1 = 3.
Boas-Buck type recurrence with B = {0, -2, 3, ...}:
  T(5, 2) = ((2+1)/(5-2))*(3*1 + (-2)*0 + 0*(-3)) = 1*3 = 3.
Z- and A-recurrence with A(n) = {1, 0, -1, 1, -1, ...} and Z(n) = A(n+1):
  T(4, 0) = 0*T(3, 0) - 1*T(3, 1) + 1*T(3, 2) - 1*T(3, 3) = 0 + 2 + 0 - 1 = 1.
  T(5, 2) = 1*T(4, 1) + 0*T(4, 2) - 1*T(4, 3) + 1*T(4, 4) = 2 + 0 + 0 + 1 = 3.
		

Crossrefs

Programs

  • Mathematica
    T[n_, k_] /; 0 <= k <= n := T[n, k] = T[n - 1, k - 1] - T[n - 2, k] + T[n - 3, k]; T[0, 0] = 1; T[, ] = 0;
    Table[T[n, k], {n, 0, 10}, {k, 0, n}] (* Jean-François Alcover, Jul 06 2019 *)
  • Sage
    # uses[riordan_array from A256893]
    riordan_array(1/(1 + x^2 - x^3), x/(1 + x^2 - x^3), 11) # Peter Luschny, Nov 13 2018

Formula

T(n, k) = T(n-1, k-1) - T(n-2, k) + T(n-3, k), T(0, 0) = 1, T(n,k) = 0 if n < k or if k < 0. (Cf. A104578.)
The Riordan property T = (G(x), x*G(x)) with G(x) = 1/(1 + x^2 - x^3) implies the following.
G.f. of row polynomials R(n, x) is G(x, z) = 1/(1 - x*z + z^2 - z^3).
G.f. of column sequence k: x^k/(1 + x^2 - x^3)^(k+1), k >= 0.
Boas-Buck recurrence (see the Aug 10 2017 remark in A046521, also for two references):
T(n, k) = ((k+1)/(n-k))*Sum_{j=k..n-1} B(n-1-j)*T(j, k), for n >= 1, k = 0,1, ..., n-1, and input T(n, n) = 1, for n >= 0. Here B(n) = [x^n]*(d/dx)log(G(x)) = x*(-2 + 3*x)/(1 + x^2 - x^3) = (-1)^n*A112455(n+1), for n >= 0.
Recurrences from the A- and Z- sequences (see the W. Lang link under A006232 with references), which are A(n) = A321197(n) and Z(n) = A(n+1).
T(0, 0) = 1, T(n, k) = 0 for n < k, and
T(n, 0) = Sum_{j=0..n-1} Z(j)*T(n-1, j), for n >= 1, and
T(n, k) = Sum_{j=0..n-k} A(j)*T(n-1, k-1+j), for n >= m >= 1.

A105580 a(n+3) = a(n) - a(n+1) - a(n+2); a(0) = -5, a(1) = 6, a(2) = 0.

Original entry on oeis.org

-5, 6, 0, -11, 17, -6, -22, 45, -29, -38, 112, -103, -47, 262, -318, 9, 571, -898, 336, 1133, -2367, 1570, 1930, -5867, 5507, 2290, -13664, 16881, -927, -29618, 47426, -18735, -58309, 124470, -84896, -97883, 307249, -294262, -110870, 712381, -895773, 72522, 1535632, -2503927, 1040817, 2998742
Offset: 0

Views

Author

Creighton Dement, Apr 14 2005

Keywords

Comments

Floretion Algebra Multiplication Program, FAMP Code: 2tesforseq[.5'j + .5'k + .5j' + .5k' + .5'ii' + .5e], 1vesforseq = A000004, ForType: 1A.

Examples

			This sequence was generated using the same floretion which generated the sequences A105577, A105578, A105579, etc.. However, in this case a force transform was applied. [Specifically, (a(n)) may be seen as the result of a tesfor-transform of the zero-sequence A000004 with respect to the floretion given in the program code.]
		

Crossrefs

Programs

  • Mathematica
    Transpose[NestList[Join[Rest[#],ListCorrelate[ {1,-1,-1}, #]]&,{-5,6,0},50]][[1]]  (* Harvey P. Dale, Mar 14 2011 *)
    CoefficientList[Series[(5-x-x^2)/(x^3-x^2-x-1),{x,0,50}],x]  (* Harvey P. Dale, Mar 14 2011 *)

Formula

G.f. (5-x-x^2)/(x^3-x^2-x-1)
a(n) = A078046(n-1) - A073145(n+3).
a(n) = -5*A057597(n+2) + A057597(n+1)+A057597(n). - R. J. Mathar, Oct 25 2022

A349904 Inverse Euler transform of the tribonacci numbers A000073.

Original entry on oeis.org

0, 0, 1, 1, 2, 3, 6, 10, 18, 31, 56, 96, 172, 299, 530, 929, 1646, 2893, 5126, 9044, 16028, 28362, 50328, 89249, 158598, 281830, 501538, 892857, 1591282, 2837467, 5064334, 9044023, 16163946, 28906213, 51729844, 92628401, 165967884, 297541263, 533731692, 957921314
Offset: 1

Views

Author

Peter Luschny, Dec 05 2021

Keywords

Crossrefs

Column k=2 of A349802.
Cf. A000073, A057597 (tribonacci numbers for n <= 0), A006206 and A060280.

Programs

  • Maple
    read transforms;  # https://oeis.org/transforms.txt
    arow := len -> EULERi([seq(A000073(n), n = 0..len)]): arow(39);
    # second Maple program:
    t:= n-> (<<0|1|0>, <0|0|1>, <1|1|1>>^n)[1, 3]:
    b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0,
          add(binomial(a(i)+j-1, j)*b(n-i*j, i-1), j=0..n/i)))
        end:
    a:= proc(n) option remember; t(n-1)-b(n, n-1) end:
    seq(a(n), n=1..40);  # Alois P. Heinz, Dec 05 2021
  • Mathematica
    (* EulerInvTransform is defined in A022562. *)
    EulerInvTransform[LinearRecurrence[{1, 1, 1}, {0, 0, 1}, 40]]
  • PARI
    InvEulerT(v)={my(p=log(1+x*Ser(v))); dirdiv(vector(#v,n,polcoef(p,n)), vector(#v,n,1/n))}
    seq(n) = InvEulerT(Vec(x^2/(1 - x - x^2 - x^3) + O(x^n), -n)) \\ Andrew Howroyd, Dec 05 2021
  • Python
    # After the Maple program of Alois P. Heinz.
    from functools import cache
    from math import comb
    def binomial(n, k):
        if n == -1: return 1
        return comb(n, k)
    @cache
    def A000073(n):
        if n <= 1: return 0
        if n == 2: return 1
        return A000073(n-1) + A000073(n-2) + A000073(n-3)
    @cache
    def b(n, i):
        if n == 0: return 1
        if i <  1: return 0
        return sum(binomial(a(i) + j - 1, j) *
                   b(n - i * j, i - 1) for j in range(1 + n // i))
    @cache
    def a(n): return (A000073(n - 1) - b(n, n - 1))
    print([a(n) for n in range(1, 41)])
    
  • SageMath
    def euler_invtrans(A) :
        L = []; M = []
        for i in range(len(A)) :
            s = (i+1)*A[i] - sum(L[j-1]*A[i-j] for j in (1..i))
            L.append(s)
            s = sum(moebius((i+1)/d)*L[d-1] for d in divisors(i+1))
            M.append(s/(i + 1))
        return M
    @cached_function
    def a(n): return a(n-1) + a(n-2) + a(n-3) if n > 2 else [0,0,1][n]
    print(euler_invtrans([a(n) for n in range(40)]))
    
Previous Showing 11-15 of 15 results.