A218990 Power ceiling-floor sequence of 3+sqrt(8).
6, 34, 199, 1159, 6756, 39376, 229501, 1337629, 7796274, 45440014, 264843811, 1543622851, 8996893296, 52437736924, 305629528249, 1781339432569, 10382407067166, 60513102970426, 352696210755391, 2055664161561919, 11981288758616124, 69832068390134824
Offset: 0
Examples
a(0) = ceiling(r) = 6, where r = 3+sqrt(8); a(1) = floor(6*r) = 34; a(2) = ceiling(35*r) = 199.
References
- R. C. Alperin, A family of nonlinear recurrences and their linear solutions, Fib. Q., 57:4 (2019), 318-321.~
Links
- Clark Kimberling, Table of n, a(n) for n = 0..250
- Index entries for linear recurrences with constant coefficients, signature (5,5,-1).
Programs
-
Mathematica
x = 3 + Sqrt[8]; z = 30; (* z = # terms in sequences *) f[x_] := Floor[x]; c[x_] := Ceiling[x]; p1[0] = f[x]; p2[0] = f[x]; p3[0] = c[x]; p4[0] = c[x]; p1[n_] := f[x*p1[n - 1]] p2[n_] := If[Mod[n, 2] == 1, c[x*p2[n - 1]], f[x*p2[n - 1]]] p3[n_] := If[Mod[n, 2] == 1, f[x*p3[n - 1]], c[x*p3[n - 1]]] p4[n_] := c[x*p4[n - 1]] t1 = Table[p1[n], {n, 0, z}] (* A001653 *) t2 = Table[p2[n], {n, 0, z}] (* A084158 *) t3 = Table[p3[n], {n, 0, z}] (* A218990 *) t4 = Table[p4[n], {n, 0, z}] (* A001109 *) LinearRecurrence[{5,5,-1},{6,34,199},30] (* Harvey P. Dale, Mar 21 2024 *)
-
PARI
Vec((6 + 4*x - x^2) / ((1 + x)*(1 - 6*x + x^2)) + O(x^50)) \\ Colin Barker, Nov 13 2017
Formula
a(n) = floor(x*a(n-1)) if n is odd, a(n) = ceiling(x*a(n-1)) if n is even, where x=3+sqrt(8) and a(0) = ceiling(x).
a(n) = 5*a(n-1) + 5*a(n-2) - a(n-3).
G.f.: (6 + 4*x - x^2)/(1 - 5*x - 5*x^2 + x^3).
a(n) = (1/16)*(2*(-1)^n + (47-33*sqrt(2))*(3-2*sqrt(2))^n + (3+2*sqrt(2))^n*(47+33*sqrt(2))). - Colin Barker, Nov 13 2017
Comments