login
A140345
a(n)=a(n-1)^2-a(n-2)-a(n-3)-a(n-4), a(1)=a(2)=a(3)=a(4)=1.
0
1, 1, 1, 1, -2, 1, 1, 1, 1, -2, 1, 1, 1, 1, -2, 1, 1, 1, 1, -2, 1, 1, 1, 1, -2, 1, 1, 1, 1, -2, 1, 1, 1, 1, -2, 1, 1, 1, 1, -2, 1, 1, 1, 1, -2, 1, 1, 1, 1, -2, 1, 1, 1, 1, -2, 1, 1, 1, 1, -2, 1, 1, 1, 1, -2, 1, 1, 1, 1, -2, 1, 1, 1, 1, -2, 1, 1, 1, 1, -2, 1, 1, 1, 1, -2, 1, 1, 1, 1, -2, 1, 1, 1, 1, -2, 1, 1, 1, 1, -2, 1, 1, 1, 1, -2
OFFSET
1,5
COMMENTS
Periodic with period 5: 1,1,1,1,-2
FORMULA
a(n)=a(n-1)^2-a(n-2)-a(n-3)-a(n-4), a(1)=a(2)=a(3)=a(4)=1
EXAMPLE
a(5)=1^2-1-1-1=-2
MATHEMATICA
a[n_]:=a[n]=a[n-1]^2-a[n-2]-a[n-3]-a[a-4]; a[1]=a[2]=a[3]=a[4]=1
LinearRecurrence[{0, 0, 0, 0, 1}, {1, 1, 1, 1, -2}, 105] (* Ray Chandler, Aug 25 2015 *)
CROSSREFS
Sequence in context: A139549 A216915 A280569 * A177706 A130782 A364358
KEYWORD
sign
AUTHOR
Ben Branman, May 29 2008
EXTENSIONS
Extended by Ray Chandler, Aug 25 2015
STATUS
approved