login
a(n) = 5*a(n-1)*a(n-2)*a(n-3) - a(n-4) with n>4, a(1) = a(2) = a(3) = a(4) = 1.
3

%I #21 Sep 07 2016 08:13:40

%S 1,1,1,1,4,19,379,144019,5185404091,1415179768826376436,

%T 5284257989697826589787882104688841,

%U 193886796198316302609610159795591363955441027433554915785933561

%N a(n) = 5*a(n-1)*a(n-2)*a(n-3) - a(n-4) with n>4, a(1) = a(2) = a(3) = a(4) = 1.

%H Seiichi Manyama, <a href="/A276259/b276259.txt">Table of n, a(n) for n = 1..16</a>

%F a(1)=a(2)=a(3)=a(4)=1; for n>4, a(n) = (a(n-1)^2 + a(n-2)^2 + a(n-3)^2 + 1) / a(n-4).

%F a(n)*a(n+1)*a(n+2)*a(n+3) = (a(n)^2 + a(n+1)^2 + a(n+2)^2 + a(n+3)^2 + 1)/5.

%t RecurrenceTable[{a[n] == 5 a[n - 1] a[n - 2] a[n - 3] - a[n - 4], a[1] == a[2] == a[3] == a[4] == 1}, a, {n, 12}] (* _Michael De Vlieger_, Aug 26 2016 *)

%o (Ruby)

%o def A(m, n)

%o a = Array.new(m, 1)

%o ary = [1]

%o while ary.size < n

%o a = *a[1..-1], *a[1..-1].inject(:*) * (m + 1) - a[0]

%o ary << a[0]

%o end

%o ary

%o end

%o def A276259(n)

%o A(4, n)

%o end

%Y Cf. A001519, A276258.

%K nonn

%O 1,5

%A _Seiichi Manyama_, Aug 26 2016