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.

A229654 Quadrisection a(4n+k) gives k-th differences of a for k=0..3 with a(n)=0 for n<3 and a(3)=1.

Original entry on oeis.org

0, 0, 0, 1, 0, 0, 1, -3, 0, 1, -2, 3, 1, -1, 1, 0, 0, 0, 1, -6, 0, 1, -5, 12, 1, -4, 7, -9, -3, 3, -2, -2, 0, 1, -4, 12, 1, -3, 8, -15, -2, 5, -7, 7, 3, -2, 0, 4, 1, -2, 4, -7, -1, 2, -3, 4, 1, -1, 1, -1, 0, 0, 0, 1, 0, 0, 1, -9, 0, 1, -8, 21, 1, -7, 13, -18
Offset: 0

Views

Author

Alois P. Heinz, Sep 27 2013

Keywords

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember; (m-> `if`(n<4, `if`(n=3, 1, 0), add(
           a(q+m-j)*(-1)^j*binomial(m, j), j=0..m)))(irem(n, 4, 'q'))
        end:
    seq(a(n), n=0..100);
  • Mathematica
    a[n_] := a[n] = Module[{ m, q}, {q, m} = QuotientRemainder[n, 4]; If[n < 4, If[n == 3, 1, 0], Sum[a[q + m - j]*(-1)^j*Binomial[m, j], {j, 0, m}]]];
    Table[a[n], {n, 0, 100}] (* Jean-François Alcover, Jun 09 2018, from Maple *)

Formula

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