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-2 of 2 results.

A099530 Expansion of 1/(1 - x + x^4).

Original entry on oeis.org

1, 1, 1, 1, 0, -1, -2, -3, -3, -2, 0, 3, 6, 8, 8, 5, -1, -9, -17, -22, -21, -12, 5, 27, 48, 60, 55, 28, -20, -80, -135, -163, -143, -63, 72, 235, 378, 441, 369, 134, -244, -685, -1054, -1188, -944, -259, 795, 1983, 2927, 3186, 2391, 408, -2519, -5705, -8096, -8504, -5985, -280, 7816, 16320, 22305, 22585, 14769
Offset: 0

Views

Author

Paul Barry, Oct 20 2004

Keywords

Comments

Binomial transform of A099531.

Crossrefs

Programs

  • Magma
    [n le 4 select 1 else Self(n-1) -Self(n-4): n in [1..81]]; // G. C. Greubel, Apr 13 2023
    
  • Mathematica
    LinearRecurrence[{1,0,0,-1}, {1,1,1,1}, 80] (* G. C. Greubel, Apr 13 2023 *)
  • SageMath
    @CachedFunction
    def a(n): # a = A099530
        if (n<4): return 1
        else: return a(n-1) - a(n-4)
    [a(n) for n in range(81)] # G. C. Greubel, Apr 13 2023

Formula

a(n) = a(n-1) - a(n-4).
a(n) = Sum_{k=0..floor(n/4)} binomial(n-3*k, k)*(-1)^k.

A193885 a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3) - a(n-4), n>=4; a(0) = 1, a(1) = 1, a(2) = 2, a(3) = 3.

Original entry on oeis.org

1, 1, 2, 3, 3, 1, -5, -18, -41, -75, -115, -143, -118, 35, 431, 1213, 2499, 4254, 6047, 6665, 3609, -7375, -32334, -77933, -147781, -234503, -305765, -283634, -20329, 718653, 2239077, 4824577, 8495482, 12533139, 14698471, 10166901, -9557053, -57006530
Offset: 0

Views

Author

Johannes W. Meijer, Aug 11 2011

Keywords

Comments

The Ze1 sums, see A180662, of triangle A108299 equal the terms of this sequence.

Crossrefs

Programs

  • Magma
    I:=[1, 1, 2, 3 ]; [n le 4 select I[n] else 3*Self(n-1)-3*Self(n-2)+Self(n-3)-Self(n-4): n in [1..40]]; // Vincenzo Librandi, Jul 10 2012
  • Maple
    A193885 := proc(n) option remember: if n=0 then 1 elif n=1 then 1 elif n=2 then 2 elif n=3 then 3 elif n>=4 then 3*procname(n-1)-3*procname(n-2)+procname(n-3)-procname(n-4) fi: end: seq(A193885(n),n=0..37);
  • Mathematica
    CoefficientList[Series[(1-x)*(1-x+x^2)/(1-3*x+3*x^2-x^3+x^4),{x,0,50}],x] (* Vincenzo Librandi, Jul 10 2012 *)

Formula

a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3) - a(n-4), n>=4; a(0) = 1, a(1) = 1, a(2) = 2, a(3) = 3.
G.f.: (1-x)*(1-x+x^2)/(1-3*x+3*x^2-x^3+x^4).
a(n) = (-1)^(n+1)*(A099531(n+4) + 2*A099531(n+3) + 2*A099531(n+2) + A099531(n+1)).
Showing 1-2 of 2 results.