login
Define the generalized Pisot sequence T(a(0),a(1)) by: a(n+2) is the greatest integer such that a(n+2)/a(n+1) < a(n+1)/a(n). This is T(2,6).
2

%I #26 Jul 13 2023 09:27:59

%S 2,6,17,48,135,379,1064,2987,8385,23538,66074,185477,520654,1461532,

%T 4102678,11516659,32328502,90749586,254743859,715093440,2007344278,

%U 5634831512,15817578736,44401646533,124640202381,349878467638,982146528794,2756991050447

%N Define the generalized Pisot sequence T(a(0),a(1)) by: a(n+2) is the greatest integer such that a(n+2)/a(n+1) < a(n+1)/a(n). This is T(2,6).

%C Not to be confused with the Pisot T(2,6) sequence, which is A008776. - _R. J. Mathar_, Feb 13 2016

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

%H D. W. Boyd, <a href="http://www.researchgate.net/publication/258834801">Linear recurrence relations for some generalized Pisot sequences</a>, Advances in Number Theory (Kingston ON, 1991) 333-340, Oxford Sci. Publ., Oxford Univ. Press, New York, 1993.

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

%p A018915 := proc(n)

%p option remember;

%p if n <= 1 then

%p op(n+1,[2,6]) ;

%p else

%p a := procname(n-1)^2/procname(n-2) ;

%p if type(a,'integer') then

%p a-1 ;

%p else

%p floor(a) ;

%p fi;

%p end if;

%p end proc: # _R. J. Mathar_, Feb 10 2016

%t RecurrenceTable[{a[1] == 2, a[2] == 6, a[n] == Ceiling[a[n - 1]^2/a[n - 2]] - 1}, a, {n, 30}] (* _Bruno Berselli_, Feb 17 2016 *)

%o (PARI) T(a0, a1, maxn) = a=vector(maxn); a[1]=a0; a[2]=a1; for(n=3, maxn, a[n]=ceil(a[n-1]^2/a[n-2])-1); a

%o T(2, 6, 30) \\ _Colin Barker_, Feb 14 2016

%o (Magma) Tiv:=[2,6]; [n le 2 select Tiv[n] else Ceiling(Self(n-1)^2/Self(n-2))-1: n in [1..40]]; // _Bruno Berselli_, Feb 17 2016

%K nonn

%O 0,1

%A _R. K. Guy_