login
Pisot sequence P(6,11), a(0)=6, a(1)=11, a(n+1) is the nearest integer to a(n)^2/a(n-1).
1

%I #16 Jul 13 2023 09:42:59

%S 6,11,20,36,65,117,211,381,688,1242,2242,4047,7305,13186,23802,42965,

%T 77556,139996,252706,456158,823408,1486329,2682964,4843003,8742077,

%U 15780273,28484880,51417893,92814143,167538276,302422379,545900898

%N Pisot sequence P(6,11), a(0)=6, a(1)=11, a(n+1) is the nearest integer to a(n)^2/a(n-1).

%H Colin Barker, <a href="/A021011/b021011.txt">Table of n, a(n) for n = 0..1000</a>

%H <a href="/index/Ph#Pisot">Index entries for Pisot sequences</a>

%F G.f.: (3x^5+2x^4+x^3+4x^2-x+6)/(-x^6-x^3+x^2-2x+1) (conjectured). - _Ralf Stephan_, May 12 2004

%t RecurrenceTable[{a[n] == Ceiling[a[n - 1]^2/a[n - 2] - 1/2], a[0] == 6, a[1] == 11}, a, {n, 0, 31}] (* or *)

%t First@ Transpose[NestList[{#2, Round[#2^2/#1]} & @@ # &, {6, 11}, 31]] (* _Michael De Vlieger_, Aug 08 2016, after _Harvey P. Dale_ at A021008 *)

%o (PARI) pisotP(nmax, a1, a2) = {

%o a=vector(nmax); a[1]=a1; a[2]=a2;

%o for(n=3, nmax, a[n] = ceil(a[n-1]^2/a[n-2]-1/2));

%o a

%o }

%o pisotP(50, 6, 11) \\ _Colin Barker_, Aug 08 2016

%K nonn

%O 0,1

%A _R. K. Guy_