This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A018896 #54 Feb 16 2025 08:32:33 %S A018896 1,1,1,1,1,1,1,1,2,3,4,5,9,18,34,93,180,348,724,3033,9666,24986,83761, %T A018896 261033,1023728,3923791,26128126,105734485,381740209,1895904805, %U A018896 14058722881,97964968321,517832518189,4364261070929,25225712161101,181840424632390 %N A018896 a(n) = ( a(n-1)*a(n-7) + a(n-4)^2 ) / a(n-8); a(0) = ... = a(7) = 1. %C A018896 From _Vladimir Shevelev_, Apr 04 2016: (Start) %C A018896 For k >= 0, an infinite sequence {a(k,n)} of Somos's sequences (n>=0) is: %C A018896 a(k,0) = a(k,1)= ... = a(k,2*k+1) = 1; %C A018896 and then for n >= 2*k+2, %C A018896 a(k,n) = (a(k,n-1)*a(k,n-2*k-1) + a(k,n-k-1)^2)/a(k,n-2*k-2). %C A018896 In particular, {a(0,n)}=A006125, {a(1,n)}=A006720, {a(2,n)}=A102276, {a(3,n)}=A018896. %C A018896 One can prove that the sequence {a(k,n)} has the first 4k+2 simple differences: 2k+1 zeros, after that k+1 1's and after that k consecutive squares, beginning with 2^2. %C A018896 Further we have nontrivial differences. The first of them for k=0,1,2,... are 6, 16, 33, 59, 96, 146, 211, 293, 394, 516, ... that is, {k^3/3 + 5*k^2/2 + 43*k/6 + 6}. %C A018896 (End) %H A018896 T. D. Noe, <a href="/A018896/b018896.txt">Table of n, a(n) for n = 0..100</a> %H A018896 Mohamed Bensaid, <a href="https://arxiv.org/abs/2409.05911">Sato tau functions and construction of Somos sequence</a>, arXiv:2409.05911 [math.NT], 2024. See p. 7. %H A018896 David Gale, <a href="http://dx.doi.org/10.1007/BF03024306">Mathematical Entertainments</a>, Mathematical Intelligencer, volume 18, number 3, Summer 1996, page 25. %H A018896 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/SomosSequence.html">Somos Sequence</a> %H A018896 <a href="/index/Tu#2wis">Index entries for two-way infinite sequences</a> %p A018896 f:= proc(n) option remember; %p A018896 if n <= 7 then 1 else %p A018896 (procname(n-1)*procname(n-7)+procname(n-4)^2)/procname(n-8) %p A018896 fi %p A018896 end proc: %p A018896 seq(f(n),n=0..50); # _Robert Israel_, Apr 04 2016 %t A018896 RecurrenceTable[{a[1]==a[2]==a[3]==a[4]==a[5]==a[6]==a[7]==a[8]==1, a[n]==(a[n-1]a[n-7]+ a[n-4]^2)/a[n-8]},a[n],{n,50}] (* _Harvey P. Dale_, May 02 2011 *) %t A018896 k = 3; Set[#, 1] & /@ Map[a[k, #] &, Range[0, 2 k + 1]]; a[k_, n_] /; n >= 2 k + 2 := (a[k, n - 1] a[k, n - 2 k - 1] + a[k, n - k - 1]^2)/ a[k, n - 2 k - 2]; Table[a[k, n], {n, 0, 35}] (* _Michael De Vlieger_, Apr 04 2016 *) %o A018896 (Haskell) %o A018896 a018896 n = a018896_list !! n %o A018896 a018896_list = replicate 8 1 ++ f 8 where %o A018896 f x = ((a018896 (x - 1) * a018896 (x - 7) + a018896 (x - 4) ^ 2) %o A018896 `div` a018896 (x - 8)) : f (x + 1) %o A018896 -- _Reinhard Zumkeller_, Oct 01 2012 %o A018896 (Magma) [n le 8 select 1 else (Self(n-1)*Self(n-7)+Self(n-4)^2 ) / Self(n-8): n in [1..40]]; // _Vincenzo Librandi_, Dec 08 2016 %Y A018896 Cf. A006125, A006720, A102276. %K A018896 nonn,nice %O A018896 0,9 %A A018896 _Michael Somos_ %E A018896 More terms from _Harvey P. Dale_, May 02 2011