cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-2 of 2 results.

A274230 Number of holes in a sheet of paper when you fold it n times and cut off the four corners.

Original entry on oeis.org

0, 0, 1, 3, 9, 21, 49, 105, 225, 465, 961, 1953, 3969, 8001, 16129, 32385, 65025, 130305, 261121, 522753, 1046529, 2094081, 4190209, 8382465, 16769025, 33542145, 67092481, 134193153, 268402689, 536821761, 1073676289, 2147385345
Offset: 0

Views

Author

Philippe Gibone, Jun 15 2016

Keywords

Comments

The folds are always made so the longer side becomes the shorter side.
We could have counted not only the holes but also all the notches: 4, 6, 9, 15, 25, 45, 81, 153, 289, ... which has the formula a(n) = (2^ceiling(n/2) + 1) * (2^floor(n/2) + 1) and appears to match the sequence A183978. - Philippe Gibone, Jul 06 2016
The same sequence (0,0,1,3,9,21,49,...) turns up when you start with an isosceles right triangular piece of paper and repeatedly fold it in half, snipping corners as you go. Is there an easy way to see why the two questions have the same answer? - James Propp, Jul 05 2016
Reply from Tom Karzes, Jul 05 2016: (Start)
This case seems a little more complicated than the rectangular case, since with the triangle you alternate between horizontal/vertical folds vs. diagonal folds, and the resulting fold pattern is more complex, but I think the basic argument is essentially the same.
Note that with the triangle, the first hole doesn't appear until after you've made 3 folds, so if you start counting at zero folds, you have three leading zeros in the sequence: 0,0,0,1,3,9,21,... (End)
Also the number of subsets of {1,2,...,n} that contain both even and odd numbers. For example, a(3)=3 and the 3 subsets are {1,2}, {2,3}, {1,2,3}; a(4)=9 and the 9 subsets are {1,2}, {1,4}, {2,3}, {3,4}, {1,2,3}, {1,2,4}, {1,3,4}, {2,3,4}, {1,2,3,4}. (See comments in A052551 for the number of subsets of {1,2,...,n} that contain only odd and even numbers.) - Enrique Navarrete, Mar 26 2018
Also the number of integer compositions of n + 1 with an odd part other than the first or last. The complementary compositions are counted by A052955(n>0) = A027383(n) + 1. - Gus Wiseman, Feb 05 2022
Also the number of unit squares in the (n+1)-st iteration in the version of the dragon curve where the rotation directions alternate, so that any clockwise rotation is followed by a counterclockwise rotation, and vice versa (see image link below). - Talmon Silver, May 09 2023

Crossrefs

See A274626, A274627 for the three- and higher-dimensional analogs.
This is the main diagonal of A274635.
Counting fold lines instead of holes gives A027383.
Bisections are A060867 (even) and A134057 (odd).

Programs

Formula

u(0) = 0; v(0) = 0; u(n+1) = v(n); v(n+1) = 2u(n) + 1; a(n) = u(n)*v(n).
a(n) = (2^ceiling(n/2) - 1)*(2^floor(n/2) - 1).
Proof from Tom Karzes, Jul 05 2016: (Start)
Let r be the number of times you fold along one axis and s be the number of times you fold along the other axis. So r is ceiling(n/2) and s is floor(n/2), where n is the total number of folds.
When unfolded, the resulting paper has been divided into a grid of (2^r) by (2^s) rectangles. The interior grid lines will have diamond-shaped holes where they intersect (assuming diagonal cuts).
There are (2^r-1) internal grid lines along one axis and (2^s-1) along the other. The total number of internal grid line intersections is therefore (2^r-1)*(2^s-1), or (2^ceiling(n/2)-1)*(2^floor(n/2)-1) as claimed. (End)
From Colin Barker, Jun 22 2016, revised by N. J. A. Sloane, Jul 05 2016: (Start)
It follows that:
a(n) = (2^(n/2)-1)^2 for n even, a(n) = 2^n+1-3*2^((n-1)/2) for n odd.
a(n) = 3*a(n-1)-6*a(n-3)+4*a(n-4) for n>3.
G.f.: x^2 / ((1-x)*(1-2*x)*(1-2*x^2)).
a(n) = (1+2^n-2^((n-3)/2)*(3-3*(-1)^n+2*sqrt(2)+2*(-1)^n*sqrt(2))). (End)
a(n) = A000225(n) - 2*A052955(n-2) for n > 1. - Yuchun Ji, Nov 19 2018
a(n) = A079667(2^(n-1)) for n >= 1. - J. M. Bergot, Jan 18 2021
a(n) = 2^(n-1) - A052955(n) = 2^(n-1) - A027383(n) - 1. - Gus Wiseman, Jan 29 2022
E.g.f.: cosh(x) + cosh(2*x) - 2*cosh(sqrt(2)*x) + sinh(x) + sinh(2*x) - 3*sinh(sqrt(2)*x)/sqrt(2). - Stefano Spezia, Apr 06 2022

A274626 a(n) = Product_{i=0..2} (2^floor((n+i)/3)-1).

Original entry on oeis.org

0, 0, 0, 1, 3, 9, 27, 63, 147, 343, 735, 1575, 3375, 6975, 14415, 29791, 60543, 123039, 250047, 504063, 1016127, 2048383, 4112895, 8258175, 16581375, 33227775, 66585855, 133432831, 267126783, 534776319, 1070599167, 2142244863, 4286583807, 8577357823, 17158905855, 34326194175, 68669157375
Offset: 0

Views

Author

N. J. A. Sloane, Jul 05 2016

Keywords

Comments

From Tom Karzes, Jul 05 2016: (Start)
This is a three-dimensional analog of the holes-in-sheet-of-paper sequence A274230.
In d dimensions, assuming the axes for folding are selected in a round-robin fashion, the number of times a given dimension is folded is:
floor((n+i)/d)
where i runs from 0 (for the last dimension to be folded) through d-1 (for the first dimension to be folded).
The corresponding number of internal dividing lines/planes/etc. is (2^floor((n+i)/d)-1). The number of internal d-way intersections, which corresponds to the number of holes, is:
Product_{i=0..d-1}(2^floor((n+i)/d)-1)
where d is the number of dimensions and n is the total number of folds.
Note that the first several nonzero entries in these sequences are the powers of 3. Specifically, in d dimensions, the first d entries are 0, followed by the first (d+1) powers of 3.
It's not hard to see why this is so. The first nonzero entry occurs at d folds, and the value is 1. This is when you've folded once along each dimension.
After that, the next d folds each divide 2 old partitions into 4 new ones, i.e., they change the internal folds from 1 to 3. So for the next d entries you just multiply the previous entry by 3 (or more generally, by 3/1).
After that you multiply by 7/3 for the next d entries, then 15/7, then 31/15, etc. Each time you're just replacing one of the old factors with a new one, where each factor is one less than a power of two.
Here's an alternative formulation that avoids the iterated product.
For a given number of folds, there are only two factors, each raised to some exponent (with the sum of the exponents being the dimension d):
v1 = 2^(n/d)-1
v2 = 2^(n/d+1)-1
p1 = d-mod(n,d)
p2 = mod(n,d)
holes = (v1^p1)*(v2^p2)
This flattens to:
((2^(n/d)-1)^(d-mod(n,d))) * ((2^(n/d+1)-1)^(mod(n,d)))
(End)

References

  • Tom Karzes, Posting to Math Fun Mailing List, Jul 05 2016.

Crossrefs

Programs

  • Maple
    f:=(n,d) ->  mul(2^floor((n+i)/d)-1, i = 0 .. d-1);
    [seq(f(n,3),n=0..40)];
  • Mathematica
    Table[Product[(2^Floor[(n+i)/3]-1),{i,0,2}],{n,0,40}] (* Harvey P. Dale, Jun 29 2025 *)
  • PARI
    a(n) = prod(i=0, 2, 2^floor((n+i)/3)-1) \\ Colin Barker, Jul 06 2016

Formula

Empirical g.f.: x^3*(1+2*x^2) / ((1-x)*(1-2*x)*(1-2*x^3)*(1-4*x^3)). - Colin Barker, Jul 06 2016
Showing 1-2 of 2 results.