login
A341248
a(n) = 5*a(n-1) - 4*a(n-3) for n >= 4, where a(1) = 1, a(2) = 4, a(3) = 18.
1
1, 4, 18, 86, 414, 1998, 9646, 46574, 224878, 1085806, 5242734, 25314158, 122227566, 590166894, 2849577838, 13758978926, 66434227054, 320772823918, 1548828203886, 7478404111214, 36108929260398, 174349333486446, 841833050987374, 4064729537895278
OFFSET
1,2
FORMULA
Let f(n) = floor(r*floor(s*n)) = A022804(n), where r = sqrt(2) and s = r + 2. Let a(1) = 1. Then a(n) = f(a(n-1)) for n >= 2.
G.f.: x*(1 - x - 2*x^2)/(1 - 5*x + 4*x^3). - Stefano Spezia, Feb 13 2021
MATHEMATICA
z = 40; r = Sqrt[2]; s = 2 + Sqrt[2]; f[x_] := Floor[r*Floor[s*x]];
Table[f[n], {n, 1, z}] (* A022804 *)
a[1] = 1; a[n_] := f[a[n - 1]];
t = Table[a[n], {n, 1, z}] (* A341248 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Feb 13 2021
STATUS
approved