login
A078339
Let u(1)=u(2)=u(3)=1 and u(n)=(-1)^n*sign(u(n-1)-u(n-2))*u(n-3); then a(n)=sum(k=1,n,sum(i=1,k,u(i))) - 3*(n-1).
0
1, 0, 0, 0, 1, 3, 5, 6, 8, 10, 11, 11, 11, 10, 8, 6, 5, 3, 1, 0, 0, 0, 1, 3, 5, 6, 8, 10, 11, 11, 11, 10, 8, 6, 5, 3, 1, 0, 0, 0, 1, 3, 5, 6, 8, 10, 11, 11, 11, 10, 8, 6, 5, 3, 1, 0, 0, 0, 1, 3, 5, 6, 8, 10, 11, 11, 11, 10, 8, 6, 5, 3, 1, 0, 0, 0, 1, 3, 5, 6, 8, 10, 11, 11, 11, 10, 8, 6, 5, 3, 1
OFFSET
1,6
COMMENTS
Note the palindromic form of the periodic part: 0,0,1,3,5,6,8,10,11,11,11,10,8,6,5,3,1,0,0.
FORMULA
Periodic with period 18.
MATHEMATICA
LinearRecurrence[{1, 0, 0, 0, 0, 0, 0, 0, -1, 1}, {1, 0, 0, 0, 1, 3, 5, 6, 8, 10}, 91] (* Ray Chandler, Aug 27 2015 *)
CROSSREFS
Sequence in context: A099441 A129359 A110801 * A174805 A354140 A183872
KEYWORD
nonn
AUTHOR
Benoit Cloitre, Nov 21 2002
STATUS
approved