%I #25 Mar 28 2018 04:56:55
%S 0,1,5,41,1805,3263441,10650056950805,113423713055421844361000441,
%T 12864938683278671740537145998360961546653259485195805,
%U 165506647324519964198468195444439180017513152706377497841851388766535868639572406808911988131737645185441
%N a(n+1) = a(n)^2 + 3*a(n) + 1.
%C a(k) is the optimal competitive ratio of any memoryless algorithm for the weighted k-server problem (Chiplunkar and Vishwanathan). - _David Eppstein_, Dec 31 2013
%C This is a divisibility sequence, that is if n divides m then a(n) divides a(m). Cf. A002065. - _Peter Bala_, Mar 26 2018
%H Harry J. Smith, <a href="/A065035/b065035.txt">Table of n, a(n) for n = 0..12</a>
%H Ashish Chiplunkar and Sundar Vishwanathan, On Randomized Memoryless Algorithms for the Weighted k-server Problem, <a href="http://dx.doi.org/10.1109/FOCS.2013.10">54th IEEE Symp. Foundations of Computer Science (FOCS 2013), pp. 11-19</a>; <a href="http://arxiv.org/abs/1301.0123">arXiv:1301.0123</a>
%H <a href="/index/Aa#AHSL">Index entries for sequences of form a(n+1)=a(n)^2 + ...</a>
%F a(n) = A007018(n)-1 = A000058(n)-2 = A060136(3, n) = A028387(a(n-1)). - _Michael Somos_, Feb 10 2002
%e a(3) = a(2)^2 + 3*a(2) + 1 = 25 + 15 + 1 = 41.
%o (PARI) a(n)=if(n<1,0,a(n-1)^2+3*a(n-1)+1);
%o (PARI) { for (n=0, 12, a=if(n, a^2 + 3*a + 1, 0); write("b065035.txt", n, " ", a) ) } \\ _Harry J. Smith_, Oct 03 2009
%Y Cf. A000058, A002065, A007018, A028387, A060136.
%K easy,nonn
%O 0,3
%A _Henry Bottomley_, Nov 03 2001