login
A086541
a(1) = 1, a(2) = 4; a(n) = smallest square of the form k*a(n-1) + a(n-2), k > 0.
3
1, 4, 9, 49, 2116, 1104601, 1220041748025, 73506264463383837985201, 152589000107917580345020742323132226398704361, 1669769004292648133509475727812173973930459916514124965718261930975078855532062950740889
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
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
Cf. A086542.
Sequence in context: A081069 A053967 A028945 * A053965 A058444 A053925
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