OFFSET
0,3
COMMENTS
LINKS
Altug Alkan, Table of n, a(n) for n = 0..19682
Rémy Sigrist, Colored scatterplot of a(n) for n = 0..3^10-1 (where the color is function of floor(n / 3^(A081604(n)-5)))
MATHEMATICA
a[0]=0; a[n_] := a[n] = If[Mod[n, 3] == 0, -5 a[n/3], n + a[n - 1]]; Array[a, 70, 0] (* Giovanni Resta, Aug 27 2018 *)
PROG
(PARI) a(n)=if(n==0, 0, if(n%3, n+a(n-1), -5*a(n/3)));
(Magma) [0] cat [n eq 1 select 1 else n mod 3 eq 0 select -5*Self(n div 3) else Self(n-1)+n: n in [1..70]]; // Vincenzo Librandi, Aug 28 2018
CROSSREFS
KEYWORD
sign,look
AUTHOR
Altug Alkan, Aug 27 2018
STATUS
approved