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.

Previous Showing 31-40 of 115 results. Next

A188377 a(n) = n^3 - 4n^2 + 6n - 2.

Original entry on oeis.org

7, 22, 53, 106, 187, 302, 457, 658, 911, 1222, 1597, 2042, 2563, 3166, 3857, 4642, 5527, 6518, 7621, 8842, 10187, 11662, 13273, 15026, 16927, 18982, 21197, 23578, 26131, 28862, 31777, 34882, 38183, 41686, 45397, 49322, 53467, 57838, 62441, 67282, 72367
Offset: 3

Views

Author

Adeniji, Adenike & Makanjuola, Samuel (somakanjuola(AT)unilorin.edu.ng) Apr 14 2011

Keywords

Comments

Number of nilpotent elements in the identity difference partial one - one transformation semigroup, denoted by N(IDI_n). For n=3, #N(IDI_n) = 7.
a(n+1) is also the Moore lower bound on the order of an (n,7)-cage. - Jason Kimberley, Oct 20 2011

Crossrefs

Moore lower bound on the order of a (k,g) cage: A198300 (square); rows: A000027 (k=2), A027383 (k=3), A062318 (k=4), A061547 (k=5), A198306 (k=6), A198307 (k=7), A198308 (k=8), A198309 (k=9), A198310 (k=10), A094626 (k=11); columns: A020725 (g=3), A005843 (g=4), A002522 (g=5), A051890 (g=6), this sequence (g=7). - Jason Kimberley, Oct 30 2011

Programs

Formula

a(n+1) = (n+1)^3 - 4*(n+1)^2 + 6*(n+1) - 2
= (n-1)^3 + 2*(n-1)^2 + 2*(n-1) + 2
= 1222 read in base n-1.
- Jason Kimberley, Oct 20 2011
From Colin Barker, Apr 06 2012: (Start)
a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4).
G.f.: x^3*(7 - 6*x + 7*x^2 - 2*x^3)/(1-x)^4. (End)
E.g.f.: 2 - x - x^2 + exp(x)*(x^3 - x^2 + 3*x - 2). - Stefano Spezia, Apr 09 2022

Extensions

Edited by N. J. A. Sloane, Apr 23 2011

A209721 1/4 the number of (n+1) X 3 0..2 arrays with every 2 X 2 subblock having distinct clockwise edge differences.

Original entry on oeis.org

3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577, 32769, 49153, 65537, 98305, 131073, 196609, 262145, 393217, 524289, 786433, 1048577, 1572865, 2097153, 3145729
Offset: 1

Views

Author

R. H. Hardin, Mar 12 2012

Keywords

Comments

Column 2 of A209727.
From Richard Locke Peterson, Apr 26 2020: (Start)
The formula a(n) = 2*a(n-2)-1 also fits empirically. With the given initial numbers a(1)=3, a(2)=4, a(3)=5, this new formula implies the old empirical formula. (But it is not established that the old empirical formula is true, so it is not established that the new formula is true either.) Furthermore, if the initial numbers had somehow, for example, been 3,4,6 instead, the new formula no longer implies the old formula.
If the new formula actually is true, it follows that a(n) is the number of distinct integer triangles that can be formed with sides of length a(n-1) and a(n-2), since the greatest length the third side can have is a(n-1)+a(n-2)-1, and the least length would be a(n-1)-a(n-2)+1. (End)
Conjectures: a(n) = A029744(n+1)+1. Also, a(n) = positions of the zeros in A309019(n+2) - A002487(n+2). - George Beck, Mar 26 2022

Examples

			Some solutions for n=4
..2..1..2....1..2..1....0..2..1....2..0..1....1..2..0....2..1..2....0..1..0
..0..2..0....2..0..2....1..0..2....1..2..0....2..0..1....0..2..0....2..0..2
..1..0..1....0..1..0....0..2..1....2..0..1....1..2..0....1..0..1....1..2..1
..0..2..0....2..0..2....1..0..2....1..2..0....2..0..1....0..2..0....2..0..2
..1..0..1....0..1..0....0..2..1....2..0..1....1..2..0....2..1..2....1..2..1
		

Crossrefs

The following sequences are all essentially the same, in the sense that they are simple transformations of each other, with A029744 = {s(n), n>=1}, the numbers 2^k and 3*2^k, as the parent: A029744 (s(n)); A052955 (s(n)-1), A027383 (s(n)-2), A354788 (s(n)-3), A347789 (s(n)-4), A209721 (s(n)+1), A209722 (s(n)+2), A343177 (s(n)+3), A209723 (s(n)+4); A060482, A136252 (minor differences from A354788 at the start); A354785 (3*s(n)), A354789 (3*s(n)-7). The first differences of A029744 are 1,1,1,2,2,4,4,8,8,... which essentially matches eight sequences: A016116, A060546, A117575, A131572, A152166, A158780, A163403, A320770. The bisections of A029744 are A000079 and A007283. - N. J. A. Sloane, Jul 14 2022

Formula

Empirical: a(n) = a(n-1) +2*a(n-2) -2*a(n-3).
Empirical g.f.: x*(3+x-5*x^2)/((1-x)*(1-2*x^2)). [Colin Barker, Mar 23 2012]

A209722 1/4 the number of (n+1) X 4 0..2 arrays with every 2 X 2 subblock having distinct clockwise edge differences.

Original entry on oeis.org

4, 5, 6, 8, 10, 14, 18, 26, 34, 50, 66, 98, 130, 194, 258, 386, 514, 770, 1026, 1538, 2050, 3074, 4098, 6146, 8194, 12290, 16386, 24578, 32770, 49154, 65538, 98306, 131074, 196610, 262146, 393218, 524290, 786434, 1048578, 1572866, 2097154, 3145730
Offset: 1

Views

Author

R. H. Hardin, Mar 12 2012

Keywords

Comments

Column 3 of A209727.

Examples

			Some solutions for n=4:
..2..1..2..1....2..1..2..1....1..2..1..2....1..0..2..0....2..1..2..1
..0..2..0..2....0..2..0..2....2..0..2..0....0..2..1..2....0..2..0..2
..2..1..2..1....1..0..1..0....0..1..0..1....1..0..2..0....1..0..1..0
..0..2..0..2....0..2..0..2....2..0..2..0....0..2..1..2....0..2..0..2
..2..1..2..1....2..1..2..1....0..1..0..1....1..0..2..0....1..0..1..0
		

Crossrefs

Cf. A209727.
The following sequences are all essentially the same, in the sense that they are simple transformations of each other, with A029744 = {s(n), n>=1}, the numbers 2^k and 3*2^k, as the parent: A029744 (s(n)); A052955 (s(n)-1), A027383 (s(n)-2), A354788 (s(n)-3), A347789 (s(n)-4), A209721 (s(n)+1), A209722 (s(n)+2), A343177 (s(n)+3), A209723 (s(n)+4); A060482, A136252 (minor differences from A354788 at the start); A354785 (3*s(n)), A354789 (3*s(n)-7). The first differences of A029744 are 1,1,1,2,2,4,4,8,8,... which essentially matches eight sequences: A016116, A060546, A117575, A131572, A152166, A158780, A163403, A320770. The bisections of A029744 are A000079 and A007283. - N. J. A. Sloane, Jul 14 2022

Formula

Empirical: a(n) = a(n-1) + 2*a(n-2) - 2*a(n-3).
Conjectures from Colin Barker, Jul 12 2018: (Start)
G.f.: x*(4 + x - 7*x^2) / ((1 - x)*(1 - 2*x^2)).
a(n) = 3*2^(n/2 - 1) + 2 for n even.
a(n) = 2^((n + 1)/2) + 2 for n odd.
(End)

A209723 1/4 the number of (n+1) X 5 0..2 arrays with every 2 X 2 subblock having distinct clockwise edge differences.

Original entry on oeis.org

6, 7, 8, 10, 12, 16, 20, 28, 36, 52, 68, 100, 132, 196, 260, 388, 516, 772, 1028, 1540, 2052, 3076, 4100, 6148, 8196, 12292, 16388, 24580, 32772, 49156, 65540, 98308, 131076, 196612, 262148, 393220, 524292, 786436, 1048580, 1572868, 2097156
Offset: 1

Views

Author

R. H. Hardin, Mar 12 2012

Keywords

Comments

Column 4 of A209727.

Examples

			Some solutions for n=4:
..2..1..2..0..2....0..2..0..1..0....0..1..0..1..0....0..1..0..1..0
..0..2..0..1..0....2..1..2..0..2....2..0..2..0..2....2..0..2..0..2
..2..1..2..0..2....0..2..0..1..0....0..1..0..1..0....0..1..0..1..0
..0..2..0..1..0....2..1..2..0..2....2..0..2..0..2....2..0..2..0..2
..2..1..2..0..2....0..2..0..1..0....1..2..1..2..1....0..1..0..1..0
		

Crossrefs

Cf. A209727.
The following sequences are all essentially the same, in the sense that they are simple transformations of each other, with A029744 = {s(n), n>=1}, the numbers 2^k and 3*2^k, as the parent: A029744 (s(n)); A052955 (s(n)-1), A027383 (s(n)-2), A354788 (s(n)-3), A347789 (s(n)-4), A209721 (s(n)+1), A209722 (s(n)+2), A343177 (s(n)+3), A209723 (s(n)+4); A060482, A136252 (minor differences from A354788 at the start); A354785 (3*s(n)), A354789 (3*s(n)-7). The first differences of A029744 are 1,1,1,2,2,4,4,8,8,... which essentially matches eight sequences: A016116, A060546, A117575, A131572, A152166, A158780, A163403, A320770. The bisections of A029744 are A000079 and A007283. - N. J. A. Sloane, Jul 14 2022

Formula

Empirical: a(n) = a(n-1) + 2*a(n-2) - 2*a(n-3).
Conjectures from Colin Barker, Jul 12 2018: (Start)
G.f.: x*(6 + x - 11*x^2) / ((1 - x)*(1 - 2*x^2)).
a(n) = 3*2^(n/2 - 1) + 4 for n even.
a(n) = 2^((n + 1)/2) + 4 for n odd.
(End)

A320770 a(n) = (-1)^floor(n/4) * 2^floor(n/2).

Original entry on oeis.org

1, 1, 2, 2, -4, -4, -8, -8, 16, 16, 32, 32, -64, -64, -128, -128, 256, 256, 512, 512, -1024, -1024, -2048, -2048, 4096, 4096, 8192, 8192, -16384, -16384, -32768, -32768, 65536, 65536, 131072, 131072, -262144, -262144, -524288, -524288, 1048576, 1048576
Offset: 0

Views

Author

Michael Somos, Oct 20 2018

Keywords

Examples

			G.f. = 1 + x + 2*x^2 + 2*x^3 - 4*x^4 - 4*x^5 - 8*x^6 - 8*x^7 + ...
		

Crossrefs

Cf. A016116.
The following sequences are all essentially the same, in the sense that they are simple transformations of each other, with A029744 = {s(n), n>=1}, the numbers 2^k and 3*2^k, as the parent: A029744 (s(n)); A052955 (s(n)-1), A027383 (s(n)-2), A354788 (s(n)-3), A347789 (s(n)-4), A209721 (s(n)+1), A209722 (s(n)+2), A343177 (s(n)+3), A209723 (s(n)+4); A060482, A136252 (minor differences from A354788 at the start); A354785 (3*s(n)), A354789 (3*s(n)-7). The first differences of A029744 are 1,1,1,2,2,4,4,8,8,... which essentially matches eight sequences: A016116, A060546, A117575, A131572, A152166, A158780, A163403, A320770. The bisections of A029744 are A000079 and A007283. - N. J. A. Sloane, Jul 14 2022

Programs

  • Magma
    [(-1)^Floor(n/4)* 2^Floor(n/2): n in [0..50]]; // G. C. Greubel, Oct 27 2018
    
  • Mathematica
    a[ n_] := (-1)^Quotient[n, 4] * 2^Quotient[n, 2];
  • PARI
    {a(n) = (-1)^floor(n/4) * 2^floor(n/2)};
    
  • Python
    def A320770(n): return -(1<<(n>>1)) if n&4 else 1<<(n>>1) # Chai Wah Wu, Jan 18 2023

Formula

G.f.: (1 + x) * (1 + 2*x^2) / (1 + 4*x^4).
G.f.: A(x) = 1/(1 - x/(1 - x/(1 + 2*x/(1 - 4*x/(1 + 3*x/(1 + 5*x/(3 - 2*x))))))).
a(n) = (-1)^floor(n/2) * 2 * a(n-2) = -4 * a(n-4) for all n in Z.
a(n) = c(n) * (-2)^n * a(-n) for all n in Z where c(4*k+2) = -1 else 1.
a(n) = a(n+1) = (1+I)^n * (-I)^(n/2) * (-1)^floor(n/4) if n = 2*k.
a(n) = (-1)^floor(n/4) * A016116(n).
E.g.f.: cosh(x)*(cos(x) + sin(x)) + sin(x)*sinh(x). - Stefano Spezia, Feb 04 2023

A343177 a(0)=4; if n > 0 is even then a(n) = 2^(n/2+1)+3, otherwise a(n) = 3*(2^((n-1)/2)+1).

Original entry on oeis.org

4, 6, 7, 9, 11, 15, 19, 27, 35, 51, 67, 99, 131, 195, 259, 387, 515, 771, 1027, 1539, 2051, 3075, 4099, 6147, 8195, 12291, 16387, 24579, 32771, 49155, 65539, 98307, 131075, 196611, 262147, 393219, 524291, 786435, 1048579, 1572867, 2097155, 3145731, 4194307, 6291459
Offset: 0

Views

Author

N. J. A. Sloane, Apr 26 2021

Keywords

Comments

Number of edges along the boundary of the graph G(n) described in A342759.

Crossrefs

Cf. A342759.
The following sequences are all essentially the same, in the sense that they are simple transformations of each other, with A029744 = {s(n), n>=1}, the numbers 2^k and 3*2^k, as the parent: A029744 (s(n)); A052955 (s(n)-1), A027383 (s(n)-2), A354788 (s(n)-3), A347789 (s(n)-4), A209721 (s(n)+1), A209722 (s(n)+2), A343177 (s(n)+3), A209723 (s(n)+4); A060482, A136252 (minor differences from A354788 at the start); A354785 (3*s(n)), A354789 (3*s(n)-7). The first differences of A029744 are 1,1,1,2,2,4,4,8,8,... which essentially matches eight sequences: A016116, A060546, A117575, A131572, A152166, A158780, A163403, A320770. The bisections of A029744 are A000079 and A007283. - N. J. A. Sloane, Jul 14 2022

Programs

  • Maple
    f:=n->if n = 0 then 4 elif (n mod 2) = 0 then 2^(n/2+1)+3 else 3*(2^((n-1)/2)+1); fi;
    [seq(f(n),n=0..40)];
  • Mathematica
    LinearRecurrence[{1, 2, -2}, {4, 6, 7, 9}, 50] (* or *)
    A343177[n_] := Which[n == 0, 4, OddQ[n], 3*(2^((n-1)/2)+1), True, 2^(n/2+1)+3];
    Array[A343177, 50, 0] (* Paolo Xausa, Feb 02 2024 *)

Formula

G.f.: (4 + 2*x - 7*x^2 - 2*x^3)/((1 - x)*(1 - 2*x^2)). - Stefano Spezia, Feb 04 2023
E.g.f.: 3*cosh(x) + 2*cosh(sqrt(2)*x) + 3*sinh(x) + 3*sinh(sqrt(2)*x)/sqrt(2) - 1. - Stefano Spezia, Jul 25 2024

A354785 Numbers of the form 3*2^k or 9*2^k.

Original entry on oeis.org

3, 6, 9, 12, 18, 24, 36, 48, 72, 96, 144, 192, 288, 384, 576, 768, 1152, 1536, 2304, 3072, 4608, 6144, 9216, 12288, 18432, 24576, 36864, 49152, 73728, 98304, 147456, 196608, 294912, 393216, 589824, 786432, 1179648, 1572864, 2359296, 3145728, 4718592, 6291456, 9437184, 12582912, 18874368, 25165824, 37748736, 50331648
Offset: 1

Views

Author

N. J. A. Sloane, Jul 12 2022

Keywords

Crossrefs

The following sequences are all essentially the same, in the sense that they are simple transformations of each other, with A029744 = {s(n), n>=1}, the numbers 2^k and 3*2^k, as the parent: A029744 (s(n)); A052955 (s(n)-1), A027383 (s(n)-2), A354788 (s(n)-3), A347789 (s(n)-4), A209721 (s(n)+1), A209722 (s(n)+2), A343177 (s(n)+3), A209723 (s(n)+4); A060482, A136252 (minor differences from A354788 at the start); A354785 (3*s(n)), A354789 (3*s(n)-7). The first differences of A029744 are 1,1,1,2,2,4,4,8,8,... which essentially matches eight sequences: A016116, A060546, A117575, A131572, A152166, A158780, A163403, A320770. The bisections of A029744 are A000079 and A007283.

Programs

  • Mathematica
    seq[max_] := Union[Table[3*2^n, {n, 0, Floor[Log2[max/3]]}], Table[9*2^n, {n, 0, Floor[Log2[max/9]]}]]; seq[10^8] (* Amiram Eldar, Jan 16 2024 *)

Formula

Sum_{n>=1} 1/a(n) = 8/9. - Amiram Eldar, Jan 16 2024
G.f.: (3*x^2+6*x+3)/(1-2*x^2). - Georg Fischer, Apr 10 2025

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

A094626 Expansion of x*(1+x)/((1-x)*(1-10*x^2)).

Original entry on oeis.org

0, 1, 2, 12, 22, 122, 222, 1222, 2222, 12222, 22222, 122222, 222222, 1222222, 2222222, 12222222, 22222222, 122222222, 222222222, 1222222222, 2222222222, 12222222222, 22222222222, 122222222222, 222222222222, 1222222222222, 2222222222222, 12222222222222
Offset: 0

Views

Author

Paul Barry, May 15 2004

Keywords

Comments

Previous name: Sequence whose n-th term digits sum to n.
a(n) is the smallest integer with digits from {0,1,2} having digit sum n. Namely the base-10 reading of the ternary string of A062318. - Jason Kimberley, Nov 01 2011
a(n) is the Moore lower bound on the order of an (11,n)-cage. - Jason Kimberley, Oct 18 2011

Crossrefs

Moore lower bound on the order of a (k,g) cage: A198300 (square); rows: A000027 (k=2), A027383 (k=3), A062318 (k=4), A061547 (k=5), A198306 (k=6), A198307 (k=7), A198308 (k=8), A198309 (k=9), A198310 (k=10), this sequence (k=11); columns: A020725 (g=3), A005843 (g=4), A002522 (g=5), A051890 (g=6), A188377 (g=7). - Jason Kimberley, Nov 01 2011

Programs

  • Mathematica
    LinearRecurrence[{1, 10, -10}, {0, 1, 2}, 30] (* Paolo Xausa, Feb 21 2024 *)
  • PARI
    concat(0, Vec(x*(1+x)/((1-x)*(1-10*x^2)) + O(x^30))) \\ Colin Barker, Mar 17 2017

Formula

G.f.: x*(1+x)/((1-x)*(1-10*x^2)).
a(n) = 10^(n/2)*(11*sqrt(10)/180 + 1/9 - (11*sqrt(10)/180 - 1/9)*(-1)^n) - 2/9.
From Colin Barker, Mar 17 2017: (Start)
a(n) = 2*(10^(n/2) - 1)/9 for n even.
a(n) = (11*10^((n-1)/2) - 2)/9 for n odd. (End)
E.g.f.: (20*(cosh(sqrt(10)*x) - cosh(x) - sinh(x)) + 11*sqrt(10)*sinh(sqrt(10)*x))/90. - Stefano Spezia, Apr 09 2022

A357644 Number of integer compositions of n into parts that are alternately unequal and equal.

Original entry on oeis.org

1, 1, 1, 3, 4, 7, 8, 13, 17, 25, 30, 44, 58, 77, 98, 142, 176, 245, 311, 426, 548, 758, 952, 1319, 1682, 2308, 2934, 4059, 5132, 7087, 9008, 12395, 15757, 21728, 27552, 38019, 48272, 66515, 84462, 116467, 147812, 203825, 258772, 356686, 452876, 624399, 792578
Offset: 0

Views

Author

Gus Wiseman, Oct 14 2022

Keywords

Examples

			The a(1) = 1 through a(7) = 13 compositions:
  (1)  (2)  (3)   (4)    (5)    (6)     (7)
            (12)  (13)   (14)   (15)    (16)
            (21)  (31)   (23)   (24)    (25)
                  (211)  (32)   (42)    (34)
                         (41)   (51)    (43)
                         (122)  (411)   (52)
                         (311)  (1221)  (61)
                                (2112)  (133)
                                        (322)
                                        (511)
                                        (2113)
                                        (3112)
                                        (12211)
		

Crossrefs

Without equal relations we have A000213, equal only A027383.
Even-length opposite: A003242, ranked by A351010, partitions A035457.
The version for partitions is A351006.
The opposite version is A357643, partitions A351005.
A011782 counts compositions.
A357621 gives half-alternating sum of standard compositions, skew A357623.
A357645 counts compositions by half-alternating sum, skew A357646.

Programs

  • Mathematica
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],And@@Table[#[[i]]==#[[i+1]],{i,2,Length[#]-1,2}]&&And@@Table[#[[i]]!=#[[i+1]],{i,1,Length[#]-1,2}]&]],{n,0,10}]

Extensions

More terms from Alois P. Heinz, Oct 19 2022
Previous Showing 31-40 of 115 results. Next