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-10 of 10 results.

A110660 Oblong (promic) numbers repeated.

Original entry on oeis.org

0, 0, 2, 2, 6, 6, 12, 12, 20, 20, 30, 30, 42, 42, 56, 56, 72, 72, 90, 90, 110, 110, 132, 132, 156, 156, 182, 182, 210, 210, 240, 240, 272, 272, 306, 306, 342, 342, 380, 380, 420, 420, 462, 462, 506, 506, 552, 552, 600, 600, 650, 650, 702, 702, 756, 756, 812, 812
Offset: 0

Views

Author

Reinhard Zumkeller, Aug 05 2005

Keywords

Comments

a(floor(n/2)) = A002378(n).
Sum of the even numbers among the smallest parts in the partitions of 2n into two parts (see example). - Wesley Ivan Hurt, Jul 25 2014
For n > 0, a(n-1) is the sum of the smallest parts of the partitions of 2n into two distinct even parts. - Wesley Ivan Hurt, Dec 06 2017

Examples

			a(4) = 6; The partitions of 2*4 = 8 into two parts are: (7,1), (6,2), (5,3), (4,4). The sum of the even numbers from the smallest parts of these partitions gives: 2 + 4 = 6.
a(5) = 6; The partitions of 2*5 = 10 into two parts are: (9,1), (8,2), (7,3), (6,4), (5,5). The sum of the even numbers from the smallest parts of these partitions gives: 2 + 4 = 6.
		

Crossrefs

Cf. A109613.
Partial sums give A006584.

Programs

Formula

a(n) = floor(n/2) * (floor(n/2)+1).
a(n) = A028242(n) * A110654(n).
a(n) = A008805(n-2)*2, with A008805(-2) = A008805(-1) = 0.
From Wesley Ivan Hurt, Jul 25 2014: (Start)
G.f.: 2*x^2/((1-x)^3*(1+x)^2);
a(n) = a(n-1) + 2*a(n-2) - 2*a(n-3) - a(n-4) + a(n-5), for n > 4;
a(n) = (2*n^2 + 2*n - 1 + (2*n + 1)*(-1)^n)/8. (End)
a(n) = Sum_{i=1..n; i even} i. - Olivier Pirson, Nov 05 2017

Extensions

Typo in description (Name) fixed by Harvey P. Dale, Jul 09 2021

A032091 Number of reversible strings with n-1 beads of 2 colors. 4 beads are black. String is not palindromic.

Original entry on oeis.org

2, 6, 16, 32, 60, 100, 160, 240, 350, 490, 672, 896, 1176, 1512, 1920, 2400, 2970, 3630, 4400, 5280, 6292, 7436, 8736, 10192, 11830, 13650, 15680, 17920, 20400, 23120, 26112, 29376, 32946, 36822, 41040, 45600, 50540, 55860, 61600, 67760, 74382, 81466, 89056
Offset: 6

Views

Author

Keywords

Comments

Also, number of 4-element subsets of the set {1,...,n-1} whose elements sum up to an odd integer, i.e., 4th column of the triangle A159916, cf. there. - M. F. Hasler, May 01 2009
Also, if the offset is changed to 3, so that a(3)=2, a(n) = number of non-equivalent (mod D_3) ways to place 2 indistinguishable points on a triangular grid of side n so that they are not adjacent. - Heinrich Ludwig, Mar 23 2014
Also, the number of binary strings of length n with exactly one pair of consecutive 0s and exactly three pairs of consecutive 1s. - Jeremy Dover, Jul 07 2016
From Petros Hadjicostas, May 19 2018: (Start)
Let k be an integer >= 2. The g.f. of the BHK[k] transform of the sequence (c(n): n >= 1), with g.f. C(x) = Sum_{n>=1} c(n)*x^n, is A_k(x) = (C(x)^k - C(x^2)^(k/2))/2 if k is even, and A_k(x) = (C(x)/2)*(C(x)^{k-1} - C(x^2)^{(k-1)/2}) if k is odd. This follows easily from the formulae in C. G. Bower's web link below about transforms.
When k is odd and c(n) = 1 for all n >= 1, we get C(x) = x/(1-x) and A_k(x) = (1/2)*(x/(1-x))*((x/(1-x))^{k-1} - (x^2/(1-x^2))^{(k-1)/2}). If (a_k(n): n >= 1) is the output sequence (with g.f. A_k(x)), then it can be proved (using Taylor expansions) that a_k(n) = (1/2)*(binomial(n-1, n-k) - binomial(floor((n-1)/2), floor((n-k)/2))) for n >= k+1. (Clearly, a_k(1) = ... = a_k(k) = 0.)
In this sequence, k = 5, and (according to C. G. Bower) a(n) = a_{k=5}(n) is the number of reversible non-palindromic compositions of n with 5 positive parts. If n = b_1 + b_2 + b_3 + b_4 + b_5 is such a composition of n (with b_i >= 1), then it is equivalent to the composition n = b_5 + b_4 + b_3 + b_2 + b_1, and each equivalent class has two elements because here linear palindromes are not allowed as compositions of n.
The fact that we are finding the BHK[5] transform of 1, 1, 1, ... means that each part of each composition of n can have exactly one color (see Bower's link below about transforms).
In each such composition replace each b_i with one black (B) ball followed by b_i - 1 white (W) balls. Then drop the first black (B) ball. We then get a reversible non-palindromic string of length n-1 that has 4 black balls and n-5 white balls. This process, applied to the equivalent compositions n = b_1 + b_2 + b_3 + b_4 + b_5 = b_5 + b_4 + b_3 + b_2 + b_1, gives two strings of length n-1 with 4 black balls and n-5 white balls that are mirror images of each other.
Hence, for n >= 2, a(n) = a_{k=5}(n) is also the number of reversible non-palindromic strings of length n-1 that have k-1 = 4 black balls and n-k = n-5 white balls. (Clearly, a(n) = a_{k=5}(n) > 0 only for n >= 6. For n=5, the composition 1+1+1+1+1, which corresponds to string BBBB, is discarded because it is palindromic.)
For k = 3 (an odd integer) we have a_k(n) = A002620(n-2) (for n >= 4), while for k = 7 (also an odd integer), we have a_k(n) = A032093(n) (for n >= 8).
For k = 4 (which is even), we have a_k(n) = A006584(n-2) (for n >= 5), while for k = 6 and k = 8 (which are also even integers), we get sequences A032092 and A032094, respectively. When k is even, the g.f. in these cases is A_k(x) = (C(x)^k - C(x^2)^(k/2))/2, where C(x) = x/(1-x). The formula for a_k(n) (given above) needs to be modified as well.
(End)
The formula for a(n) for this sequence was Ralf Stephan's conjecture 73. It was solved by Elizabeth Wilmer (see Proposition 2 in one of the links below). There is a minor typo in the original conjecture. - Petros Hadjicostas, Jul 04 2018

Examples

			From _Petros Hadjicostas_, May 19 2018: (Start)
For n=6, we have the following reversible non-palindromic compositions with 5 parts of n: 1+1+1+1+2 (= 2+1+1+1+1) and 1+1+1+2+1 (= 1+2+1+1+1). Using the process described in the comments, we get the following reversible non-palindromic strings with 4 black balls and n-5=1 white balls: BBBBW (= WBBBB) and BBBWB (= BWBBB).
For n=7, we get the following 6 compositions and 6 corresponding strings:
1+1+1+1+3 <-> BBBBWW
1+1+1+3+1 <-> BBBWWB
1+1+1+2+2 <-> BBBWBW
1+1+2+1+2 <-> BBWBBW
1+1+2+2+1 <-> BBWBWB
1+2+1+1+2 <-> BWBBBW
(End)
		

Crossrefs

a(n+6) = 2*A002624(n).
Fourth column of A274228. - Jeremy Dover, Jul 07 2016

Programs

  • Mathematica
    Table[If[EvenQ[n],(n^4-10n^3+32n^2-32n)/48,(n^4-10n^3+32n^2-38n+15)/48], {n,6,50}] (* or *)
    LinearRecurrence[{3,-1,-5,5,1,-3,1},{2,6,16,32,60,100,160},50] (* Harvey P. Dale, Apr 11 2016 *)
    CoefficientList[Series[-2/((x - 1)^5 (x + 1)^2), {x, 0, 42}], x] (* Robert G. Wilson v, Jun 20 2018 *)
  • PARI
    A032091(n)=polcoeff(2/(1-x)^5/(1+x)^2+O(x^(n-5)),n-6)
    A032091(n)=((n-5)*(n-3)*(n-1)^2+if(n%2==0,6*n-15))/48 \\ M. F. Hasler, May 01 2009

Formula

"BHK[ 5 ]" (reversible, identity, unlabeled, 5 parts) transform of 1, 1, 1, 1, ...
From M. F. Hasler, May 01 2009: (Start)
G.f.: -2*x^6 / ((x-1)^5*(x+1)^2). [corrected by Colin Barker, Mar 07 2015]
a(n) = [(n-5)(n-3)(n-1)^2 + (6n-15) X[2Z](n)]/48, where X[2Z] is the characteristic function of 2Z.
(End)
From Colin Barker, Mar 07 2015: (Start)
a(n) = (n^4-10*n^3+32*n^2-32*n)/48 if n is even.
a(n) = (n^4-10*n^3+32*n^2-38*n+15)/48 if n is odd.
(End)
a(n) = (2*n^4 - 20*n^3 + 64*n^2 + 6*(-1)^n*n - 70*n - 15*(-1)^n + 15)/96. - Ilya Gutkovskiy, Jul 08 2016
From Petros Hadjicostas, May 19 2018: (Start)
a(n) = (1/2)*(binomial(n-1, n-5) - binomial(floor((n-1)/2) - floor((n-5)/2))).
G.f.: (1/2)*(x/(1-x))*((x/(1-x))^4 - (x^2/(1-x^2))^2).
(End)
a(n) = 2*A002624(n-6) - Robert G. Wilson v, Jun 20 2018

A032092 Number of reversible strings with n-1 beads of 2 colors. 5 beads are black. String is not palindromic.

Original entry on oeis.org

3, 9, 28, 60, 126, 226, 396, 636, 1001, 1491, 2184, 3080, 4284, 5796, 7752, 10152, 13167, 16797, 21252, 26532, 32890, 40326, 49140, 59332, 71253, 84903, 100688, 118608, 139128, 162248, 188496, 217872, 250971, 287793, 329004, 374604, 425334, 481194, 543004
Offset: 7

Views

Author

Keywords

Comments

If the offset is changed to 3, this is the 2nd Witt transform of A000217 [Moree]. - R. J. Mathar, Nov 08 2008
From Petros Hadjicostas, May 19 2018: (Start)
Let k be an integer >= 2. The g.f. of the BHK[k] transform of the sequence (c(n): n >= 1), with g.f. C(x) = Sum_{n>=1} c(n)*x^n, is A_k(x) = (C(x)^k - C(x^2)^(k/2))/2 if k is even, and A_k(x) = (C(x)/2)*(C(x)^{k-1} - C(x^2)^{(k-1)/2}) if k is odd. This follows easily from the formulae in C. G. Bower's web link below about transforms.
When k is even and c(n) = 1 for all n >= 1, we get C(x) = x/(1-x) and A_k(x) = (1/2)*((x/(1-x))^k - (x^2/(1-x^2))^{k/2}). If (a_k(n): n >= 1) is the output sequence (with g.f. A_k(x)), then it can be proved (using Taylor expansions) that a_k(n) = (1/2)*(binomial(n-1, n-k) - binomial((n/2)-1, (n-k)/2)) for even n >= k+1 and a_k(n) = (1/2)*binomial(n-1, n-k) for odd n >= k+1. (Clearly, a_k(1) = ... = a_k(k) = 0.)
In this sequence, k = 6, and (according to C. G. Bower) a(n) = a_{k=6}(n) is the number of reversible non-palindromic compositions of n with 6 positive parts. If n = b_1 + b_2 + b_3 + b_4 + b_5 + b_6 is such a composition of n (with b_i >= 1), then it is equivalent to the composition n = b_6 + b_5 + b_4 + b_3 + b_2 + b_1, and each equivalent class has two elements because here linear palindromes are not allowed as compositions of n.
The fact that we are finding the BHK[6] transform of 1, 1, 1, ... means that each part of each composition of n can have exactly one color (see Bower's link below about transforms).
In each such composition replace each b_i with one black (B) ball followed by b_i - 1 white (W) balls. Then drop the first black (B) ball. We then get a reversible non-palindromic string of length n-1 that has 5 black balls and n-6 white balls. This process, applied to the equivalent compositions n = b_1 + b_2 + b_3 + b_4 + b_5 + b_6 = b_6 + b_5 + b_4 + b_3 + b_2 + b_1, gives two strings of length n-1 with 5 black balls and n-6 white balls that are mirror images of each other.
Hence, for n >= 2, a(n) = a_{k=6}(n) is also the number of reversible non-palindromic strings of length n-1 that have k-1 = 5 black balls and n-k = n-6 white balls. (Clearly, a(n) = a_{k=6}(n) > 0 only for n >= 7.)
(End)

Examples

			From _Petros Hadjicostas_, May 19 2018: (Start)
For n=7, we have the following 3 reversible non-palindromic compositions with 6 parts of n: 1+1+1+1+1+2 (= 2+1+1+1+1+1), 1+1+1+1+2+1 (= 1+2+1+1+1+1), and 1+1+1+2+1+1 (= 1+1+2+1+1+1). Using the process described in the comments, we get the following reversible non-palindromic strings with 5 black balls and n-6 = 1 white balls: BBBBBW (= WBBBBB), BBBBWB (= BWBBBB), and BBBWBB (= BBWBBB).
For n=8, we get the following 9 compositions and 9 corresponding strings:
1+1+1+1+1+3 <-> BBBBBWW
1+1+1+1+3+1 <-> BBBBWWB
1+1+1+3+1+1 <-> BBBWWBB
1+1+1+1+2+2 <-> BBBBWBW
1+1+1+2+1+2 <-> BBBWBBW
1+1+2+1+1+2 <-> BBWBBBW
1+2+1+1+1+2 <-> BWBBBBW
1+1+1+2+2+1 <-> BBBWBWB
1+1+2+1+2+1 <-> BBWBBWB
(End)
		

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{3,0,-8,6,6,-8,0,3,-1},{3,9,28,60,126,226,396,636,1001},50] (* Harvey P. Dale, Mar 19 2017 *)
    f[n_] := Binomial[n - 1, n - 6]/2 - If[ OddQ@ n, 0, Binomial[(n/2) - 1, (n - 6)/2]/2]; Array[a, 40, 7] (* or *)
    CoefficientList[ Series[(x^7 (x^2 + 3))/((x - 1)^6 (x + 1)^3), {x, 0, 46}], x] (* Robert G. Wilson v, May 20 2018 *)
  • PARI
    Vec(x^7*(3+x^2)/((1-x)^6*(1+x)^3) + O(x^100)) \\ Colin Barker, Mar 07 2015

Formula

"BHK[ 6 ]" (reversible, identity, unlabeled, 6 parts) transform of 1, 1, 1, 1, ...
G.f.: x^7*(3+x^2)/((1-x)^6*(1+x)^3). - R. J. Mathar, Nov 08 2008
From Colin Barker, Mar 07 2015: (Start)
a(n) = (2*n^5-30*n^4+170*n^3-480*n^2+728*n-480)/480 if n is even.
a(n) = (2*n^5-30*n^4+170*n^3-450*n^2+548*n-240)/480 if n is odd.
(End)
From Petros Hadjicostas, May 19 2018: (Start)
a(n) = (1/2)*(binomial(n-1, n-6) - binomial((n/2)-1, (n-6)/2)) if n is even.
a(n) = (1/2)*binomial(n-1, n-6) if n is odd.
G.f.: (1/2)*((x/(1-x))^6 - (x^2/(1-x^2))^3).
These formulae agree with the above formulae by R. J. Mathar and C. Barker.
(End)

A032093 Number of reversible strings with n-1 beads of 2 colors. 6 beads are black. Strings are not palindromic.

Original entry on oeis.org

3, 12, 40, 100, 226, 452, 848, 1484, 2485, 3976, 6160, 9240, 13524, 19320, 27072, 37224, 50391, 67188, 88440, 114972, 147862, 188188, 237328, 296660, 367913, 452816, 553504, 672112, 811240, 973488, 1161984, 1379856
Offset: 8

Views

Author

Keywords

Comments

From Petros Hadjicostas, May 19 2018: (Start)
Let k be an integer >= 2. The g.f. of the BHK[k] transform of the sequence (c(n): n>=1), with g.f. C(x) = Sum_{n>=1} c(n)*x^n, is A_k(x) = (C(x)^k - C(x^2)^(k/2))/2 if k is even, and A_k(x) = (C(x)/2)*(C(x)^{k-1} - C(x^2)^{(k-1)/2}) if k is odd. This follows easily from the formulae in C. G. Bower's web link below about transforms.
When k is odd and c(n) = 1 for all n>=1, we get C(x) = x/(1-x) and A_k(x) = (1/2)*(x/(1-x))*((x/(1-x))^{k-1} - (x^2/(1-x^2))^{(k-1)/2}). If (a_k(n): n>=1) is the output sequence (with g.f. A_k(x)), then it can be proved (using Taylor expansions) that a_k(n) = (1/2)*(binomial(n-1, n-k) - binomial(floor((n-1)/2), floor((n-k)/2))) for n >= k+1. (Clearly, a_k(1) = ... = a_k(k) = 0.)
In this sequence, k = 7, and (according to C. G. Bower) a(n) = a_{k=7}(n) is the number of reversible non-palindromic compositions of n with 7 positive parts. If n = b_1 + b_2 + b_3 + b_4 + b_5 + b_6 + b_7 is such a composition of n (with b_i >=1), then it is equivalent to the composition n = b_7 + b_6 + b_5 + b_4 + b_3 + b_2 + b_1, and each equivalent class has two elements because here linear palindromes are not allowed as compositions of n.
The fact that we are finding the BHK[7] transform of 1, 1, 1, ... means that each part of each composition of n can have exactly one color (see Bower's link below about transforms).
In each such composition replace each b_i with one black (B) ball followed by b_i - 1 white (W) balls. Then drop the first black (B) ball. We then get a reversible non-palindromic string of length n-1 that has 6 black balls and n-7 white balls. This process, applied to the equivalent compositions n = b_1 + b_2 + b_3 + b_4 + b_5 + b_6 + b_7 = b_7 + b_6 + b_5 + b_4 + b_3 + b_2 + b_1, gives two strings of length n-1 with 6 black balls and n-7 white balls that are mirror images of each other.
Hence, for n>=2, a(n) = a_{k=7}(n) is also the number of reversible non-palindromic strings of length n-1 that have k-1 = 6 black balls and n-k = n-7 white balls. (Clearly, a(n) = a_{k=7}(n) > 0 only for n >= 8. For n=7, the composition 1+1+1+1+1+1+1, which corresponds to string BBBBBB, is discarded because it is palindromic.)
(End)

Examples

			From _Petros Hadjicostas_, May 19 2018: (Start)
For n=8, we have the following 3 reversible non-palindromic compositions with 7 parts of n: 1+1+1+1+1+1+2 (= 2+1+1+1+1+1+1), 1+1+1+1+1+2+1 (= 1+2+1+1+1+1+1), and 1+1+1+1+2+1+1 (= 1+1+2+1+1+1+1). Using the process described in the comments, we get the following reversible non-palindromic strings with 6 black balls and n-7=1 white balls: BBBBBBW (= WBBBBBB), BBBBBWB (= BWBBBBB), and BBBBWBB (= BBWBBBB).
For n=9, we get the following 12 compositions and 12 corresponding strings:
1+1+1+1+1+1+3 <-> BBBBBBWW
1+1+1+1+1+3+1 <-> BBBBBWWB
1+1+1+1+3+1+1 <-> BBBBWWBB
1+1+1+1+1+2+2 <-> BBBBBWBW
1+1+1+1+2+1+2 <-> BBBBWBBW
1+1+1+2+1+1+2 <-> BBBWBBBW
1+1+2+1+1+1+2 <-> BBWBBBBW
1+2+1+1+1+1+2 <-> BWBBBBBW
1+1+1+1+2+2+1 <-> BBBBWBWB
1+1+1+2+1+2+1 <-> BBBWBBWB
1+1+2+1+1+2+1 <-> BBWBBBWB
1+1+1+2+2+1+1 <-> BBBWBWBB
(End)
		

Crossrefs

Formula

"BHK[ 7 ]" (reversible, identity, unlabeled, 7 parts) transform of 1, 1, 1, 1, ...
Empirical G.f.: -x^8*(x^2+3)/((x-1)^7*(x+1)^3). - Colin Barker, Nov 24 2012
From Petros Hadjicostas, May 19 2018: (Start)
a(n) = (1/2)*(binomial(n-1, n-7) - binomial(floor((n-1)/2), floor((n-7)/2))) for n >= 8.
G.f.: (1/2)*(x/(1-x))*((x/(1-x))^6 - (x^2/(1-x^2))^3), which is the same as the g.f. given by Colin Barker above.
(End)

Extensions

Definition changed slightly by Harvey P. Dale, Oct 02 2017

A003451 Number of nonequivalent dissections of an n-gon into 3 polygons by nonintersecting diagonals up to rotation.

Original entry on oeis.org

1, 4, 8, 16, 25, 40, 56, 80, 105, 140, 176, 224, 273, 336, 400, 480, 561, 660, 760, 880, 1001, 1144, 1288, 1456, 1625, 1820, 2016, 2240, 2465, 2720, 2976, 3264, 3553, 3876, 4200, 4560, 4921, 5320, 5720, 6160, 6601, 7084, 7568, 8096, 8625, 9200, 9776, 10400
Offset: 5

Views

Author

Keywords

Comments

In other words, the number of 2-dissections of an n-gon modulo the cyclic action.

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Column 3 of A295633.

Programs

  • Magma
    [(n-4)*(2*n^2-4*n-3*(1-(-1)^n))/24: n in [5..60]]; // Vincenzo Librandi, Apr 05 2015
  • Maple
    T51:= proc(n)
    if n mod 2 = 0 then n*(n-2)*(n-4)/12;
    else (n+1)*(n-3)*(n-4)/12; fi end;
    [seq(T51(n),n=5..80)]; # N. J. A. Sloane, Dec 28 2012
  • Mathematica
    Table[((n - 4) (2 n^2 - 4 n - 3 (1 - (-1)^n)) / 24), {n, 5, 60}] (* Vincenzo Librandi, Apr 05 2015 *)
    CoefficientList[Series[(1+2*x-x^2)/((1-x)^4*(1+x)^2),{x,0,20}],x] (* Vaclav Kotesovec, Apr 05 2015 *)
  • PARI
    Vec((1 + 2*x - x^2 ) / ((1 - x)^4*(1 + x)^2) + O(x^50)) \\ Michel Marcus, Apr 04 2015
    
  • PARI
    \\ See A295495 for DissectionsModCyclic()
    { my(v=DissectionsModCyclic(apply(i->y, [1..30]))); apply(p->polcoeff(p, 3), v[5..#v]) } \\ Andrew Howroyd, Nov 24 2017
    

Formula

G.f.: x^5 * (1 + 2*x - x^2 ) / ((1 - x)^4*(1 + x)^2).
See also the Maple code for an explicit formula.
a(n) = A006584(n+3) - A027656(n). - Yosu Yurramendi, Aug 07 2008
a(n) = (n-4)*(2*n^2-4*n-3*(1-(-1)^n))/24, for n>=5. - Luce ETIENNE, Apr 04 2015

Extensions

Entry revised (following Bowman and Regev) by N. J. A. Sloane, Dec 28 2012
First formula adapted to offset by Vaclav Kotesovec, Apr 05 2015
Name clarified by Andrew Howroyd, Nov 25 2017

A034852 Rows of (Pascal's triangle - Losanitsch's triangle) (n >= 0, k >= 0).

Original entry on oeis.org

0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 2, 2, 2, 0, 0, 2, 4, 4, 2, 0, 0, 3, 6, 10, 6, 3, 0, 0, 3, 9, 16, 16, 9, 3, 0, 0, 4, 12, 28, 32, 28, 12, 4, 0, 0, 4, 16, 40, 60, 60, 40, 16, 4, 0, 0, 5, 20, 60, 100, 126, 100, 60, 20, 5, 0, 0, 5, 25, 80, 160, 226, 226, 160, 80, 25, 5, 0, 0, 6, 30, 110, 240
Offset: 0

Views

Author

Keywords

Comments

Also number of linear unbranched n-4-catafusenes of C_{2v} symmetry.
Number of n-bead black-white reversible strings with k black beads; also binary grids; string is not palindromic. - Yosu Yurramendi, Aug 08 2008
The first seven columns are A004526, A002620, A006584, A032091, A032092, A032093, A032094. Row sums give essentially A032085. - Yosu Yurramendi, Aug 08 2008
From Álvar Ibeas, Jun 01 2020: (Start)
T(n, k) is the sum of odd-degree coefficients of the Gaussian polynomial [n, k]_q. The area below a NE lattice path between (0,0) and (k, n-k) is even for A034851(n, k) paths and odd for T(n, k) of them.
For a (non-reversible) string of k black and n-k white beads, consider the minimum number of bead transpositions needed to place the black ones to the left and the white ones to the right (in other words, the number of inversions of the permutation obtained by labeling the black beads by integers 1,...,k and the white ones by k+1,...,n, in the same order they take on the string). It is even for A034851(n, k) strings and odd for T(n, k) cases.
(End)

Examples

			Triangle begins:
  0;
  0 0;
  0 1 0;
  0 1 1 0;
  0 2 2 2 0;
  0 2 4 4 2 0;
  ...
		

Crossrefs

Essentially the same as A034877.

Programs

  • Haskell
    a034852 n k = a034852_tabl !! n !! k
    a034852_row n = a034852_tabl !! n
    a034852_tabl = zipWith (zipWith (-)) a007318_tabl a034851_tabl
    -- Reinhard Zumkeller, Mar 24 2012
  • Mathematica
    nmax = 12; t[n_?EvenQ, k_?EvenQ] := (Binomial[n, k] - Binomial[n/2, k/2])/ 2; t[n_?EvenQ, k_?OddQ] := Binomial[n, k]/2; t[n_?OddQ, k_?EvenQ] := (Binomial[n, k] - Binomial[(n-1)/2, k/2])/2; t[n_?OddQ, k_?OddQ] := (Binomial[n, k] - Binomial[(n-1)/2, (k-1)/2])/2; Flatten[ Table[t[n, k], {n, 0, nmax}, {k, 0, n}]] (* Jean-François Alcover, Nov 15 2011, after Yosu Yurramendi *)

Formula

Equals (A007318-A051159)/2. - Yosu Yurramendi, Aug 08 2008
T(n, k) = T(n - 1, k - 1) + T(n - 1, k); except when n is even and k odd, in which case T(n, k) = A034851(n, k) = T(n - 1, k - 1) + A034841(n - 1, k) = A034841(n - 1, k - 1) + T(n - 1, k) = C(n, k) / 2. - Álvar Ibeas, Jun 01 2020

Extensions

More terms from James Sellers, May 04 2000

A143902 Rectangular array R by antidiagonals: R(m,n) = number of black squares.

Original entry on oeis.org

0, 1, 1, 1, 2, 1, 2, 3, 3, 2, 2, 4, 4, 4, 2, 3, 5, 6, 6, 5, 3, 3, 6, 7, 8, 7, 6, 3, 4, 7, 9, 10, 10, 9, 7, 4, 4, 8, 10, 12, 12, 12, 10, 8, 4, 5, 9, 12, 14, 15, 15, 14, 12, 9, 5, 5, 10, 13, 16, 17, 18, 17, 16, 13, 10, 5, 6, 11, 15, 18, 20, 21, 21, 20, 18, 15, 11, 6, 6, 12, 16, 20, 22
Offset: 1

Views

Author

Clark Kimberling, Sep 04 2008

Keywords

Comments

Antidiagonal sums: (2,4,10,16,28,40,60,80,...)=A006584 (conjectured).
Diagonals: A007590, A000217.

Examples

			Northwest corner:
0 1 1 2 2 3 3 4
1 2 3 4 5 6 7 8
1 3 4 6 7 9 10 12
2 4 6 8 10 12 14 16
		

Crossrefs

Cf. A143901.

Formula

R(m,n)=Floor(mn/2).

A147611 The 3rd Witt transform of A000027.

Original entry on oeis.org

0, 0, 0, 0, 2, 7, 18, 42, 84, 153, 264, 429, 666, 1001, 1456, 2061, 2856, 3876, 5166, 6783, 8778, 11214, 14168, 17710, 21924, 26910, 32760, 39582, 47502, 56637, 67122, 79112, 92752, 108207, 125664, 145299, 167310, 191919, 219336, 249795, 283556
Offset: 0

Views

Author

R. J. Mathar, Nov 08 2008

Keywords

Comments

a(n) is the number of binary Lyndon words of length n+3 having 3 blocks of 0's, see Math.SE. - Andrey Zabolotskiy, Nov 16 2021

Crossrefs

Cf. A006584 (2nd Witt transform of A000027), A049347, A099254, A147618.

Programs

  • Magma
    R:=PowerSeriesRing(Integers(), 50); [0,0,0,0] cat Coefficients(R!( x^4*(2-x+2*x^2)/((1-x)^6*(1+x+x^2)^2) )); // G. C. Greubel, Oct 24 2022
    
  • Mathematica
    CoefficientList[Series[x^4(2 -x+ 2*x^2)/((1-x)^6*(1 +x +x^2)^2), {x, 0, 50}], x] (* Vincenzo Librandi, Dec 13 2012 *)
  • SageMath
    def A147611_list(prec):
        P. = PowerSeriesRing(ZZ, prec)
        return P( x^4*(2-x+2*x^2)/((1-x)^6*(1+x+x^2)^2) ).list()
    A147611_list(50) # G. C. Greubel, Oct 24 2022

Formula

G.f.: x^4*(2-x+2*x^2)/((1-x)^6*(1+x+x^2)^2).
a(n) = (1/27)*((3*A049347(n) + A049347(n-1)) - 3*(-1)^n*(A099254(n) - A099254(n- 1)) + n*(3*n^4 - 15*n^2 - 28)/40). - G. C. Greubel, Oct 24 2022

A157901 Triangle read by rows: A000012 * A157898.

Original entry on oeis.org

1, 1, 1, 2, 2, 2, 2, 4, 4, 4, 3, 6, 10, 8, 8, 3, 9, 16, 24, 16, 16, 4, 12, 28, 40, 56, 32, 32, 4, 16, 40, 80, 96, 128, 64, 64, 5, 20, 60, 120, 216, 224, 288, 128, 128, 5, 25, 80, 200, 336, 560, 512, 640, 256, 256, 6, 30, 110, 280, 616, 896, 1408, 1152, 1408, 512, 512
Offset: 0

Views

Author

Keywords

Comments

Multiplication of the lower triangular matrix A157898 from the left by A000012 means: these are partial column sums of A157898.

Examples

			First few rows of the triangle, n>=0:
  1;
  1,  1;
  2,  2,  2;
  2,  4,  4,   4;
  3,  6, 10,   8,   8;
  3,  9, 16,  24,  16,  16;
  4, 12, 28,  40,  56,  32,  32;
  4, 16, 40,  80,  96, 128,  64,  64;
  5, 20, 60, 120, 216, 224, 288, 128, 128;
  5, 25, 80, 200, 336, 560, 512, 640, 256, 256;
		

Crossrefs

Columns: A004526 (k=0), A002620 (k=1), A006584 (k=2), 4*A096338 (k=3), 8*A177747 (k=4), 16*A299337 (k=5), 32*A178440 (k=6).
Sums include: A105635(n+1) (row), A166486(n+1) (alternating sign diagonal), A232801(n+1) (diagonal).

Programs

  • Magma
    A011782:= func< n | n eq 0 select 1 else 2^(n-1) >;
    function t(n, k) // t = A059576
      if k eq 0 or k eq n then return A011782(n);
      else return 2*t(n-1, k-1) + 2*t(n-1, k) - (2 - 0^(n-2))*t(n-2, k-1);
      end if; return t;
    end function;
    A157898:= func< n, k | (&+[(-1)^(n-j)*Binomial(n, j)*t(j, k): j in [k..n]]) >;
    A157071:= func< n,k | (&+[A157898(j+k,k): j in [0..n-k]]) >;
    [A157071(n, k): k in [0..n], n in [0..12]]; // G. C. Greubel, Aug 27 2025
    
  • Mathematica
    t[n_, k_]:= t[n,k]= If[k==0 || k==n, 2^(n-1) +Boole[n==0]/2, 2*t[n-1,k-1] +2*t[n-1,k] - (2 -Boole[n==2])*t[n-2,k-1]]; (* t = A059576 *)
    A157898[n_, k_]:= A157898[n,k]= Sum[(-1)^(n-j)*Binomial[n,j]*t[j,k], {j,k,n}];
    A157901[n_, k_]:= A157901[n,k]= Sum[A157898[j+k,k], {j,0,n-k}];
    Table[A157901[n,k], {n,0,12}, {k,0,n}]//Flatten (* G. C. Greubel, Aug 27 2025 *)
  • SageMath
    @CachedFunction
    def t(n, k): # t = A059576
        if (k==0 or k==n): return bool(n==0)/2 + 2^(n-1) # A011782
        else: return 2*t(n-1, k-1) + 2*t(n-1, k) - (2 - 0^(n-2))*t(n-2, k-1)
    def A157898(n, k): return sum((-1)^(n+k-j)*binomial(n, j+k)*t(j+k, k) for j in range(n-k+1))
    def A157071(n,k): return sum(A157898(j+k,k) for j in range(n-k+1))
    print(flatten([[A157071(n,k) for k in range(n+1)] for n in range(10)])) # G. C. Greubel, Aug 27 2025

Formula

T(n,k) = Sum_{j=0..n} A157898(j,k).

Extensions

Edited by the Associate Editors of the OEIS, Apr 10 2009
More terms from G. C. Greubel, Aug 27 2025

A280186 Number of 3-element subsets of S = {1..n} whose sum is odd.

Original entry on oeis.org

0, 0, 0, 0, 2, 4, 10, 16, 28, 40, 60, 80, 110, 140, 182, 224, 280, 336, 408, 480, 570, 660, 770, 880, 1012, 1144, 1300, 1456, 1638, 1820, 2030, 2240, 2480, 2720, 2992, 3264, 3570, 3876, 4218, 4560, 4940, 5320, 5740, 6160, 6622, 7084, 7590, 8096, 8648, 9200
Offset: 0

Views

Author

Necip Fazil Patat, Dec 28 2016

Keywords

Comments

The same as A006584 (apart from the offset). - R. J. Mathar, Jan 15 2017
There are two cases: n is odd and n is even.
Let n be an odd integer and n > 3, the sum of 3 integers is odd when all of them are odd or one is odd and the others are even. Number of ways to choose 3 odd numbers: C((n+1)/2, 3). Number of ways to choose 2 even numbers and 1 odd: C((n-1)/2, 2)*C((n+1)/2, 1). Total number of ways: C((n+1)/2, 3) + C((n-1)/2, 2)*C((n+1)/2,1).
Let n be an even integer and n > 3. Number of ways to choose 3 odd numbers: C(n/2, 3). Number of ways to choose 2 even numbers and 1 odd: C(n/2, 2)*C(n/2, 1). Total number of ways: C(n/2, 3) + C(n/2, 2)*C(n/2, 1).
Take a chessboard of n X n unit squares in which the a1 square is black. a(n) is the number of composite squares having white unit squares on their vertices. For the number of composite squares having black unit squares on their vertices see A005993. - Ivan N. Ianakiev, Aug 19 2018

Examples

			For n = 5 then a(5) = 4. The subsets are: {1, 2, 4}, {1, 3, 5}, {2, 3, 4}, {2, 4, 5}.
		

Crossrefs

Essentially 2*A006918.
Same as A006584.

Programs

  • Mathematica
    Table[Binomial[(n + #)/2, 3] + Binomial[(n - #)/2, 2] Binomial[(n + #)/2, 1] &@ Boole@ OddQ@ n, {n, 0, 49}] (* or *)
    CoefficientList[Series[2 x^4/((1 - x)^4*(1 + x)^2), {x, 0, 49}], x] (* Michael De Vlieger, Jan 07 2017 *)
  • PARI
    concat(vector(4), Vec(2*x^4 / ((1-x)^4*(1+x)^2) + O(x^60))) \\ Colin Barker, Dec 28 2016

Formula

a(n) = C((n+1)/2, 3) + C((n-1)/2, 2)*C((n+1)/2,1) when n is odd.
a(n) = C(n/2, 3) + C(n/2, 2)*C(n/2, 1) when n is even.
From Colin Barker, Dec 28 2016: (Start)
a(n) = 2*a(n-1) + a(n-2) - 4*a(n-3) + a(n-4) + 2*a(n-5) - a(n-6) for n>5.
a(n) = n*(n - 1)*(n - 2)/12 for n even.
a(n) = (n - 1)*(n + 1)*(n - 3)/12 for n odd.
G.f.: 2*x^4 / ((1-x)^4*(1+x)^2). (End)
a(n) = ((-1)^n)*(-1+n)*(3 - 3*(-1)^n - 4*((-1)^n)*n + 2*((-1)^n)*n^2)/24. - Ivan N. Ianakiev, Aug 19 2018

Extensions

More terms from Colin Barker, Dec 28 2016
Showing 1-10 of 10 results.