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

A282011 Number T(n,k) of k-element subsets of [n] having an even sum; triangle T(n,k), n>=0, 0<=k<=n, read by rows.

Original entry on oeis.org

1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 2, 2, 2, 1, 1, 2, 4, 6, 3, 0, 1, 3, 6, 10, 9, 3, 0, 1, 3, 9, 19, 19, 9, 3, 1, 1, 4, 12, 28, 38, 28, 12, 4, 1, 1, 4, 16, 44, 66, 60, 40, 20, 5, 0, 1, 5, 20, 60, 110, 126, 100, 60, 25, 5, 0, 1, 5, 25, 85, 170, 226, 226, 170, 85, 25, 5, 1, 1, 6, 30, 110, 255, 396, 452, 396, 255, 110, 30, 6, 1
Offset: 0

Views

Author

Alois P. Heinz, Feb 04 2017

Keywords

Comments

Row n is symmetric if and only if n mod 4 in {0,3} (or if T(n,n) = 1).

Examples

			T(5,0) = 1: {}.
T(5,1) = 2: {2}, {4}.
T(5,2) = 4: {1,3}, {1,5}, {2,4}, {3,5}.
T(5,3) = 6: {1,2,3}, {1,2,5}, {1,3,4}, {1,4,5}, {2,3,5}, {3,4,5}.
T(5,4) = 3: {1,2,3,4}, {1,2,4,5}, {2,3,4,5}.
T(5,5) = 0.
T(7,7) = 1: {1,2,3,4,5,6,7}.
Triangle T(n,k) begins:
  1;
  1, 0;
  1, 1,  0;
  1, 1,  1,   1;
  1, 2,  2,   2,   1;
  1, 2,  4,   6,   3,   0;
  1, 3,  6,  10,   9,   3,   0;
  1, 3,  9,  19,  19,   9,   3,   1;
  1, 4, 12,  28,  38,  28,  12,   4,   1;
  1, 4, 16,  44,  66,  60,  40,  20,   5,   0;
  1, 5, 20,  60, 110, 126, 100,  60,  25,   5,  0;
  1, 5, 25,  85, 170, 226, 226, 170,  85,  25,  5, 1;
  1, 6, 30, 110, 255, 396, 452, 396, 255, 110, 30, 6, 1;
		

Crossrefs

Columns k=0..10 give (offsets may differ): A000012, A004526, A002620, A005993, A005994, A032092, A032093, A018211, A018212, A282077, A282078.
Row sums give A011782.
Main diagonal gives A133872(n+1).
Lower diagonals T(n+j,n) for j=1..10 give: A004525(n+1), A282079, A228705, A282080, A282081, A282082, A282083, A282084, A282085, A282086.
T(2n,n) gives A119358.

Programs

  • Maple
    b:= proc(n, s) option remember; expand(
          `if`(n=0, s, b(n-1, s)+x*b(n-1, irem(s+n, 2))))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=0..n))(b(n, 1)):
    seq(T(n), n=0..16);
  • Mathematica
    Flatten[Table[Sum[Binomial[Ceiling[n/2],2j]Binomial[Floor[n/2],k-2j],{j,0,Floor[(n+1)/4]}],{n,0,10},{k,0,n}]] (* Indranil Ghosh, Feb 26 2017 *)
  • PARI
    a(n,k)=sum(j=0,floor((n+1)/4),binomial(ceil(n/2),2*j)*binomial(floor(n/2),k-2*j));
    tabl(nn)={for(n=0,nn,for(k=0,n,print1(a(n,k),", "););print(););} \\ Indranil Ghosh, Feb 26 2017

Formula

T(n,k) = Sum_{j=0..floor((n+1)/4)} C(ceiling(n/2),2*j) * C(floor(n/2),k-2*j).
T(n,k) = A007318(n,k) - A159916(n,k).
Sum_{k=0..n} k * T(n,k) = A057711(n-1) for n>0.
Sum_{k=0..n} (k+1) * T(n,k) = A087447(n) + [n=2].

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

A006584 If n mod 2 = 0 then n*(n^2-4)/12 else n*(n^2-1)/12.

Original entry on oeis.org

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
Offset: 0

Views

Author

Keywords

Comments

Graded dimension of L''/[L',L''] for the free Lie algebra on 2 generators. Let L be a free Lie algebra with 2 generators graded by the total degree. Set L'=[L,L] and L''=[L',L']. Then a(n) is equal to the dimension of the homogeneous subspace of degree n+2 in the quotient L''/[L',L'']. - Sergei Duzhin, Mar 15 2004
Also the 2nd Witt transform of A000027. - R. J. Mathar, Nov 08 2008
Also the number of 3-element subsets of {1..n+1} whose elements sum up to an odd integer, i.e., the third column of A159916: e.g. a(3)=2 corresponds to the two subsets {1,2,4} and {2,3,4} of {1..4}. - M. F. Hasler, May 01 2009
The set of magic numbers for an idealized harmonic oscillator nucleus with a biaxially deformed prolate ellipsoid shape and an oscillator ratio of 2:1. - Jess Tauber, May 13 2013
Quasipolynomial of order 2. - Charles R Greathouse IV, May 14 2013

References

  • W. A. Whitworth, DCC Exercises in Choice and Chance, Stechert, NY, 1945, p. 33.

Crossrefs

Partial sums of A110660.

Programs

Formula

a(n+3) = A003451(n) + A027656(n). - Yosu Yurramendi, Aug 07 2008
G.f.: 2*x^3/((1-x)^4*(1+x)^2). a(n) = 2*A006918(n-2). - R. J. Mathar, Nov 08 2008
a(n) = 2*a(n-1)+a(n-2)-4*a(n-3)+a(n-4)+2*a(n-5)-a(n-6). - Jaume Oliver Lafont, Dec 05 2008
a(n) = n*(2*n^2-5-3*(-1)^n)/24. - Luce ETIENNE, Apr 03 2015
a(n) = Sum_{i=1..n} floor(i*(n-i)/2). - Wesley Ivan Hurt, May 07 2016
E.g.f.: x*(x*(x + 3)*exp(x) - 3*sinh(x))/12. - Ilya Gutkovskiy, May 08 2016
Sum_{n>=3} 1/a(n) = 75/8 - 12*log(2). - Amiram Eldar, Sep 17 2022

A005995 Alkane (or paraffin) numbers l(8,n).

Original entry on oeis.org

1, 3, 12, 28, 66, 126, 236, 396, 651, 1001, 1512, 2184, 3108, 4284, 5832, 7752, 10197, 13167, 16852, 21252, 26598, 32890, 40404, 49140, 59423, 71253, 85008, 100688, 118728, 139128, 162384, 188496, 218025, 250971, 287964, 329004, 374794, 425334, 481404, 543004
Offset: 0

Views

Author

N. J. A. Sloane, Winston C. Yang (yang(AT)math.wisc.edu)

Keywords

Comments

From M. F. Hasler, May 01 2009: (Start)
Also, number of 5-element subsets of {1,...,n+5} whose elements sum to an odd integer, i.e. column 5 of A159916.
A linear recurrent sequence with constant coefficients and characteristic polynomial x^9 - 3*x^8 + 8*x^6 - 6*x^5 - 6*x^4 + 8*x^3 - 3*x + 1. (End)
Equals (1/2)*((1, 6, 21, 56, 126, 252, ...) + (1, 0, 3, 0, 6, 0, 10, ...)), see A000389 and A000217.
Equals row sums of triangle A160770.
F(1,5,n) is the number of bracelets with 1 blue, 5 identical red and n identical black beads. If F(1,5,1) = 3 and F(1,5,2) = 12 taken as a base, F(1,5,n) = n(n+1)(n+2)(n+3)/24 + F(1,3,n) + F(1,5,n-2). [F(1,3,n) is the number of bracelets with 1 blue, 3 identical red and n identical black beads. If F(1,3,1) = 2 and F(1,3,2) = 6 taken as a base F(1,3,n) = n(n+1)/2 + [|n/2|] + 1 + F(1,3,n-2)], where [|x|]: if a is an integer and a<=x

References

  • S. M. Losanitsch, Die Isomerie-Arten bei den Homologen der Paraffin-Reihe, Chem. Ber. 30 (1897), 1917-1926.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • Winston C. Yang (paper in preparation).

Crossrefs

Cf. A160770, A053132 (bisection), A271870 (bisection), A018210 (partial sums).

Programs

  • Maple
    a:= n-> (Matrix([[1, 0$6, -3, -9]]). Matrix(9, (i,j)-> if (i=j-1) then 1 elif j=1 then [3, 0, -8, 6, 6, -8, 0, 3, -1][i] else 0 fi)^n)[1, 1]: seq(a(n), n=0..40); # Alois P. Heinz, Jul 31 2008
  • Mathematica
    a[n_?OddQ] := 1/240*(n+1)*(n+2)*(n+3)*(n+4)*(n+5); a[n_?EvenQ] := 1/240*(n+2)*(n+4)*(n+6)*(n^2+3*n+5); Table[a[n], {n, 0, 32}] (* Jean-François Alcover, Mar 17 2014, after M. F. Hasler *)
    LinearRecurrence[{3, 0, -8, 6, 6, -8, 0, 3, -1},{1, 3, 12, 28, 66, 126, 236, 396, 651},40] (* Ray Chandler, Sep 23 2015 *)
  • PARI
    a(k)= if(k%2,(k+1)*(k+3)*(k+5),(k+6)*(k^2+3*k+5))*(k+2)*(k+4)/240 \\ M. F. Hasler, May 01 2009

Formula

G.f.: (1+3*x^2)/((1-x)^3*(1-x^2)^3).
a(2n-1) = n(n+1)(n+2)(2n+1)(2n+3)/30, a(2n) = (n+1)(n+2)(n+3)(4n^2+6n+5)/ 30. [M. F. Hasler, May 01 2009]
a(n) = (1/240)*(n+1)*(n+2)*(n+3)*(n+4)*(n+5) + (1/16)*(n+2)*(n+4)*(1/2)*(1+(-1)^n). [Yosu Yurramendi, Jun 20 2013]
a(n) = A038163(n)+3*A038163(n-2). - R. J. Mathar, Mar 29 2018

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

Original entry on oeis.org

4, 16, 60, 160, 396, 848, 1716, 3200, 5720, 9696, 15912, 25152, 38760, 58080, 85272, 122496, 173052, 240240, 328900, 443872, 592020, 780208, 1017900, 1314560, 1682928, 2135744, 2689808, 3361920, 4173840, 5147328, 6310128, 7689984, 9321780, 11240400
Offset: 9

Keywords

Comments

If the offset is changed to 3, this is the 2nd Witt transform of A000292 [Moree]. - R. J. Mathar, Nov 08 2008
Also 7th column of A159916, i.e., number of 7-element subsets of {1,...,n-1} whose elements add up to an odd integer. - M. F. Hasler, May 02 2009
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 = 8, and (according to C. G. Bower) a(n) = a_{k=8}(n) is the number of reversible non-palindromic compositions of n with 8 positive parts. If n = b_1 + b_2 + b_3 + b_4 + b_5 + b_6 + b_7 + b_8 is such a composition of n (with b_i >= 1), then it is equivalent to the composition n = b_8 + 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[8] 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 k-1 = 7 black balls and n-k = n-8 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_8 = b_8 + b_7 + b_6 + b_5 + b_4 + b_3 + b_2 + b_1, gives two strings of length n-1 with 7 black balls and n-8 white balls that are mirror images of each other.
Hence, for n >= 2, a(n) = a_{k=8}(n) is also the number of reversible non-palindromic strings of length n-1 that have k-1 = 7 black balls and n-k = n-8 white balls. (Clearly, a(n) = a_{k=8}(n) > 0 only for n >= 9.)
(End)

Crossrefs

Cf. A005995, A018210, A032091, A032092, A032093, A159916. - M. F. Hasler, May 02 2009 and Petros Hadjicostas, May 19 2018

Programs

  • Mathematica
    f[n_] := Binomial[n - 1, n - 8]/2 - If[ OddQ@ n, 0, Binomial[(n/2) - 1, (n - 8)/2]/2]; Array[f, 36, 9] (* or *)
    CoefficientList[ Series[ 4x^9 (x^2 + 1)/((x - 1)^8 (x + 1)^4), {x, 0, 40}], x] (* or *)LinearRecurrence[{4, -2, -12, 17, 8, -28, 8, 17, -12, -2, 4, -1}, {4, 16, 60, 160, 396, 848, 1716, 3200, 5720, 9696, 15912, 25152}, 34] (* Robert G. Wilson v, May 20 2018 *)
  • PARI
    A032094(n)=(binomial(n--,7)-if(n%2,binomial(n\2,3)))\2 \\ M. F. Hasler, May 02 2009
    
  • PARI
    Vec(4*x^9*(1+x^2)/((1-x)^8*(1+x)^4) + O(x^100)) \\ Colin Barker, Mar 07 2015

Formula

"BHK[ 8 ]" (reversible, identity, unlabeled, 8 parts) transform of 1, 1, 1, 1, ...
From R. J. Mathar, Nov 08 2008: (Start)
G.f.: 4*x^9*(1+x^2)/((1-x)^8*(1+x)^4).
a(n) = 4*A031164(n-9). (End)
From Colin Barker, Mar 07 2015: (Start)
a(n) = (n^7-28*n^6+322*n^5-1960*n^4+6664*n^3-11872*n^2+8448*n)/10080 if n is even.
a(n) = (n^7-28*n^6+322*n^5-1960*n^4+6769*n^3-13132*n^2+13068*n-5040)/10080 if n is odd.
(End)
From Petros Hadjicostas, May 19 2018: (Start)
a(n) = (1/2)*(binomial(n-1, n-8) - binomial((n/2)-1, (n-8)/2)) if n is even.
a(n) = (1/2)*binomial(n-1, n-8) if n is odd.
G.f.: (1/2)*((x/(1-x))^8 - (x^2/(1-x^2))^4).
These formulae agree with the above formulae by R. J. Mathar and Colin Barker. Clearly, the first two formulae (those about a(n)) can be combined into the one given by M. F. Hasler below in the PROG section.
(End)

A018210 Alkane (or paraffin) numbers l(9,n).

Original entry on oeis.org

1, 4, 16, 44, 110, 236, 472, 868, 1519, 2520, 4032, 6216, 9324, 13608, 19440, 27192, 37389, 50556, 67408, 88660, 115258, 148148, 188552, 237692, 297115, 368368, 453376, 554064, 672792, 811920, 974304, 1162800, 1380825, 1631796
Offset: 0

Author

N. J. A. Sloane, Winston C. Yang (yang(AT)math.wisc.edu)

Keywords

Comments

From M. F. Hasler, May 02 2009: (Start)
Also, 6th column of A159916, i.e., number of 6-element subsets of {1,...,n+6} whose elements add up to an odd integer.
Third differences are A002412([n/2]). (End)
F(1,6,n) is the number of bracelets with 1 blue, 6 identical red and n identical black beads. If F(1,6,1) = 4 and F(1,6,2) = 16 taken as a base, F(1,6,n) = n(n+1)(n+2)(n+3)(n+4)/120 + F(1,4,n) + F(1,6,n-2). F(1,4,n) is the number of bracelets with 1 blue, 4 identical red and n identical black beads. If F(1,4,1) = 3 and F(1,4,2) = 9 taken as a base; F(1,4,n) = n(n+1)(n+2)/6 + F(1,2,n) + F(1,4,n-2). F(1,2,n) is the number of bracelets with 1 blue, 2 identical red and n identical black beads. If F(1,2,1) = 2 and F(1,2,2) = 4 taken as a base F(1,2,n) = n + 1 + F(1,2,n-2). - Ata Aydin Uslu and Hamdi G. Ozmenekse, Mar 16 2012

References

  • S. M. Losanitsch, Die Isomerie-Arten bei den Homologen der Paraffin-Reihe, Chem. Ber. 30 (1897), 1917-1926.
  • Winston C. Yang (paper in preparation).

Crossrefs

Cf. A005995 (first differences).

Programs

  • Maple
    a:=n-> (Matrix([[1,0$7,3,12]]). Matrix(10, (i,j)-> if (i=j-1) then 1 elif j=1 then [4, -3, -8, 14, 0, -14, 8, 3, -4, 1][i] else 0 fi)^n)[1,1]: seq (a(n), n=0..33); # Alois P. Heinz, Jul 31 2008
  • Mathematica
    CoefficientList[(1+3*x^2)/((1-x)^7*(1+x)^3) + O[x]^34, x] (* Jean-François Alcover, Jun 08 2015 *)
    LinearRecurrence[{4, -3, -8, 14, 0, -14, 8, 3, -4, 1},{1, 4, 16, 44, 110, 236, 472, 868, 1519, 2520},34] (* Ray Chandler, Sep 23 2015 *)
  • PARI
    A018210(n)=(n+2)*(n+4)*(n+6)^2*(n^2+3*n+5)/1440-if(n%2,(n^2+7*n+11)/32) \\ M. F. Hasler, May 02 2009

Formula

G.f.: (1+3*x^2)/(1-x)^4/(1-x^2)^3. - N. J. A. Sloane
l(c, r) = 1/2 C(c+r-3, r) + 1/2 d(c, r), where d(c, r) is C((c + r - 3)/2, r/2) if c is odd and r is even, 0 if c is even and r is odd, C((c + r - 4)/2, r/2) if c is even and r is even, C((c + r - 4)/2, (r - 1)/2) if c is odd and r is odd.
a(2n) = (n+1)(n+2)(n+3)^2(4n^2+6n+5)/90, a(2n-1) = n(n+1)(n+2)(n+3)(4n^2+6n+5)/90. - M. F. Hasler, May 02 2009
a(n) = (1/(2*6!))*(n+2)*(n+4)*(n+6)*((n+1)*(n+3)*(n+5) + 1*3*5) - (1/2)*(1/2^4)*(n^2+7*n+11)*(1/2)*(1-(-1)^n). - Yosu Yurramendi, Jun 23 2013
a(n) = A060099(n)+3*A060099(n-2). - R. J. Mathar, May 08 2020

A110145 a(n) = Sum_{k=0..n} C(n,k)^2*mod(k,2).

Original entry on oeis.org

0, 1, 4, 10, 32, 126, 472, 1716, 6400, 24310, 92504, 352716, 1351616, 5200300, 20060016, 77558760, 300533760, 1166803110, 4537591960, 17672631900, 68923172032, 269128937220, 1052049834576, 4116715363800, 16123800489472, 63205303218876, 247959271674352
Offset: 0

Author

Paul Barry, Jul 13 2005

Keywords

Comments

Interleaves A002458 and A037964.
Number of n-element subsets of [2n] having an odd sum. - Alois P. Heinz, Feb 06 2017

Crossrefs

Cf. A159916.

Programs

  • Mathematica
    Table[Sum[Binomial[n,k]^2 Mod[k,2],{k,0,n}],{n,0,30}] (* Harvey P. Dale, Feb 21 2013 *)
    Table[(Binomial[2 n, n] - Binomial[n, n/2] Cos[Pi n/2])/2, {n, 0, 30}] (* Vladimir Reshetnikov, Oct 04 2016 *)
  • PARI
    a(n) = sum(k=0, n, binomial(n, k)^2*(k % 2)); \\ Michel Marcus, Oct 05 2016

Formula

a(n) = Sum_{k=0..n} C(n, k)^2*(1-(-1)^k)/2.
a(n) = C(2n-1, n-1)(1-(-1)^n)/2+(C(2n, n)/2-(-1)^(n/2)*C(n, floor(n/2))/2)(1+(-1)^n)/2.
a(n) = (binomial(2*n, n) - binomial(n, n/2)*cos(Pi*n/2))/2 = n^2 * hypergeom([1/2-n/2, 1/2-n/2, 1-n/2, 1-n/2], [1, 3/2, 3/2], 1). - Vladimir Reshetnikov, Oct 04 2016
a(n) = A159916(2n,n). - Alois P. Heinz, Feb 06 2017

A159914 Half the number of (n-3)-element subsets of {1,...,n} whose elements sum up to an odd value.

Original entry on oeis.org

0, 0, 0, 0, 1, 3, 5, 8, 14, 22, 30, 40, 55, 73, 91, 112, 140, 172, 204, 240, 285, 335, 385, 440, 506, 578, 650, 728, 819, 917, 1015, 1120, 1240, 1368, 1496, 1632, 1785, 1947, 2109, 2280, 2470, 2670, 2870, 3080, 3311, 3553, 3795, 4048, 4324, 4612, 4900, 5200
Offset: 0

Author

M. F. Hasler, May 02 2009

Keywords

Comments

Half the preantepenultimate column, i.e., T(n, n-3), of the triangle defined in A159916.

Examples

			The first nontrivial term a(4)=1 is half the number of 4-3=1-element subsets of {1,2,3,4} whose elements have an odd sum: {1} and {3}.
a(5)=3 is half the number of 5-3=2-element subsets of {1,2,3,4,5} whose elements have an odd sum: {1,2}, {1,4}, {2,3}, {2,5}, {3,4} and {4,5}.
		

Crossrefs

Cf. A228705 (counts subsets with even sum).

Programs

  • PARI
    A159914(n)=polcoeff((1-x+x^2)/(1-x)^4/(1+x^2)^2+O(x^(n-3)),n-4)

Formula

G.f.: x^4*(1-x+x^2)/((1-x)^4*(1+x^2)^2).
a(n) = A159916(n(n-1)/2+n-3)/2 = T(n,n-3)/2 as defined there.
a(2k) = k(k-1)(2k-1)/6.
Euler transform of 3 - x + x^2 + 2*x^3 - x^5. - Simon Plouffe, Jun 22 2018

A159915 a(n) = floor((n+1)/4)*floor(n/2).

Original entry on oeis.org

0, 0, 0, 1, 2, 2, 3, 6, 8, 8, 10, 15, 18, 18, 21, 28, 32, 32, 36, 45, 50, 50, 55, 66, 72, 72, 78, 91, 98, 98, 105, 120, 128, 128, 136, 153, 162, 162, 171, 190, 200, 200, 210, 231, 242, 242, 253, 276, 288, 288, 300, 325, 338, 338, 351, 378, 392, 392, 406, 435, 450, 450
Offset: 0

Author

M. F. Hasler, May 01 2009, May 03 2009

Keywords

Comments

Half the number of (n-2)-element subsets of {1,...,n} with odd sum of the elements.
This is half the antepenultimate column of A159916, cf. formula.
The number of subsets of {1,...,n} with n-2 elements, adding up to an odd integer, is always even (cf. examples), so we divide it by 2.
We prefer to include a(0)=a(1)=a(2)=0, even if it might seem more natural to start only at n=2 or n=3.
From the rational g.f. it can be seen that the sequence is a linear recurrence with constant coefficients (3,-5,7,-7,5,-3,1) of order 7.
A quasipolynomial of order 4 and degree 2. - Charles R Greathouse IV, Sep 18 2024

Examples

			a(0)=a(1)=0 since there are no subsets with -2 or -1 elements.
a(2)=0 since the sum of the elements of a 0-element subset is zero.
a(3)=1 since for n=3 we have two singleton subsets of {1,2,3}, {1} and {3}, with odd sum of elements.
a(4)=2 since for n=4 we have four 2-element subsets of {1,2,3,4} with odd sum: {1,2}, {2,3}, {1,4}, {3,4}.
		

Crossrefs

Programs

  • Magma
    A159915:= func< n | Floor((n+1)/4)*Floor(n/2) >;
    [A159915(n): n in [0..70]]; // G. C. Greubel, Sep 18 2024
    
  • Mathematica
    Table[Floor[(n+1)/4]*Floor[n/2], {n,0,70}] (* G. C. Greubel, Sep 18 2024 *)
  • PARI
    A159915(n)= polcoeff( (1-x+x^2)/((1-x)^3*(1+x^2)^2) + O(x^(n-2)), n-3);
    a(n,t=[0,0,0,1,2,2,3],c=[1,-3,5,-7,7,-5,3]~)=while(n-->5,t=concat(vecextract(t,"^1"),t*c));t[n+2] /* Note: a(n+1,[0,0,0,0,1,2,2]) gives the same result as a(n) */
    
  • PARI
    A159915(n)=(n+1)\4*(n\2) \\ M. F. Hasler, May 03 2009
    
  • SageMath
    def A159915(n): return ((n+1)//4)*(n//2)
    [A159915(n) for n in range(71)] # G. C. Greubel, Sep 18 2024

Formula

G.f.: x^3*(1 - x + x^2)/(1 - 3*x + 5*x^2 - 7*x^3 + 7*x^4 - 5*x^5 + 3*x^6 - x^7) = x^3*(1-x+x^2)/((1-x)^3*(1+x^2)^2).
a(n) = 3*a(n-1) - 5*a(n-2) + 7*a(n-3) - 7*a(n-4) + 5*a(n-5) - 3*a(n-6) + a(n-7) for n > 7.
For n > 2, a(n) = A159916(n*(n-1)/2 + n - 2)/2 = T(n,n-2)/2 as defined there.
From M. F. Hasler, May 03 2009: (Start)
a(n) = floor((n+1)/4)*floor(n/2).
a(2n+1) = A093005(n).
a(2n) = A093353(n-1) = floor(n/2)*n. (End)
a(n) ~ n^2/8. - Charles R Greathouse IV, Sep 18 2024
Showing 1-9 of 9 results.