cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A318488 a(0) = 0, a(n) = -5*a(n/3) if n is divisible by 3, otherwise a(n) = n + a(n-1).

Original entry on oeis.org

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

Views

Author

Altug Alkan, Aug 27 2018

Keywords

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.

Crossrefs

Programs

  • 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
  • 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 *)
  • PARI
    a(n)=if(n==0, 0, if(n%3, n+a(n-1), -5*a(n/3)));