login
A318488
a(0) = 0, a(n) = -5*a(n/3) if n is divisible by 3, otherwise a(n) = n + a(n-1).
1
0, 1, 3, -5, -1, 4, -15, -8, 0, 25, 35, 46, 5, 18, 32, -20, -4, 13, 75, 94, 114, 40, 62, 85, 0, 25, 51, -125, -97, -68, -175, -144, -112, -230, -196, -161, -25, 12, 50, -90, -50, -9, -160, -117, -73, 100, 146, 193, 20, 69, 119, -65, -13, 40, -375, -320, -264, -470, -412, -353, -570, -509, -447, -200, -136, -71, -310
OFFSET
0,3
COMMENTS
From a generalization of A318303 (compare the scatterplots in order to observe connection). In this case, A000244 is determinative for the boundaries of self-similar block structures of this sequence, i.e., n = 3^9 - 1 is a corresponding endpoint.
LINKS
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
Sequence in context: A248916 A030311 A198881 * A256598 A155526 A076553
KEYWORD
sign,look
AUTHOR
Altug Alkan, Aug 27 2018
STATUS
approved