OFFSET
1,2
COMMENTS
The sequence is infinite. Proof: In a(n) = k*a(n-1)+a(n-2), one value of k is a(n-1)-2*a(n-2)^(1/2), which gives a(n) <= (a(n-1)-a(n-2)^(1/2))^2.
If k is allowed to be 0, the sequence would be 1, 4, 1, 4, ... - Chai Wah Wu, Mar 27 2020
LINKS
Chai Wah Wu, Table of n, a(n) for n = 1..11
EXAMPLE
a(3) = 4*2 +1 = 9, a(4) = 5*9 +4 = 49, a(5) = 43*49 + 9 = 2116= 46^2.
PROG
(PARI) A = vector(11); A[1] = 1; A[2] = 2; B = vector(11, i, A[i]^2); for (n = 3, 11, z = znstar(B[n - 1]); l = length(z[2]); c = vector(l, i, z[3][i]^(z[2][i]/2)); v = vector(2^l, i, A[n - 2]*prod(j = 1, l, c[j]^(i\2^(l - j)%2))); v = vecsort(lift(v)); print(B[n - 2], vector(2^l, i, v[i]^2%B[n - 1])); A[n] = if (v[1] == A[n - 2], v[2], v[1]); B[n] = A[n]^2; print(B[n])); \\ David Wasserman, Mar 21 2005
CROSSREFS
KEYWORD
nonn
AUTHOR
Amarnath Murthy, Aug 23 2003
EXTENSIONS
More terms from Rick L. Shepherd, Aug 28 2003
More terms from David Wasserman, Mar 21 2005
STATUS
approved