OFFSET
0,3
COMMENTS
LINKS
Altug Alkan, Table of n, a(n) for n = 0..32767
Rémy Sigrist, Colored scatterplot of a(n) for n = 0..1000000 (where the color is function of A262304(n))
Rémy Sigrist, Colored scatterplot of a(n) for n = 0..1000000 (where the color is function of floor(n / 2^(A070939(n) - 6)))
Rémy Sigrist, A colored scatterplot of (A317825(n), abs(A318303(n))) for n = 1..2^20-1 (where the color is function of floor(n / 2^(A070939(n)-5)))
MATHEMATICA
Nest[Append[#1, If[OddQ@ #2, #2 + #1[[-1]], -3 #1[[#2/2 + 1]] ]] & @@ {#, Length@ #} &, {0}, 66] (* Michael De Vlieger, Aug 25 2018 *)
PROG
(PARI) a(n)=if(n==0, 0, if(n%2, n+a(n-1), -3*a(n/2)));
CROSSREFS
KEYWORD
sign,look
AUTHOR
Altug Alkan, Aug 24 2018
STATUS
approved