A120474 Second differences of A004001.
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
Keywords
Links
- R. J. Mathar, Table of n, a(n) for n = 1..9998
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 *)
Extensions
Edited by N. J. A. Sloane, Oct 01 2006
Comments