The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 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

%I

%S 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,

%T 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,

%U 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

%N a(n)=a(n-1)^2-a(n-2)-a(n-3)-a(n-4), a(1)=a(2)=a(3)=a(4)=1.

%C Periodic with period 5: 1,1,1,1,-2

%H <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (0, 0, 0, 0, 1).

%F a(n)=a(n-1)^2-a(n-2)-a(n-3)-a(n-4), a(1)=a(2)=a(3)=a(4)=1

%F a(n)=(1/25)*{16*(n mod 5)+[(n+1) mod 5]+[(n+2) mod 5]+[(n+3) mod 5]-14*[(n+4) mod 5]}, with n>=1. - _Paolo P. Lava_, Jun 03 2008

%F a(n)=3*[(n^4 mod 5)-1]+1 [From _Paolo P. Lava_, May 05 2010]

%e a(5)=1^2-1-1-1=-2

%t 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

%t LinearRecurrence[{0, 0, 0, 0, 1},{1, 1, 1, 1, -2},105] (* _Ray Chandler_, Aug 25 2015 *)

%K sign

%O 1,5

%A _Ben Branman_, May 29 2008

%E Extended by _Ray Chandler_, Aug 25 2015

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified September 24 14:33 EDT 2021. Contains 347643 sequences. (Running on oeis4.)