#Oracle SQL 11.2, 218 216 201 bytes#
Oracle SQL 11.2, 218 216 201 bytes
WITH v(a,b,c,d,i)AS(SELECT 0,1,1,4,3 FROM DUAL UNION ALL SELECT b,c,d,3*c-a,i+1 FROM v WHERE i<:1)SELECT SIGN(LEVEL-1) FROM DUAL WHERE LEVEL-1<=:1 CONNECT BY LEVEL<4UNION ALL SELECT d FROM v WHERE:1>2;
Un-golfed
WITH v(a,b,c,d,i) AS
(
SELECT 0,1,1,4,3 FROM DUAL
UNION ALL
SELECT b,c,d,3*c-a,i+1 FROM v WHERE i<:1
)
SELECT SIGN(LEVEL-1) FROM DUAL WHERE LEVEL-1<=:1 CONNECT BY LEVEL<4
UNION ALL SELECT d FROM v WHERE:1>2;
I managed to gain a few bytes by using (abusing ?) the SIGN function to generate the first 3 elements of the sequence.