OFFSET
0,1
COMMENTS
This coincides with the linearly recurrent sequence defined by the expansion of (4-3*x^2)/(1-7*x-x^2+5*x^3) only up to n<=55. - R. J. Mathar, Feb 10 2016
LINKS
Alois P. Heinz, 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.
MAPLE
a:= proc(n) option remember;
`if`(n<2, [4, 28][n+1], floor(a(n-1)^2/a(n-2))+1)
end:
seq(a(n), n=0..30); # Alois P. Heinz, Feb 10 2016
MATHEMATICA
a[n_] := a[n] = Switch[n, 0, 4, 1, 28, _, Floor[a[n - 1]^2/a[n - 2]] + 1];
a /@ Range[0, 30] (* Jean-François Alcover, Feb 06 2020, after Alois P. Heinz *)
PROG
(PARI) S(a0, a1, maxn) = a=vector(maxn); a[1]=a0; a[2]=a1; for(n=3, maxn, a[n]=a[n-1]^2\a[n-2]+1); a
S(4, 28, 40) \\ Colin Barker, Feb 16 2016
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved