%I #14 Feb 01 2018 02:18:49
%S 3,13,193,37633,1416317953,2005956546822746113,
%T 4023861667741036022825635656102100993
%N a(n+1) = a(n)^2+2*a(n)-2 and a(1)=3.
%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)).
%C Essentially the same as A110407. [_R. J. Mathar_, Mar 18 2009]
%H Indranil Ghosh, <a href="/A145503/b145503.txt">Table of n, a(n) for n = 1..11</a>
%F From _Peter Bala_, Nov 12 2012: (Start)
%F a(n) = alpha^(2^(n-1)) + (1/alpha)^(2^(n-1)) - 1, where alpha := 2 + sqrt(3).
%F a(n) = A003010(n-1) - 1. a(n) = 2*A002812(n-1) - 1.
%F Recurrence: a(n) = 5*(Product {k = 1..n-1} a(k)) - 2 with a(1) = 3.
%F Product_{n >= 1} (1 + 1/a(n)) = 5/6*sqrt(3).
%F Product_{n >= 1} (1 + 2/(a(n) + 1)) = sqrt(3).
%F (End)
%t aa = {}; k = 3; Do[AppendTo[aa, k]; k = k^2 + 2 k - 2, {n, 1, 10}]; aa
%t (* or *)
%t k = 2; Table[Floor[((k + Sqrt[k^2 + 4])/2)^(2^(n - 1))], {n, 2, 7}]
%t NestList[#^2+2#-2&,3,10] (* _Harvey P. Dale_, Feb 01 2018 *)
%Y Cf. A145502-A145510. A003010, A002812.
%K nonn,easy
%O 1,1
%A _Artur Jasinski_, Oct 11 2008