[go: up one dir, main page]

login
A270655
a(3n)=a(n), a(3n+1)=a(3n)+a(3(n+1)), a(3n+2)=a(3(n+1))-a(3n); a(0)=0, a(1)=1.
2
0, 1, 1, 1, 2, 0, 1, 2, 0, 1, 3, 1, 2, 2, -2, 0, 1, 1, 1, 3, 1, 2, 2, -2, 0, 1, 1, 1, 4, 2, 3, 4, -2, 1, 3, 1, 2, 4, 0, 2, 0, -4, -2, -2, 2, 0, 1, 1, 1, 2, 0, 1, 2, 0, 1, 4, 2, 3, 4, -2, 1, 3, 1, 2, 4, 0, 2, 0, -4, -2, -2, 2, 0, 1, 1, 1, 2, 0, 1, 2, 0, 1
OFFSET
0,5
LINKS
FORMULA
a(3n)=a(n), a(3n+1)=a(3n)+a(3(n+1)), a(3n+2)=a(3(n+1))-a(3n); a(0)=0, a(1)=1.
MATHEMATICA
a[0] = 0; a[1] = 1; a[n_] := a[n] = Switch[Mod[n, 3], 0, a[n/3], 1, a[3((n-1)/3 + 1)] + a[n-1], 2, a[3((n-2)/3 + 1)] - a[n-2]];
a /@ Range[0, 100] (* Jean-François Alcover, Apr 10 2020 *)
CROSSREFS
Sequence in context: A058709 A025842 A141100 * A229140 A280317 A283304
KEYWORD
sign,look
AUTHOR
Max Barrentine, Mar 20 2016
STATUS
approved