OFFSET
0,1
LINKS
Colin Barker, Table of n, a(n) for n = 0..1000
D. W. Boyd, Pisot sequences which satisfy no linear recurrences, Acta Arith. 32 (1) (1977) 89-98
D. W. Boyd, Some integer sequences related to the Pisot sequences, Acta Arithmetica, 34 (1979), 295-305
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
It is known (Boyd, 1977) that this sequence does not satisfy a linear recurrence. - N. J. A. Sloane, Aug 07 2016
MAPLE
A[0]:= 31:
A[1]:= 51:
for n from 2 to 100 do
A[n]:= floor(A[n-1]^2/A[n-2]+1/2)
od:
seq(A[n], n=0..100); # Robert Israel, Aug 18 2016
MATHEMATICA
nxt[{a_, b_}]:={b, Floor[b^2/a+1/2]}; NestList[nxt, {31, 51}, 40][[All, 1]] (* Harvey P. Dale, Nov 02 2020 *)
PROG
(PARI) pisotE(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]+1/2));
a
}
pisotE(50, 31, 51) \\ Colin Barker, Aug 08 2016
(Python)
a, b = 31, 51
A275628_list = [a, b]
for i in range(1000):
c, d = divmod(b**2, a)
a, b = b, c + (0 if 2*d < a else 1)
A275628_list.append(b) # Chai Wah Wu, Aug 08 2016
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Aug 07 2016
STATUS
approved