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.

A120474 Second differences of A004001.

Original entry on oeis.org

1, -1, 1, 0, -1, 0, 1, 0, 0, -1, 1, -1, 0, 0, 1, 0, 0, 0, -1, 1, 0, -1, 1, -1, 0, 1, -1, 0, 0, 0, 1, 0, 0, 0, 0, -1, 1, 0, 0, -1, 1, 0, -1, 1, -1, 0, 1, 0, -1, 1, -1, 0, 1, -1, 0, 0, 1, -1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, -1, 1, 0, 0, 0, -1, 1, 0, 0, -1, 1, 0, -1, 1, -1, 0, 1, 0, 0, -1, 1, 0, -1, 1, -1, 0, 1, 0, -1, 1, -1, 0, 1, -1, 0, 0, 1
Offset: 1

Views

Author

Roger L. Bagula, Jul 06 2006

Keywords

Comments

Takes values in {0,1,-1}.

Crossrefs

Cf. A004001. First differences of A093879.

Programs

  • Mathematica
    Differences[#, 2] &@ Nest[Append[#1, #1[[#1[[-1]] ]] + #1[[#2 - #1[[-1]] ]] ] & @@ {#, Length@ # + 1} &, {1, 1}, 105] (* Michael De Vlieger, Nov 05 2018 *)

Formula

a(n) = A004001(n+2) - 2*A004001(n+1) + A004001(n) = A093879(n+1) - A093879(n).

Extensions

Edited by N. J. A. Sloane, Oct 01 2006