OFFSET
1,2
LINKS
Index entries for linear recurrences with constant coefficients, signature (4,-2,1,-4,2).
FORMULA
Let f(n) = floor(r*floor(s*n)) = A184922(n), where r = sqrt(2) and s = r + 1. Let a(1) = 1. Then a(n) = f(a(n-1)) for n >= 2.
Also, a(n) = 4*a(n-1) - 2*a(n-2) + a(n-3) - 4*a(n-4) + a(n-5) for n >= 6, where a(1) = 1, a(2) = 3, a(3) = 5, a(4) = 16, a(5) = 53.
G.f.: x*(-x^4 + x^3 + x^2 + 2*x - 1)/((x - 1)*(x^2 + x + 1)*(2*x^2 - 4*x + 1)). - Chai Wah Wu, Feb 15 2021
MATHEMATICA
PROG
(PARI) a(n)=([0, 1, 0, 0, 0; 0, 0, 1, 0, 0; 0, 0, 0, 1, 0; 0, 0, 0, 0, 1; 2, -4, 1, -2, 4]^(n-1)*[1; 2; 5; 16; 53])[1, 1] \\ Charles R Greathouse IV, May 25 2026
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Feb 07 2021
STATUS
approved
