A257418 Number of pieces after a sheet of paper is folded n times and cut diagonally.
2, 3, 5, 8, 13, 23, 41, 77, 145, 281, 545, 1073, 2113, 4193, 8321, 16577, 33025, 65921, 131585, 262913, 525313, 1050113, 2099201, 4197377, 8392705, 16783361, 33562625, 67121153, 134234113, 268460033, 536903681, 1073790977, 2147549185, 4295065601, 8590065665
Offset: 0
Examples
n=1: Take a rectangular sheet of paper and fold it in half. Cutting along the diagonal of the resulting rectangle yields 3 smaller pieces of paper. n=0: Cutting the sheet of paper (without any folding) along the diagonal yields two pieces.
Links
- Colin Barker, Table of n, a(n) for n = 0..1000
- Index entries for linear recurrences with constant coefficients, signature (3,0,-6,4).
Programs
-
Magma
[2,3,5,8] cat [Floor((2^n+2^(n/2)*(1+(-1)^n+3*Sqrt(2)*(1-(-1)^n)/4)+2)/2):n in [4..40]]; // Vincenzo Librandi, May 05 2015
-
Maple
2, seq(floor((2^n+2^(n/2)*(1+(-1)^n+3*sqrt(2)*(1-(-1)^n)/4)+2)/2),n=1..25);
-
Mathematica
Table[Floor[(2^n + 2^(n/2)*(1 + (-1)^n + 3 Sqrt[2]*(1 - (-1)^n)/4) + 2)/2], {n, 0, 25}] (* Michael De Vlieger, Apr 24 2015 *)
-
PARI
concat(2,vector(30,n,round((2^n+2^(n/2)*(1+(-1)^n+3*sqrt(2)*(1-(-1)^n)/4)+2)/2))) \\ Derek Orr, Apr 27 2015
-
PARI
Vec((2 - 3*x - 4*x^2 + 5*x^3 - x^4 + 2*x^5) / ((1 - x)*(1 - 2*x)*(1 - 2*x^2)) + O(x^35)) \\ Colin Barker, Feb 05 2020
Formula
a(n) = (2^n+2^(n/2)*(1+(-1)^n+3*sqrt(2)*(1-(-1)^n)/4)+2)/2 for n>1. (Johan Nilsson)
a(0) = 2, a(1) = 3, a(n+1) = 2*a(n)-2^(floor((n-1)/2))-1.
G.f.: -(2*x^5-x^4+5*x^3-4*x^2-3*x+2)/((x-1)*(2*x-1)*(2*x^2-1)). - Alois P. Heinz, Apr 23 2015
a(n) = 3*a(n-1) - 6*a(n-3) + 4*a(n-4) for n>5. - Colin Barker, Feb 05 2020
E.g.f.: (1/4)*(-2 - 2*x + 2*cosh(2*x) + 4*cosh(sqrt(2)*x) + 4*sinh(x) + 4*cosh(x)*(1 + sinh(x)) + 3*sqrt(2)*sinh(sqrt(2)*x)). - Stefano Spezia, Feb 05 2020
Comments