login
a(1)=1, a(2)=2; for n>2, a(n) = (1/2)*a(n-1)*a(n-2) + a(n-1) + a(n-2).
0

%I #18 Sep 08 2022 08:46:13

%S 1,2,4,10,34,214,3886,419902,816293374,171382426877950,

%T 69949169911638289022974,5994029248777394614754727872037912574,

%U 209638685189029793998133268981457005889853767752082771673086

%N a(1)=1, a(2)=2; for n>2, a(n) = (1/2)*a(n-1)*a(n-2) + a(n-1) + a(n-2).

%C a(n) + 2 = (1/2)*(a(n-1) + 2)*(a(n-2) + 2), from which the general formula can be proved using the method shown in A063896.

%F a(n) = 2 * 3^A000045(n-2) * 2^A000045(n-3) - 2, where A000045(n) is the n-th Fibonacci number.

%e a(3) = (1/2)*2*1 + 2 + 1 = 4;

%e a(4) = (1/2)*4*2 + 4 + 2 = 10;

%e a(5) = (1/2)*10*4 + 10 + 4 = 34;

%e a(6) = 2*(3^3)(2^2) - 2 = 214.

%t Table[2 3^Fibonacci[n-2] 2^Fibonacci[n-3] - 2, {n, 1, 20}] (* _Vincenzo Librandi_, Jun 17 2015 *)

%o (Magma) [n le 2 select n else Self(n-1)*Self(n-2)/2+Self(n-1)+Self(n-2): n in [1..13]];

%o (PARI) a(n) = 2*(3^fibonacci(n-2))*(2^fibonacci(n-3)) - 2; \\ _Michel Marcus_, Jun 17 2015

%o (Magma) [2*3^Fibonacci(n-2)*2^Fibonacci(n-3)-2: n in [1..20]]; // _Vincenzo Librandi_, Jun 17 2015

%Y Cf. A000045, A063896, A100701, A254132.

%K nonn,easy

%O 1,2

%A _Morris Neene_, Jun 15 2015