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”).

A259048
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).
0
1, 2, 4, 12, 92, 6636, 42839036, 1834614576635532, 3365810487617338033584723922844, 11328680238554850474377984661704304183660014108982249765031212
OFFSET
1,2
FORMULA
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.
EXAMPLE
u(2) = 2, v(2) = 2; u(3) = 4, v(3) = 8; u(4) = 12, v(4) = 80; u(5) = 92, v(5) = 6544.
MATHEMATICA
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}]
PROG
(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
(Sage)
def main(size):
u=[1]; v=[1]; a=[1]
for i in range(1, size-1):
u.append(u[i-1]+v[i-1])
v.append(u[i-1]**2+v[i-1]**2)
a.append(u[i])
return a # Anders Hellström, Jul 10 2015
(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
CROSSREFS
Sequence in context: A319634 A217041 A120618 * A228809 A326945 A309718
KEYWORD
nonn
AUTHOR
Morris Neene, Jun 17 2015
STATUS
approved