login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

The first five terms are 1, after that, a(n)=a(n-1)^2-a(n-2)-a(n-3)-a(n-4)-a(n-5).
0

%I #16 Aug 01 2021 13:17:03

%S 1,1,1,1,1,-3,5,25,621,385613,148697385121,22110912341822991798377,

%T 488892444587780299304228901641309659922062749,

%U 239015822375015830469277614767879892635108603674971498096787773471947363213442923403867269

%N The first five terms are 1, after that, a(n)=a(n-1)^2-a(n-2)-a(n-3)-a(n-4)-a(n-5).

%e a(7)=5 because (-3)^2-1-1-1-1=5.

%p a:= proc(n) option remember;

%p `if`(n<6, 1, a(n-1)^2 -a(n-2) -a(n-3) -a(n-4) -a(n-5))

%p end:

%p seq(a(n), n=1..14); # _Alois P. Heinz_, Jan 17 2011

%t F[x_] := F[x - 1]^2 - F[x - 2] - F[x - 3] - F[x - 4] - F[x - 5]; F[1] = F[2] = F[3] = F[4] = F[5] = 1

%t RecurrenceTable[{a[1]==a[2]==a[3]==a[4]==a[5]==1,a[n]==a[n-1]^2-a[n-2]-a[n-3]-a[n-4]-a[n-5]},a,{n,15}] (* _Harvey P. Dale_, Aug 01 2021 *)

%K sign

%O 1,6

%A _Ben Branman_, Jun 21 2008

%E More terms from _Alois P. Heinz_, Jan 17 2011