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

%I #14 Dec 19 2017 01:56:58

%S 0,1,1,1,2,4,12,72,1152,96768,118444032,11598039613440,

%T 1374840894208868352000,15945621994910596019667697926144000,

%U 21922693387137438627357958684974264478793362424463360000

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

%D Martin Gardner, Mathematical Circus, Random House, New York, 1981, p. 165.

%H Michael De Vlieger, <a href="/A141522/b141522.txt">Table of n, a(n) for n = 1..21</a>

%t Nest[Append[#, #[[-1]] #[[-2]] + #[[-1]] #[[-3]]] &, {0, 1, 1}, 12] (* _Michael De Vlieger_, Dec 17 2017 *)

%o (MATLAB)

%o function y=fib(n)

%o %Generates running geometric numbers( second kind)

%o fz(1)=0;fz(2)=1;fz(3)=1;

%o for k=4:n

%o fz(k)=fz(k-1)*(fz(k-2)+fz(k-3));

%o end

%o y=fz(n);

%o (PARI) /* script that avoids arrays */

%o geom(n) = {

%o local(a=0,b=1,c=1,d);

%o print1(a","b","c",");

%o for(x=1,n-3,

%o d=(a+b)*c;

%o print1(d",");

%o a=b;b=c;c=d;

%o )

%o } \\ _Cino Hilliard_, Apr 29 2009

%K nonn

%O 1,5

%A Matt Wynne (matwyn(AT)verizon.net), Aug 11 2008