A214992 Power ceiling-floor sequence of (golden ratio)^4.
7, 47, 323, 2213, 15169, 103969, 712615, 4884335, 33477731, 229459781, 1572740737, 10779725377, 73885336903, 506417632943, 3471038093699, 23790849022949, 163064905066945, 1117663486445665, 7660579500052711
Offset: 0
Examples
a(0) = ceiling(r) = 7, where r = ((1+sqrt(5))/2)^4 = 6.8...; a(1) = floor(7*r) = 47; a(2) = ceiling(47) = 323.
Links
- Clark Kimberling, Table of n, a(n) for n = 0..250
- A. M. Odlyzko and H. S. Wilf, Functional iteration and the Josephus problem, Glasgow Math. J. 33, 235-240, 1991.
- Index entries for linear recurrences with constant coefficients, signature (6,6,-1).
- Index entries for sequences related to the Josephus Problem.
Programs
-
Mathematica
(* Program 1. A214992 and related sequences *) x = GoldenRatio^4; z = 30; (* z = # terms in sequences *) z1 = 100; (* z1 = # digits in approximations *) 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]] Table[p1[n], {n, 0, z}] (* A049685 *) Table[p2[n], {n, 0, z}] (* A157335 *) Table[p3[n], {n, 0, z}] (* A214992 *) Table[p4[n], {n, 0, z}] (* A004187 *) Table[p4[n] - p1[n], {n, 0, z}] (* A004187 *) Table[p3[n] - p2[n], {n, 0, z}] (* A098305 *) (* Program 2. Plot of power floor and power ceiling functions, p1(x) and p4(x) *) f[x_] := f[x] = Floor[x]; c[x_] := c[x] = Ceiling[x]; p1[x_, 0] := f[x]; p1[x_, n_] := f[x*p1[x, n - 1]]; p4[x_, 0] := c[x]; p4[x_, n_] := c[x*p4[x, n - 1]]; Plot[Evaluate[{p1[x, 10]/x^10, p4[x, 10]/x^10}], {x, 2, 3}, PlotRange -> {0, 4}] (* Program 3. Plot of power floor-ceiling and power ceiling-floor functions, p2(x) and p3(x) *) f[x_] := f[x] = Floor[x]; c[x_] := c[x] = Ceiling[x]; p2[x_, 0] := f[x]; p3[x_, 0] := c[x]; p2[x_, n_] := If[Mod[n, 2] == 1, c[x*p2[x, n - 1]], f[x*p2[x, n - 1]]] p3[x_, n_] := If[Mod[n, 2] == 1, f[x*p3[x, n - 1]], c[x*p3[x, n - 1]]] Plot[Evaluate[{p2[x, 10]/x^10, p3[x, 10]/x^10}], {x, 2, 3}, PlotRange -> {0, 4}]
Formula
a(n) = floor(r*a(n-1)) if n is odd and a(n) = ceiling(r*a(n-1)) if n is even, where a(0) = ceiling(r), r = (golden ratio)^4 = (7 + sqrt(5))/2.
a(n) = 6*a(n-1) + 6*a(n-2) - a(n-3).
G.f.: (7 + 5*x - x^2)/((1 + x)*(1 - 7*x + x^2)).
a(n) = (10*(-2)^n+(10+3*sqrt(5))*(7-3*sqrt(5))^(n+2)+(10-3*sqrt(5))*(7+3*sqrt(5))^(n+2))/(90*2^n). - Bruno Berselli, Nov 14 2012
E.g.f.: exp(-x)*(5 + 2*exp(9*x/2)*(155*cosh(3*sqrt(5)*x/2) + 69*sqrt(5)*sinh(3*sqrt(5)*x/2)))/45. - Stefano Spezia, Oct 28 2024
Comments