# Greetings from The On-Line Encyclopedia of Integer Sequences! http://oeis.org/ Search: id:a276534 Showing 1-1 of 1 %I A276534 #38 Nov 20 2016 03:27:40 %S A276534 1,1,1,1,1,2,4,12,108,10584,27454896,94148851006224, %T A276534 246222177535609206635748240, %U A276534 62371770277951054762478578990896212287188931341600,3750595553941161278345366267513070968239986992860645038477600300348697171928615364721752014400 %N A276534 a(n) = a(n-1) * a(n-4) * (a(n-2) * a(n-3) + 1) / a(n-5), with a(0) = a(1) = a(2) = a(3) = a(4) = 1. %C A276534 Inspired by Somos-5 sequence. %C A276534 a(n) is integer for n >= 0. %C A276534 a(n+1)/a(n) is integer for n >= 0. %H A276534 Seiichi Manyama, Table of n, a(n) for n = 0..17 %F A276534 a(n) * a(n-5) = a(n-1) * a(n-4) + a(n-1) * a(n-2) * a(n-3) * a(n-4). %F A276534 a(4-n) = a(n). %F A276534 Let b(n) = b(n-4) * (b(n-2) * (b(0) * b(1) * ... * b(n-3))^2 + 1) with b(0) = b(1) = b(2) = b(3) = 1, then a(n) = a(n-1) * b(n-1) = b(0) * b(1) * ... * b(n-1) for n > 0. %e A276534 a(5) = a(4) * b(4) = 1 * 2 = 2, %e A276534 a(6) = a(5) * b(5) = 2 * 2 = 4, %e A276534 a(7) = a(6) * b(6) = 4 * 3 = 12, %e A276534 a(8) = a(7) * b(7) = 12 * 9 = 108. %o A276534 (Ruby) %o A276534 def A(k, n) %o A276534 a = Array.new(2 * k + 1, 1) %o A276534 ary = [1] %o A276534 while ary.size < n + 1 %o A276534 i = 0 %o A276534 k.downto(1){|j| %o A276534 i += 1 %o A276534 i *= a[j] * a[-j] %o A276534 } %o A276534 break if i % a[0] > 0 %o A276534 a = *a[1..-1], i / a[0] %o A276534 ary << a[0] %o A276534 end %o A276534 ary %o A276534 end %o A276534 def A276534(n) %o A276534 A(2, n) %o A276534 end %Y A276534 Cf. A006721, A276535. %K A276534 nonn %O A276534 0,6 %A A276534 _Seiichi Manyama_, Nov 16 2016 # Content is available under The OEIS End-User License Agreement: http://oeis.org/LICENSE