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 21-30 of 110 results. Next

A357623 Skew-alternating sum of the n-th composition in standard order.

Original entry on oeis.org

0, 1, 2, 0, 3, 1, -1, -1, 4, 2, 0, 0, -2, -2, -2, 0, 5, 3, 1, 1, -1, -1, -1, 1, -3, -3, -3, -1, -3, -1, 1, 1, 6, 4, 2, 2, 0, 0, 0, 2, -2, -2, -2, 0, -2, 0, 2, 2, -4, -4, -4, -2, -4, -2, 0, 0, -4, -2, 0, 0, 2, 2, 2, 0, 7, 5, 3, 3, 1, 1, 1, 3, -1, -1, -1, 1, -1
Offset: 0

Views

Author

Gus Wiseman, Oct 08 2022

Keywords

Comments

We define the skew-alternating sum of a sequence (A, B, C, D, E, F, G, ...) to be A - B - C + D + E - F - G + ....
The k-th composition in standard order (graded reverse-lexicographic, A066099) is obtained by taking the set of positions of 1's in the reversed binary expansion of k, prepending 0, taking first differences, and reversing again. This gives a bijective correspondence between nonnegative integers and integer compositions.

Examples

			The 358-th composition is (2,1,3,1,2) so a(358) = 2 - 1 - 3 + 1 + 2 = 1.
		

Crossrefs

See link for sequences related to standard compositions.
Positions of positive firsts appear to be A029744.
The half-alternating form is A357621, reverse A357622.
The reverse version is A357624.
Positions of zeros are A357627, reverse A357628.
The version for prime indices is A357630.
The version for Heinz numbers of partitions is A357634.
A124754 gives alternating sum of standard compositions, reverse A344618.
A357637 counts partitions by half-alternating sum, skew A357638.
A357641 counts comps w/ half-alt sum 0, partitions A357639, even A357642.

Programs

  • Mathematica
    stc[n_]:=Differences[Prepend[Join @@ Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    skats[f_]:=Sum[f[[i]]*(-1)^(1+Ceiling[(i+1)/2]),{i,Length[f]}];
    Table[skats[stc[n]],{n,0,100}]

A347789 a(n) is the number of times that only 2 pegs have disks on them during the optimal solution to a Towers of Hanoi problem with n disks.

Original entry on oeis.org

0, 2, 4, 8, 12, 20, 28, 44, 60, 92, 124, 188, 252, 380, 508, 764, 1020, 1532, 2044, 3068, 4092, 6140, 8188, 12284, 16380, 24572, 32764, 49148, 65532, 98300, 131068, 196604, 262140, 393212, 524284, 786428, 1048572, 1572860, 2097148, 3145724, 4194300, 6291452
Offset: 1

Views

Author

John Bonomo, Sep 13 2021

Keywords

Comments

Zero together with the partial sum of the even terms of A016116. - Omar E. Pol, Sep 14 2021
For n >= 2, a(n+1) is the number of n X n arrays of 0's and 1's with every 2 X 2 square having density exactly 1. - David desJardins, Oct 27 2022

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

Programs

  • Maple
    a:= proc(n) option remember;
          `if`(n<3, 2*n-2, 2*(a(n-2)+2))
        end:
    seq(a(n), n=1..42);  # Alois P. Heinz, Sep 14 2021
  • Mathematica
    LinearRecurrence[{1, 2, -2}, {0, 2, 4}, 42] (* Jean-François Alcover, May 14 2022 *)
  • PARI
    a(n) = (3+(n % 2))*(2^(n\2)) - 4; \\ Michel Marcus, Sep 14 2021
    
  • Python
    def a(n): return (3 + n%2) * 2**(n//2) - 4
    print([a(n) for n in range(1, 43)]) # Michael S. Branicky, Sep 14 2021

Formula

a(n) = (3+(n mod 2))*(2^floor(n/2)) - 4.
a(n) = 4 * A052955(n-3) for n >= 3. - Joerg Arndt, Sep 14 2021
a(n) = A027383(n) - 2. - Omar E. Pol, Sep 14 2021
a(n) = 2 * A027383(n-2) for n >= 2. - Alois P. Heinz, Sep 14 2021
From Stefano Spezia, Sep 14 2021: (Start)
G.f.: 2*x^2*(1+x)/((1-x)*(1-2*x^2)).
a(n) = a(n-1) + 2*a(n-2) - 2*a(n-3) for n > 3. (End)

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

A246074 Paradigm Shift Sequence for a (-4,5) production scheme with replacement.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 16, 18, 20, 22, 24, 28, 32, 36, 40, 44, 48, 56, 64, 72, 80, 88, 96, 112, 128, 144, 160, 176, 192, 224, 256, 288, 320, 352, 384, 448, 512, 576, 640, 704, 768, 896, 1024, 1152, 1280, 1408, 1536, 1792, 2048, 2304, 2560, 2816, 3072, 3584, 4096, 4608, 5120, 5632, 6144, 7168, 8192, 9216
Offset: 1

Views

Author

Jonathan T. Rowell, Aug 13 2014

Keywords

Comments

This sequence is the solution to the following problem: "Suppose you have the choice of using one of three production options: apply a simple incremental action, bundle existing output as an integrated product (which requires p=-4 steps), or implement the current bundled action (which requires q=5 steps). The first use of a novel bundle erases (or makes obsolete) all prior actions. How large an output can be generated in n time steps?"
1. A production scheme with replacement R(p,q) eliminates existing output followinging a bundling action, while an additive scheme A(p,q) retains the output. The schemes correspond according to A(p,q)=R(p-q,q), with the replacement scheme serving as the default presentation.
2. This problem is structurally similar to the Copy and Paste Keyboard problem: Existing sequences (A178715 and A193286) should be regarded as Paradigm-Shift Sequences with production schemes R(1,1) and R(2,1) with replacement, respectively.
3. The ideal number of implementations per bundle, as measured by the geometric growth rate (p+zq root of z), is z = 2.
4. All solutions will be of the form a(n) = (qm+r) * m^b * (m+1)^d.
5. The paradigm shift sequence for the R(-4,5) scheme is also the solution to the R(-2,4) scheme.

Crossrefs

Paradigm shift sequences with implementation step q=5: A103969, A246074, A246075, A246076, A246079, A246083, A246087, A246091, A246095, A246099, A246103.
Paradigm shift sequences with negative bundling steps: A103969, A246074, A246075, A246076, A246079, A029750, A246078, A029747, A246077, A029744, A029747, A131577.

Programs

  • Mathematica
    Join[{1, 2, 3, 4, 5}, LinearRecurrence[{0, 0, 0, 0, 0, 2}, {6, 7, 8, 9, 10, 11}, 64]] (* Jean-François Alcover, Sep 25 2017 *)
  • PARI
    Vec(x*(1+x)^2 * (1-x+x^2)^2 * (1+x+x^2)^2 / (1-2*x^6) + O(x^100)) \\ Colin Barker, Nov 18 2016

Formula

a(n) = (qd+r) * d^(C-R) * (d+1)^R, where r = (n-Cp) mod q, Q = floor( (R-Cp)/q ), R = Q mod (C+1), and d = floor ( Q/(C+1) ).
a(n) = 2*a(n-6) for all n >= 12.
G.f.: x*(1+x)^2 * (1-x+x^2)^2 * (1+x+x^2)^2 / (1-2*x^6). - Colin Barker, Nov 18 2016

A119963 Triangle T(n,k), 0 <= k <= n, read by rows, with T(2n,2k) = T(2n+1,2k) = T(2n+1,2k+1) = T(2n+2,2k+1) = binomial(n,k).

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 3, 2, 3, 1, 1, 1, 1, 3, 3, 3, 3, 1, 1, 1, 1, 4, 3, 6, 3, 4, 1, 1, 1, 1, 4, 4, 6, 6, 4, 4, 1, 1, 1, 1, 5, 4, 10, 6, 10, 4, 5, 1, 1, 1, 1, 5, 5, 10, 10, 10, 10, 5, 5, 1, 1, 1, 1, 6, 5, 15, 10, 20, 10, 15, 5, 6, 1, 1, 1, 1, 6, 6, 15, 15, 20, 20, 15, 15, 6, 6, 1, 1, 1, 1, 7, 6, 21, 15, 35, 20, 35, 15, 21, 6, 7, 1, 1
Offset: 0

Views

Author

Philippe Deléham, Aug 02 2006

Keywords

Comments

From John P. McSorley, Aug 24 2010: (Start)
A combinatorial interpretation of this triangle is as follows:
Ignore the first column of 1's of the above triangle and the call the (n,k) entry of the new triangle formed RE(n,k).
Hence row 8 of the 'RE(n,k)' triangle is 1 4 3 6 3 4 1 1.
Now see sequence A180171 for the definition of a k-reverse of n.
Briefly, a k-reverse of n is a k-composition of n which is cyclically equivalent to its reverse.
Sequence A180171 is the 'R(n,k)' triangle read by rows where R(n,k) is the total number of k-reverses of n.
Then RE(n,k) is the number of k-reverses of n up to cyclic equivalence.
In sequence A180171 we have R(8,3)=9 because there are 9 3-reverses of 8.
In cyclically equivalent classes: {116,611,161} {224,422,242}, and {233,323,332}; since there are 3 such classes we have RE(8,3)=3.
Similarly, in A180171, we have R(8,6)=21 because all 21 6-compositions of 8 are 6-reverses of 8, but they come in 4 cyclically equivalent classes (with representatives 111113, 111122, 111212, and 112112) hence RE(8,6)=4.
There is another (equivalent) interpretation for RE(n,k) involving k-subsets of Z_n, the integers modulo n, and the multiplier -1. See the McSorley/Schoen paper below for more details.
In this case it is convenient to count k-subsets up to dihedral equivalence, rather than cyclic equivalence.
The counts are the same. The row sums of the 'RE(n,k)' triangle give sequence A052955.
(End)
From Petros Hadjicostas, Oct 12 2017: (Start)
When 1 <= k <= n, each cyclically equivalence class of k-reverses of n is a "Sommerville symmetrical cyclic composition," which was introduced by Sommerville (1909). On pp. 301-304 of his paper, he proves that the number of such (equivalence classes of) compositions of n with length k is exactly T(n,k) = RE(n,k).
The equivalence class of a Sommerville symmetrical cyclic composition contains at least one palindromic composition (type I) or a composition that becomes a palindromic composition if we remove the first part (type II). A composition with only one part is a palindromic composition of both types. Hadjicostas and Zhang (2017) have proved that each equivalence class of k-reverses of n contains exactly two compositions that are either of type I or type II (except in the case when k | n and all the parts are the same).
For example, consider the case with n=8 and k=3, where RE(8,3)=3. As pointed above by J. P. McSorley, in cyclically equivalent classes we have {116,611,161} {224,422,242}, and {233,323,332}. The first class contains one composition of type I (161) and one of type II (611); the second class contains one composition of type I (242) and one of type II (422); and the last class contains one composition of type I (323) and one of type II (233).
When n = 6 and k = 4, the class of 4-reverses {1221, 2211, 2112, 1122} contains two compositions of type I (1221 and 2112).
If A is a set of positive integers and 1 <= k <= n, let RE_A(n,k) be the total number of Sommerville symmetrical cyclic compositions of n with length k and parts only in A (= number of cyclically equivalence classes of k-reverses of n with parts only in A). Then the g.f. of RE_A(n,k) is Sum_{n,k >= 1} RE_A(n,k) * x^n * y^k = (-1/2) + (1 + y * f_A(x))^2/(2 * (1 - y^2 * f_A(x^2)), where f_A(x) = Sum_{m in A} x^m. (For this sequence, A = all positive integers.)
Sequence A292200 contains the total number of Sommerville symmetrical cyclic compositions of n that are Carlitz (compositions that have length one, or have length >= 1 and adjacent parts of the composition on a circle are distinct).
(End)

Examples

			Triangle begins (with rows for n >= 0 and columns for k >= 0) as follows:
  1;
  1, 1;
  1, 1, 1;
  1, 1, 1, 1;
  1, 1, 2, 1, 1;
  1, 1, 2, 2, 1, 1;
  1, 1, 3, 2, 3, 1, 1;
  1, 1, 3, 3, 3, 3, 1, 1;
  1, 1, 4, 3, 6, 3, 4, 1, 1;
  1, 1, 4, 4, 6, 6, 4, 4, 1, 1;
  ...
		

References

  • John P. McSorley, Counting k-compositions of n with palindromic and related structures, preprint, 2010. [From John P. McSorley, Aug 24 2010]

Crossrefs

The row sums of the T(n,k) triangle give sequence A029744 whose terms are 1 more than the terms of sequence A052955 (row sums of RE(n,k) triangle). See sequence A029744 where there is a reference to necklaces relevant to the combinatorial interpretation and the McSorley and McSorley/Schoen papers given here. - John P. McSorley, Aug 31 2010

Programs

  • Mathematica
    Table[Binomial[Floor[(n - Boole[OddQ@ k])/2], Floor[k/2]], {n, 0, 10}, {k, 0, n}] (* Michael De Vlieger, Oct 11 2017, after PARI by Andrew Howroyd *)
  • PARI
    T(n,k) = binomial((n-k%2)\2, k\2); \\ Andrew Howroyd, Oct 08 2017

Formula

G.f.: Sum_{n,k >= 1} RE(n,k)*x^n*y^k = (1+x*y-x^2)*x*y/((1-x)*(1-x^2-x^2*y^2)). - Petros Hadjicostas, Oct 12 2017
G.f.: Sum_{n,k >= 0} T(n,k)*x^n*y^k = (1+x*y)*(1+x)/(1-x^2-x^2*y^2) as above, but adding 1/(1-x) to include n,k = 0 terms. - Paul Sampson, Nov 22 2017
T(n, k) = binomial(floor(n/2) - (k mod 2) * (1 - (n mod 2)), floor(k/2)) for 0 <= k <= n. - Petros Hadjicostas, May 29 2019

Extensions

Corrected by Philippe Deléham, Aug 20 2010
Previous Showing 21-30 of 110 results. Next