The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A309937 Irregular triangle read by rows: T(n,k) is the number of compositions of n with 2k parts and circular differences all equal to 1 or -1, (n >= 3, 1 <= k <= n/3). 3
2, 0, 2, 0, 2, 2, 0, 0, 4, 2, 0, 2, 0, 2, 0, 2, 0, 6, 0, 4, 0, 2, 2, 0, 6, 0, 0, 2, 0, 8, 2, 0, 8, 0, 2, 0, 4, 0, 12, 0, 2, 0, 6, 0, 10, 0, 2, 0, 16, 0, 2, 2, 0, 6, 0, 20, 0, 0, 4, 0, 18, 0, 12, 2, 0, 8, 0, 30, 0, 2, 0, 2, 0, 16, 0, 30, 0, 2, 0, 6, 0, 40, 0, 14, 0, 4, 0, 20, 0, 52, 0, 2 (list; graph; refs; listen; history; text; internal format)
OFFSET
3,1
COMMENTS
All values are even since the parts must alternate between even and odd and therefore a composition is never equal to its reversal.
The longest compositions will consist of alternating 1's and 2's. The number of parts cannot then exceed n / 3.
LINKS
EXAMPLE
Triangle begins:
2;
0;
2;
0, 2;
2, 0;
0, 4;
2, 0, 2;
0, 2, 0;
2, 0, 6;
0, 4, 0, 2;
2, 0, 6, 0;
0, 2, 0, 8;
2, 0, 8, 0, 2;
0, 4, 0, 12, 0;
2, 0, 6, 0, 10;
0, 2, 0, 16, 0, 2;
2, 0, 6, 0, 20, 0;
0, 4, 0, 18, 0, 12;
2, 0, 8, 0, 30, 0, 2;
0, 2, 0, 16, 0, 30, 0;
2, 0, 6, 0, 40, 0, 14;
0, 4, 0, 20, 0, 52, 0, 2;
2, 0, 6, 0, 42, 0, 42, 0;
0, 2, 0, 16, 0, 78, 0, 16;
2, 0, 8, 0, 50, 0, 84, 0, 2;
0, 4, 0, 18, 0, 96, 0, 56, 0;
2, 0, 6, 0, 50, 0, 140, 0, 18;
0, 2, 0, 16, 0, 116, 0, 128, 0, 2;
...
For n = 11 there are a total of 8 compositions:
k = 1: (56), (65)
k = 3: (121232), (123212), (212123), (212321), (232121), (321212)
PROG
(PARI)
step(R, n)={matrix(n, n, i, j, if(i>j, if(j>1, R[i-j, j-1]) + if(j+1<=n, R[i-j, j+1])))}
T(n)={my(v=vector(n\3)); for(k=1, n, my(R=matrix(n, n, i, j, i==j&&abs(i-k)==1), m=0); while(R, m++; if(m%2==0, v[m/2]+=R[n, k]); R=step(R, n))); v}
for(n=3, 24, print(T(n)))
CROSSREFS
Row sums are A325589.
Sequence in context: A219199 A029225 A341977 * A116127 A039979 A204173
KEYWORD
nonn,tabf
AUTHOR
Andrew Howroyd, Aug 23 2019
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 28 15:12 EDT 2024. Contains 372916 sequences. (Running on oeis4.)