A105745 For n>2, a(n) > 0 is such that a(n-1)^2+4*a(n-2)*a(n) is a minimal square, a(1)=1, a(2)=12.
1, 12, 13, 4, 9, 9, 4, 5, 6, 8, 8, 6, 2, 4, 6, 4, 2, 2, 4, 6, 4, 2, 2, 4, 6, 4, 2, 2, 4, 6, 4, 2, 2, 4, 6, 4, 2, 2, 4, 6, 4, 2, 2, 4, 6, 4, 2, 2, 4, 6, 4, 2, 2, 4, 6, 4, 2, 2, 4, 6, 4, 2, 2, 4, 6, 4, 2, 2, 4, 6, 4, 2, 2, 4, 6, 4, 2, 2, 4, 6, 4, 2, 2, 4, 6, 4, 2, 2, 4, 6, 4, 2, 2, 4, 6, 4, 2, 2, 4
Offset: 1
Links
- Index entries for linear recurrences with constant coefficients, signature (0,0,0,0,1).
Programs
-
Maple
A[1]:= 1: A[2]:= 12: for n from 3 to 100 do R:= map(rhs@op, [msolve(y^2=A[n-1]^2, 4*A[n-2])]); ys:= map(t -> (floor((A[n-1]-t)/(4*A[n-2]))+1)*4*A[n-2]+t, R); A[n]:= (min(ys)^2-A[n-1]^2)/(4*A[n-2]); od: seq(A[i],i=1..100); # Robert Israel, Oct 02 2020
-
Mathematica
LinearRecurrence[{0,0,0,0,1},{1,12,13,4,9,9,4,5,6,8,8,6,2,4,6,4,2},100] (* or *) PadRight[{1,12,13,4,9,9,4,5,6,8,8,6},100,{4,2,2,4,6}] (* Harvey P. Dale, May 01 2025 *)
Formula
a(n)=a(n-5) for n >= 18. - Robert Israel, Oct 02 2020
G.f.: x*(4*x^16 + 4*x^15 + 2*x^14 + 2*x^13 + 3*x^12 - 2*x^11 + x^10 + x^9 - 2*x^8 + 8*x^7 + 8*x^6 - 8*x^5 - 9*x^4 - 4*x^3 - 13*x^2 - 12*x - 1)/(x^5 - 1). - Chai Wah Wu, May 07 2024
Extensions
More terms from Robert Israel, Oct 02 2020