OFFSET
0,1
COMMENTS
This coincides with the Pisot T(6,31) sequence as defined in A008776 at least up to n <=18000. - R. J. Mathar, Feb 13 2016
The recurrence 5*a(n-1)+a(n-2)-a(n-3)-a(n-5) starts to fail at n=22. - R. J. Mathar, Feb 13 2016
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..1402
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.
MAPLE
a:= proc(n) option remember;
`if`(n<2, [6, 31][n+1], ceil(a(n-1)^2/a(n-2))-1)
end:
seq(a(n), n=0..30); # Alois P. Heinz, Sep 18 2015
MATHEMATICA
RecurrenceTable[{a[1] == 6, a[2] == 31, a[n] == Ceiling[a[n-1]^2/a[n-2]] - 1}, a, {n, 30}] (* Bruno Berselli, Feb 17 2016 *)
PROG
(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
T(6, 31, 40) \\ Colin Barker, Feb 14 2016
(Magma) Tiv:=[6, 31]; [n le 2 select Tiv[n] else Ceiling(Self(n-1)^2/Self(n-2))-1: n in [1..30]]; // Bruno Berselli, Feb 17 2016
CROSSREFS
KEYWORD
nonn
AUTHOR
EXTENSIONS
Incorrect conjectures deleted by Alois P. Heinz, Sep 18 2015
STATUS
approved