# Greetings from The On-Line Encyclopedia of Integer Sequences! http://oeis.org/ Search: id:a276160 Showing 1-1 of 1 %I A276160 #21 Sep 16 2021 13:09:29 %S A276160 1,1,1,5,33,1153,266337,2149605893,4007637093066433, %T A276160 60303882185826956720761345, %U A276160 1691732525726797389070758961468800814420801,714126272449521825808382965880022542720530687818734820147878380094981 %N A276160 A recurrence of order 3 : a(0)=a(1)=a(2)=1 ; a(n) = (a(n-1)^2 + a(n-2)^2 + a(n-1) + a(n-2) + 1)/a(n-3). %H A276160 Seiichi Manyama, Table of n, a(n) for n = 0..16 %F A276160 a(n) = 7*a(n-1)*a(n-2) - a(n-3) - 1. %t A276160 RecurrenceTable[{a[n] == (a[n - 1]^2 + a[n - 2]^2 + a[n - 1] + a[n - 2] + 1)/a[n - 3], a[0] == a[1] == a[2] == 1}, a, {n, 0, 12}] (* _Michael De Vlieger_, Aug 22 2016 *) %t A276160 nxt[{a_,b_,c_}]:={b,c,(c^2+b^2+c+b+1)/a}; NestList[nxt,{1,1,1},15][[All,1]] (* _Harvey P. Dale_, Sep 16 2021 *) %o A276160 (Ruby) %o A276160 def A(m, n) %o A276160 a = Array.new(m, 1) %o A276160 ary = [1] %o A276160 while ary.size < n + 1 %o A276160 i = a[1..-1].inject(0){|s, i| s + i * i} + a[1..-1].inject(:+) + 1 %o A276160 break if i % a[0] > 0 %o A276160 a = *a[1..-1], i / a[0] %o A276160 ary << a[0] %o A276160 end %o A276160 ary %o A276160 end %o A276160 def A276160(n) %o A276160 A(3, n) %o A276160 end %Y A276160 Cf. A101368, A276122. %K A276160 nonn %O A276160 0,4 %A A276160 _Seiichi Manyama_, Aug 22 2016 # Content is available under The OEIS End-User License Agreement: http://oeis.org/LICENSE