login
a(0) = 7, a(1) = 9; for n >= 0, a(2n+1) = a(2n-1)^2 - a(2n-2), a(2n+2) = a(2n)^2 - a(2n+1).
(Formerly M4337)
1

%I M4337 #14 Aug 30 2014 15:17:02

%S 7,9,40,74,1526,5436,2323240,29548570,5397414549030,873117986721660,

%T 29132083813207600287219240,762335018736884842676898606570,

%U 848678307299752276902028307632840866100214927571030

%N a(0) = 7, a(1) = 9; for n >= 0, a(2n+1) = a(2n-1)^2 - a(2n-2), a(2n+2) = a(2n)^2 - a(2n+1).

%D Intelligence test in Chess Life, Vol. 49(#6) 1994, p. 14.

%D N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

%H Robert G. Wilson v, <a href="/A007449/b007449.txt">Table of n, a(n) for n = 0..21</a>

%F a(n+1) = a(n-1)^2 - a(n - 2*(1 - n mod 2)), a(0)=7, a(1)=9. - _Reinhard Zumkeller_, Mar 25 2003

%t a[n_] := a[n - 2]^2 - a[n - 3 + If[ EvenQ@ n, 2, 0]]; a[0] = 7; a[1] = 9; Array[a, 14, 0] (* _Robert G. Wilson v_, Aug 30 2014 *)

%o (PARI) a(n)=if(n<0,0,if(n<2,[7,9][n+1],a(n-2)^2-a(n-2+(-1)^n)))

%K nonn,easy

%O 0,1

%A _N. J. A. Sloane_.

%E More terms from _Reinhard Zumkeller_, Mar 25 2003