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”).
%I #24 Sep 08 2022 08:46:13
%S 1,2,4,12,92,6636,42839036,1834614576635532,
%T 3365810487617338033584723922844,
%U 11328680238554850474377984661704304183660014108982249765031212
%N u(1) = v(1) = 1, u(n) = u(n-1) + v(n-1), v(n) = u(n-1)^2 + v(n-1)^2, a(n) = u(n).
%F a(n) = a(n-1)^2 + a(n-1) - 2*a(n-1)*a(n-2) + 2*a(n-2)^2, a(1) = 1, a(2) = 2.
%e u(2) = 2, v(2) = 2; u(3) = 4, v(3) = 8; u(4) = 12, v(4) = 80; u(5) = 92, v(5) = 6544.
%t RecurrenceTable[{x[n+ 2] == x[n+1]^2 + x[n+1] - 2*x[n+1]*x[n] + 2*x[n]^2, x[1] == 1, x[2] == 2 }, x, {n, 10}]
%o (Magma) I:=[1,2]; [n le 2 select I[n] else Self(n-1)^2+Self(n-1)-2*Self(n-1)*Self(n-2)+2*Self(n-2)^2: n in [1..11]]; // _Vincenzo Librandi_, Jun 18 2015
%o (Sage)
%o def main(size):
%o u=[1]; v=[1]; a=[1]
%o for i in range(1,size-1):
%o u.append(u[i-1]+v[i-1])
%o v.append(u[i-1]**2+v[i-1]**2)
%o a.append(u[i])
%o return a # _Anders Hellström_, Jul 10 2015
%o (PARI) first(m)={my(u=vector(m),v=vector(m));v[1]=1;u[1]=1;for(i=2,m,u[i] = u[i-1] + v[i-1];v[i] = (u[i-1])^2 + (v[i-1])^2);u;} \\ _Anders Hellström_, Aug 20 2015
%K nonn
%O 1,2
%A _Morris Neene_, Jun 17 2015