login
a(n+1)=a(n)^2+2*a(n)-2 and a(1)=5
3

%I #10 Nov 21 2013 12:49:26

%S 5,33,1153,1331713,1773462177793,3145168096065837266706433,

%T 9892082352510403757550172975146702122837936996353

%N a(n+1)=a(n)^2+2*a(n)-2 and a(1)=5

%C General formula for a(n+1)=a(n)^2+2*a(n)-2 and a(1)=k+1 is a(n)=Floor[((k + Sqrt[k^2 + 4])/2)^(2^((n+1) - 1))

%F From Peter Bala, Nov 12 2012: (Start)

%F a(n) = alpha^(2^(n-1)) + (1/alpha)^(2^(n-1)) - 1, where alpha := 3 + 2*sqrt(2).

%F a(n) = (1 + sqrt(2))^(2^n) + (sqrt(2) - 1)^(2^n) - 1.

%F a(n) = A003423(n-1) - 1. a(n) = 2*A001601(n) - 1. a(n) = 4*A190840(n-1) + 1.

%F Recurrence: a(n) = 7*{product {k = 1..n-1} a(k)} - 2 with a(1) = 5.

%F Product {n = 1..inf} (1 + 1/a(n)) = 7/8*sqrt(2).

%F Product {n = 1..inf} (1 + 2/(a(n) + 1)) = sqrt(2).

%F (End)

%t aa = {}; k = 5; Do[AppendTo[aa, k]; k = k^2 + 2 k - 2, {n, 1, 10}]; aa

%t or

%t k =4; Table[Floor[((k + Sqrt[k^2 + 4])/2)^(2^(n - 1))], {n, 2, 7}] (*Artur Jasinski*)

%t NestList[#^2+2#-2&,5,7] (* _Harvey P. Dale_, Mar 19 2011 *)

%Y A145502-A145510. A003423, A001601, A190840.

%K nonn

%O 1,1

%A _Artur Jasinski_, Oct 11 2008