OFFSET
0,1
LINKS
Colin Barker, Table of n, a(n) for n = 0..1000
D. W. Boyd, Linear recurrence relations for some generalized Pisot sequences, Advances in Number Theory ( Kingston ON, 1991) 333-340, Oxford Sci. Publ., Oxford Univ. Press, New York, 1993.
FORMULA
a(n) = 3*a(n-1) + a(n-2) - a(n-4) - a(n-5) - a(n-6) (holds at least up to n = 1000 but is not known to hold in general).
MAPLE
PisotT := proc(a0, a1, n)
option remember;
if n = 0 then
a0 ;
elif n = 1 then
a1;
else
floor( procname(a0, a1, n-1)^2/procname(a0, a1, n-2)) ;
end if;
end proc:
A018920 := proc(n)
PisotT(3, 10, n) ;
end proc: # R. J. Mathar, Feb 13 2016
MATHEMATICA
RecurrenceTable[{a[0] == 3, a[1] == 10, a[n] == Floor[a[n - 1]^2/a[n - 2] ]}, a, {n, 0, 30}] (* Bruno Berselli, Feb 05 2016 *)
PROG
(Magma) Txy:=[3, 10]; [n le 2 select Txy[n] else Floor(Self(n-1)^2/Self(n-2)): n in [1..30]]; // Bruno Berselli, Feb 05 2016
(PARI) pisotT(nmax, a1, a2) = {
a=vector(nmax); a[1]=a1; a[2]=a2;
for(n=3, nmax, a[n] = floor(a[n-1]^2/a[n-2]));
a
}
pisotT(50, 3, 10) \\ Colin Barker, Jul 29 2016
CROSSREFS
KEYWORD
nonn
AUTHOR
EXTENSIONS
Corrected by David W. Wilson
STATUS
approved