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 11-20 of 20 results.

A056309 Number of reversible strings with n beads using exactly two different colors.

Original entry on oeis.org

0, 1, 4, 8, 18, 34, 70, 134, 270, 526, 1054, 2078, 4158, 8254, 16510, 32894, 65790, 131326, 262654, 524798, 1049598, 2098174, 4196350, 8390654, 16781310, 33558526, 67117054, 134225918, 268451838, 536887294, 1073774590, 2147516414, 4295032830, 8590000126
Offset: 1

Views

Author

Keywords

Comments

A string and its reverse are considered to be equivalent.

Examples

			For n=3, the four rows are ABA, BAB, AAB, and ABB, the last two being respectively equivalent to BAA and BBA, with which they form chiral pairs. - _Robert A. Russell_, Sep 25 2018
		

References

  • M. R. Nester (1999). Mathematical investigations of some plant interaction designs. PhD Thesis. University of Queensland, Brisbane, Australia. [See A056391 for pdf file of Chap. 2]

Crossrefs

Equals (A000918 + A056453) / 2.
a(n) = A000918(n) - A122746(n-2) = A122746(n-2) + A056453(n).

Programs

  • Magma
    [2^(n-1)+2^((n-1) div 2)-2: n in [1..40]]; // Vincenzo Librandi, Sep 29 2018
  • Maple
    seq(2^(n-1) + 2^floor((n-1)/2) - 2, n=1..34); # Peter Luschny, Nov 25 2017
  • Mathematica
    Rest[CoefficientList[Series[x^2(1+x-4x^2)/(1-3x+6x^3-4x^4),{x,0,30}],x]] (* or *) LinearRecurrence[{3,0,-6,4},{0,1,4,8},30] (* Harvey P. Dale, Feb 18 2012 *)
  • PARI
    Vec(x^2*(1+x-4*x^2)/(1-3*x+6*x^3-4*x^4) + O(x^40)) \\ Colin Barker, Nov 24 2017
    
  • PARI
    a(n) = 2^(n-1)+2^((n-1)\2)-2; \\ Altug Alkan, Sep 25 2018
    

Formula

a(n) = A005418(n+1) - 2.
G.f.: x^2*(1 + x - 4*x^2)/(1 - 3*x + 6*x^3 - 4*x^4). - Colin Barker, Feb 03 2012
a(1)=0, a(2)=1, a(3)=4, a(4)=8, a(n) = 3*a(n-1) - 6*a(n-3) + 4*a(n-4). - Harvey P. Dale, Feb 18 2012
From Colin Barker, Nov 24 2017: (Start)
a(n) = 2^(n/2-1) + 2^(n-1) - 2 for n even.
a(n) = 2^((n-1)/2) + 2^(n-1) - 2 for n odd. (End)
a(n) = A000079(n-1) + A056453(n-2). - Peter Luschny, Nov 25 2017
a(n) = k! (S2(n,k) + S2(ceiling(n/2),k)) / 2, where k=2 is the number of colors and S2 is the Stirling subset number. - Robert A. Russell, Sep 25 2018

A233411 The number of length n binary words with some prefix which contains two more 1's than 0's or two more 0's than 1's.

Original entry on oeis.org

0, 0, 2, 4, 12, 24, 56, 112, 240, 480, 992, 1984, 4032, 8064, 16256, 32512, 65280, 130560, 261632, 523264, 1047552, 2095104, 4192256, 8384512, 16773120, 33546240, 67100672, 134201344, 268419072, 536838144, 1073709056, 2147418112, 4294901760, 8589803520
Offset: 0

Views

Author

Geoffrey Critzer, Dec 09 2013

Keywords

Comments

Also, the number of non-symmetric compositions of n+1, e.g. 4 can be written 1+3, 3+1, 1+1+2, or 2+1+1 (but not 4, 2+2, 1+2+1 or 1+1+1+1). - Henry Bottomley, Jun 27 2005
If we examine the set of all binary words with infinite length we find that the average length of the shortest prefix which satisfies the above conditions is 4.
a(n) is also the number of minimum distinguishing (2-)labelings of the path graph P_n for n > 1. - Eric W. Weisstein, Oct 16 2014
Also, the decimal representation of the diagonal from the origin to the corner of the n-th stage of growth of the two-dimensional cellular automaton defined by "Rule 62", based on the 5-celled von Neumann neighborhood, initialized with a single black (ON) cell at stage zero. - Robert Price, Apr 22 2017

Examples

			a(3) = 4 because we have: 000, 001, 110, 111.
		

References

  • S. Wolfram, A New Kind of Science, Wolfram Media, 2002; p. 170.

Crossrefs

Cf. A233533.

Programs

  • Mathematica
    nn=30;CoefficientList[Series[2x^2/(1-2x^2)/(1-2x),{x,0,nn}],x]
    LinearRecurrence[{2,2,-4},{0,0,2},40] (* Harvey P. Dale, Sep 06 2015 *)
  • PARI
    a(n)=2^n-2^ceil(n/2) \\ Charles R Greathouse IV, Dec 09 2013

Formula

G.f.: 2*x^2/( (1 - 2*x^2)*(1-2x) ).
a(n) = 2^n - 2^ceiling(n/2).
a(n) = 2*A032085(n) = 2*A122746(n-2) for n>=2. - Alois P. Heinz, Dec 09 2013

Extensions

Misplaced comment added by Andrew Howroyd, Sep 30 2017

A320751 Array read by antidiagonals: T(n,k) is the number of chiral pairs of color patterns (set partitions) in a row of length n using k or fewer colors (subsets).

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 2, 0, 0, 0, 1, 4, 6, 0, 0, 0, 1, 4, 16, 12, 0, 0, 0, 1, 4, 20, 52, 28, 0, 0, 0, 1, 4, 20, 80, 169, 56, 0, 0, 0, 1, 4, 20, 86, 336, 520, 120, 0, 0, 0, 1, 4, 20, 86, 400, 1344, 1600, 240, 0, 0, 0, 1, 4, 20, 86, 409, 1852, 5440, 4840, 496, 0
Offset: 1

Views

Author

Robert A. Russell, Oct 27 2018

Keywords

Comments

Two color patterns are equivalent if the colors are permuted.
A chiral row is not equivalent to its reverse.
T(n,k)=Xi_k(P_n) which is the number of non-equivalent distinguishing partitions of the path on n vertices, with at most k parts. Two partitions P1 and P2 of a graph G are said to be equivalent if there is a nontrivial automorphism of G which maps P1 onto P2. A distinguishing partition is a partition of the vertex set of G such that no nontrivial automorphism of G can preserve it. - Bahman Ahmadi, Sep 02 2019

Examples

			Array begins with T(1,1):
0   0     0      0       0       0       0       0       0       0 ...
0   0     0      0       0       0       0       0       0       0 ...
0   1     1      1       1       1       1       1       1       1 ...
0   2     4      4       4       4       4       4       4       4 ...
0   6    16     20      20      20      20      20      20      20 ...
0  12    52     80      86      86      86      86      86      86 ...
0  28   169    336     400     409     409     409     409     409 ...
0  56   520   1344    1852    1976    1988    1988    1988    1988 ...
0 120  1600   5440    8868   10168   10388   10404   10404   10404 ...
0 240  4840  21760   42892   54208   57108   57468   57488   57488 ...
0 496 14641  87296  210346  299859  331705  337595  338155  338180 ...
0 992 44044 349184 1038034 1699012 2012202 2091458 2102518 2103348 ...
For T(4,2)=2, the chiral pairs are AAAB-ABBB and AABA-ABAA.
For T(4,3)=4, the above, AABC-ABCC, and ABAC-ABCB.
		

Crossrefs

Columns 1-6 are A000004, A122746(n-3), A107767(n-1), A320934, A320935, A320936.
As k increases, columns converge to A320937.
Cf. transpose of A278984 (oriented), A320750 (unoriented), A305749 (achiral).
Partial column sums of A320525.

Programs

  • Mathematica
    Ach[n_, k_] := Ach[n, k] = If[n<2, Boole[n==k && n>=0], k Ach[n-2,k] + Ach[n-2,k-1] + Ach[n-2,k-2]] (* A304972 *)
    Table[Sum[StirlingS2[n,j] - Ach[n,j], {j,k-n+1}]/2, {k,15}, {n,k}] // Flatten

Formula

T(n,k) = Sum_{j=1..k} (S2(n,j) - Ach(n,j)) / 2, where S2 is the Stirling subset number A008277 and Ach(n,k) = [n>=0 & n<2 & n==k] + [n>1]*(k*Ach(n-2,k) + Ach(n-2,k-1) + Ach(n-2,k-2)).
T(n,k) = (A278984(k,n) - A305749(n,k)) / 2 = A278984(k,n) - A320750(n,k) = A320750(n,k) - A305749(n,k).
T(n,k) = Sum_{j=1..k} A320525(n,j).

A107767 a(n) = (1 + 3^n - 2*3^(n/2))/4 if n is even, (1 + 3^n - 4*3^((n-1)/2))/4 if n odd.

Original entry on oeis.org

0, 1, 4, 16, 52, 169, 520, 1600, 4840, 14641, 44044, 132496, 397852, 1194649, 3585040, 10758400, 32278480, 96845281, 290545684, 871666576, 2615029252, 7845176329, 23535617560, 70607118400, 211821620920, 635465659921
Offset: 1

Views

Author

Emeric Deutsch, Jun 12 2005

Keywords

Comments

a(n-1) is the number of chiral pairs of color patterns (set partitions) for a row of length n using up to 3 colors (subsets). For n=4, a(n-1)=4, the chiral pairs are AAAB-ABBB, AABA-ABAA, AABC-ABCC, and ABAC-ABCB. - Robert A. Russell, Oct 28 2018

References

  • Balaban, A. T., Brunvoll, J., Cyvin, B. N., & Cyvin, S. J. (1988). Enumeration of branched catacondensed benzenoid hydrocarbons and their numbers of KekulĂ© structures. Tetrahedron, 44(1), 221-228. See Eq. 5.

Crossrefs

Cf. A167993 (first differences).
Column 3 of A320751, offset by 1.
Cf. A124302 (oriented), A001998 (unoriented), A182522 (achiral), varying offsets.

Programs

  • GAP
    a:=[];; for n in [1..30] do if n mod 2 <> 0 then Add(a,(1+3^n-4*3^((n-1)/2))/4); else Add(a,(1+3^n-2*3^(n/2))/4); fi; od; a; # Muniru A Asiru, Oct 30 2018
  • Magma
    I:=[0, 1, 4, 16]; [n le 4 select I[n] else 4*Self(n-1)-12*Self(n-3)+9*Self(n-4): n in [1..30]]; // Vincenzo Librandi, Jun 26 2012
    
  • Maple
    a:=proc(n) if n mod 2 = 0 then (1+3^n-2*3^(n/2))/4 else (1+3^n-4*3^((n-1)/2))/4 fi end: seq(a(n),n=1..32);
  • Mathematica
    CoefficientList[Series[-x/((x-1)*(3*x-1)*(3*x^2-1)),{x,0,40}],x] (* or *) LinearRecurrence[{4,0,-12,9},{0,1,4,16},50] (* Vincenzo Librandi, Jun 26 2012 *)
    Ach[n_, k_] := Ach[n, k] = If[n<2, Boole[n==k && n>=0], k Ach[n-2,k] + Ach[n-2,k-1] + Ach[n-2,k-2]] (* A304972 *)
    k=3; Table[Sum[StirlingS2[n,j]-Ach[n,j],{j,k}]/2,{n,2,40}] (* Robert A. Russell, Oct 28 2018 *)
    CoefficientList[Series[(1/12 E^(-Sqrt[3] x) (-3 + 2 Sqrt[3] - (3 + 2 Sqrt[3]) E^(2 Sqrt[3] x) + 3 E^((3 + Sqrt[3]) x) + 3 E^(x + Sqrt[3] x)))/x, {x, 0, 20}], x]*Table[(k+1)!, {k, 0, 20}] (* Stefano Spezia, Oct 29 2018 *)
  • PARI
    x='x+O('x^50); concat(0, Vec(x^2/((1-x)*(3*x-1)*(3*x^2-1)))) \\ Altug Alkan, Sep 23 2018
    

Formula

G.f.: -x^2 / ( (x-1)*(3*x-1)*(3*x^2-1) ). - R. J. Mathar, Dec 16 2010
a(n) = 4*a(n-1) - 12*a(n-3) + 9*a(n-4). - Vincenzo Librandi, Jun 26 2012
From Robert A. Russell, Oct 28 2018: (Start)
a(n-1) = Sum_{j=0..k} (S2(n,j) - Ach(n,j)) / 2, where k=3 is the maximum number of colors, S2 is the Stirling subset number A008277, and Ach(n,k) = [n>=0 & n<2 & n==k] + [n>1]*(k*Ach(n-2,k) + Ach(n-2,k-1) + Ach(n-2,k-2)).
a(n-1) = (A124302(n) - A182522(n))/2.
a(n-1) = A124302(n) - A001998(n-1).
a(n-1) = A001998(n-1) - A182522(n).
a(n-1) = A122746(n-2) + A320526(n). (End)
E.g.f.: (1/12)*exp(-sqrt(3)*x)*(-3 + 2*sqrt(3) - (3 + 2*sqrt(3))*exp(2*sqrt(3)*x) + 3*exp((3 + sqrt(3))*x) + 3*exp(x + sqrt(3)*x)). - Stefano Spezia, Oct 29 2018
From Bruno Berselli, Oct 31 2018: (Start)
a(n) = (1 + 3^n - 3^((n-1)/2)*(4 + (-2 + sqrt(3))*(1 + (-1)^n)))/4. Therefore:
a(2*k) = (3^k - 1)^2/4;
a(2*k+1) = (3^k - 1)*(3^(k+1) - 1)/4. (End)

Extensions

Entry revised by N. J. A. Sloane, Jul 29 2011

A320936 Number of chiral pairs of color patterns (set partitions) for a row of length n using 6 or fewer colors (subsets).

Original entry on oeis.org

0, 0, 1, 4, 20, 86, 409, 1976, 10168, 54208, 299859, 1699012, 9808848, 57335124, 338073107, 2004955824, 11936998016, 71253827696, 426061036747, 2550545918300, 15280090686256, 91588065861292, 549159350303235, 3293482358956552, 19755007003402944
Offset: 1

Views

Author

Robert A. Russell, Oct 27 2018

Keywords

Comments

Two color patterns are equivalent if the colors are permuted.
A chiral row is not equivalent to its reverse.
There are nonrecursive formulas, generating functions, and computer programs for A056273 and A305752, which can be used in conjunction with the first formula.

Examples

			For a(4)=4, the chiral pairs are AAAB-ABBB, AABA-ABAA, AABC-ABCC, and ABAC-ABCB.
		

Crossrefs

Column 6 of A320751.
Cf. A056273 (oriented), A056325 (unoriented), A305752 (achiral).

Programs

  • Mathematica
    Ach[n_, k_] := Ach[n, k] = If[n<2, Boole[n==k && n>=0], k Ach[n-2,k] + Ach[n-2,k-1] + Ach[n-2,k-2]] (* A304972 *)
    k=6; Table[Sum[StirlingS2[n,j]-Ach[n,j],{j,k}]/2,{n,40}]
    LinearRecurrence[{16, -84, 84, 685, -2140, 180, 7200, -8244, -4176, 11664, -5184}, {0, 0, 1, 4, 20, 86, 409, 1976, 10168, 54208, 299859}, 40]
  • PARI
    concat([0,0], Vec(x^3*(1 - 12*x + 40*x^2 + 18*x^3 - 308*x^4 + 376*x^5 + 364*x^6 - 882*x^7 + 378*x^8) / ((1 - x)*(1 - 2*x)*(1 - 3*x)*(1 - 4*x)*(1 - 6*x)*(1 - 2*x^2)*(1 - 3*x^2)*(1 - 6*x^2)) + O(x^40))) \\ Colin Barker, Nov 22 2018

Formula

a(n) = (A056273(n) - A305752(n))/2.
a(n) = A056273(n) - A056325(n).
a(n) = A056325(n) - A305752(n).
a(n) = A122746(n-2) + A320526(n) + A320527(n) + A320528(n) + A320529(n).
a(n) = Sum_{j=1..k} (S2(n,j) - Ach(n,j)) / 2, where k=6 is the maximum number of colors, S2 is the Stirling subset number A008277, and Ach(n,k) = [n>=0 & n<2 & n==k] + [n>1]*(k*Ach(n-2,k) + Ach(n-2,k-1) + Ach(n-2,k-2)).
From Colin Barker, Nov 22 2018: (Start)
G.f.: x^3*(1 - 12*x + 40*x^2 + 18*x^3 - 308*x^4 + 376*x^5 + 364*x^6 - 882*x^7 + 378*x^8) / ((1 - x)*(1 - 2*x)*(1 - 3*x)*(1 - 4*x)*(1 - 6*x)*(1 - 2*x^2)*(1 - 3*x^2)*(1 - 6*x^2)).
a(n) = 16*a(n-1) - 84*a(n-2) + 84*a(n-3) + 685*a(n-4) - 2140*a(n-5) + 180*a(n-6) + 7200*a(n-7) - 8244*a(n-8) - 4176*a(n-9) + 11664*a(n-10) - 5184*a(n-11) for n>11.
(End)

A320935 Number of chiral pairs of color patterns (set partitions) for a row of length n using 5 or fewer colors (subsets).

Original entry on oeis.org

0, 0, 1, 4, 20, 86, 400, 1852, 8868, 42892, 210346, 1038034, 5150110, 25623486, 127740880, 637539592, 3184224728, 15910524632, 79520923966, 397508610454, 1987255480650, 9935410066186, 49674450471460, 248364429410332, 1241798688445588, 6208922948527572, 31044403310614786
Offset: 1

Views

Author

Robert A. Russell, Oct 27 2018

Keywords

Comments

Two color patterns are equivalent if the colors are permuted.
A chiral row is not equivalent to its reverse.
There are nonrecursive formulas, generating functions, and computer programs for A056272 and A305751, which can be used in conjunction with the first formula.

Examples

			For a(4)=4, the chiral pairs are AAAB-ABBB, AABA-ABAA, AABC-ABCC, and ABAC-ABCB.
		

Crossrefs

Column 5 of A320751.
Cf. A056272 (oriented), A056324 (unoriented), A305751 (achiral).

Programs

  • Mathematica
    LinearRecurrence[{11, -34, -16, 247, -317, -200, 610, -300}, {0, 0, 1, 4, 20, 86, 400, 1852}, 40] (* or *)
    Ach[n_, k_] := Ach[n, k] = If[n<2, Boole[n==k && n>=0], k Ach[n-2,k] + Ach[n-2,k-1] + Ach[n-2,k-2]] (* A304972 *)
    k=5; Table[Sum[StirlingS2[n,j]-Ach[n,j],{j,k}]/2,{n,40}]

Formula

a(n) = (A056272(n) - A305751(n))/2.
a(n) = A056272(n) - A056324(n).
a(n) = A056324(n) - A305751(n).
a(n) = A122746(n-2) + A320526(n) + A320527(n) + A320528(n).
a(n) = Sum_{j=1..k} (S2(n,j) - Ach(n,j)) / 2, where k=5 is the maximum number of colors, S2 is the Stirling subset number A008277, and Ach(n,k) = [n>=0 & n<2 & n==k] + [n>1]*(k*Ach(n-2,k) + Ach(n-2,k-1) + Ach(n-2,k-2)).
G.f.: x^3*(1 - 7*x + 10*x^2 + 18*x^3 - 49*x^4 + 25*x^5)/((1 - x)*(1 - 2*x)*(1 - 3*x)*(1 - 5*x)*(1 - 5*x^2)*(1 - 2*x^2)). - Bruno Berselli, Oct 31 2018

A107659 a(n) = Sum_{k=0..n} 2^max(k, n-k).

Original entry on oeis.org

1, 4, 10, 24, 52, 112, 232, 480, 976, 1984, 4000, 8064, 16192, 32512, 65152, 130560, 261376, 523264, 1047040, 2095104, 4191232, 8384512, 16771072, 33546240, 67096576, 134201344, 268410880, 536838144, 1073692672, 2147418112
Offset: 0

Views

Author

Keywords

Comments

Define an infinite array by m(n,k) = 2^n-n+k for n>=k>=0 (in the lower left triangle) and by m(n,k) = 2^k+k-n for k>=n>=0 (in the upper right triangle). The antidiagonal sums of this array are a(n) = sum_{k=0..n} m(n-k,k). - J. M. Bergot, Aug 16 2013

Examples

			G.f. = 1 + 4*x + 10*x^2 + 24*x^3 + 52*x^4 + 112*x^5 + 232*x^6 + 480*x^7 + ... - _Michael Somos_, Jun 24 2018
		

Crossrefs

Programs

  • Mathematica
    Table[Sum[2^Max[k,n-k],{k,0,n}],{n,0,30}] (* or *) LinearRecurrence[ {2,2,-4},{1,4,10},30] (* Harvey P. Dale, Nov 10 2013 *)
    a[ n_] := 2^(n + 2) - (2 + Mod[n + 1, 2]) 2^Quotient[n + 1, 2]; (* Michael Somos, Jun 24 2018 *)
  • PARI
    {a(n) = 2^(n+2) - (2 + (n+1)%2) * 2^((n+1)\2)}; /* Michael Somos, Jun 24 2018 */

Formula

a(2n) = 2^n(2^(n+2)-3), a(2n+1) = 2^n(2^(n+3)-4).
G.f.: (1+2*x)/[(1-2*x)*(1-2*x^2)].
a(n) = A122746(n) +2*A122746(n-1). - R. J. Mathar, Aug 16 2013
a(0)=1, a(1)=4, a(2)=10, a(n)=2*a(n-1)+2*a(n-2)-4*a(n-3). - Harvey P. Dale, Nov 10 2013
a(n) = 2^(n+2) - (2 + mod(n+1, 2)) * 2^floor((n+1)/2). - Michael Somos, Jun 24 2018
a(n) = - (2^(n+2)) * A052955(-n-3) for all n in Z. - Michael Somos, Jun 24 2018

A320934 Number of chiral pairs of color patterns (set partitions) for a row of length n using 4 or fewer colors (subsets).

Original entry on oeis.org

0, 0, 1, 4, 20, 80, 336, 1344, 5440, 21760, 87296, 349184, 1397760, 5591040, 22368256, 89473024, 357908480, 1431633920, 5726601216, 22906404864, 91625881600, 366503526400, 1466015154176, 5864060616704, 23456246661120, 93824986644480, 375299963355136, 1501199853420544, 6004799480791040
Offset: 1

Views

Author

Robert A. Russell, Oct 27 2018

Keywords

Comments

Two color patterns are equivalent if the colors are permuted.
A chiral row is not equivalent to its reverse.
There are nonrecursive formulas, generating functions, and computer programs for A124303 and A305750, which can be used in conjunction with the first formula.

Examples

			For a(4)=4, the chiral pairs are AAAB-ABBB, AABA-ABAA, AABC-ABCC, and ABAC-ABCB.
		

Crossrefs

Column 4 of A320751.
Cf. A124303 (oriented), A056323 (unoriented), A305750 (achiral).

Programs

  • Mathematica
    Table[(4^n - 4^Floor[n/2+1])/48, {n, 40}] (* or *)
    LinearRecurrence[{4, 4, -16}, {0, 0, 1}, 40] (* or *)
    Ach[n_, k_] := Ach[n, k] = If[n<2, Boole[n==k && n>=0], k Ach[n-2,k] + Ach[n-2,k-1] + Ach[n-2,k-2]] (* A304972 *)
    k=4; Table[Sum[StirlingS2[n,j]-Ach[n,j],{j,k}]/2,{n,40}]
    CoefficientList[Series[x^2/((-1 + 4 x) (-1 + 4 x^2)), {x, 0, 50}], x] (* Stefano Spezia, Oct 29 2018 *)

Formula

a(n) = (A124303(n) - A305750(n))/2.
a(n) = A124303(n) - A056323(n).
a(n) = A056323(n) - A305750(n).
a(n) = A122746(n-2) + A320526(n) + A320527(n).
a(n) = Sum_{j=1..k} (S2(n,j) - Ach(n,j)) / 2, where k=4 is the maximum number of colors, S2 is the Stirling subset number A008277, and Ach(n,k) = [n>=0 & n<2 & n==k] + [n>1]*(k*Ach(n-2,k) + Ach(n-2,k-1) + Ach(n-2,k-2)).
a(2*m) = (16^m - 4*4^m)/48.
a(2*m-1) = (16^m - 4*4^m)/192.
a(n) = (4^n - 4^floor(n/2+1))/48.
G.f.: x^2/((-1 + 4*x)*(-1 + 4*x^2)). - Stefano Spezia, Oct 29 2018
a(n) = 2^n*(2^n - (-1)^n - 3)/48. - Bruno Berselli, Oct 31 2018

A136489 Triangle T(n, k) = 3*A007318(n, k) - 2*A034851(n, k).

Original entry on oeis.org

1, 1, 1, 1, 4, 1, 1, 5, 5, 1, 1, 8, 10, 8, 1, 1, 9, 18, 18, 9, 1, 1, 12, 27, 40, 27, 12, 1, 1, 13, 39, 67, 67, 39, 13, 1, 1, 16, 52, 112, 134, 112, 52, 16, 1, 1, 17, 68, 164, 246, 246, 164, 68, 17, 1, 1, 20, 85, 240, 410, 504, 410, 240, 85, 20, 1
Offset: 0

Views

Author

Gary W. Adamson, Jan 01 2008

Keywords

Examples

			First few rows of the triangle are:
  1;
  1,   1;
  1,   4,   1;
  1,   5,   5,   1;
  1,   8,  10,   8,   1;
  1,   9,  18,  18,   9,   1;
  1,  12,  27,  40,  27,  12,   1;
  1,  13,  39,  67,  67,  39,  13,   1;
  1,  16,  52, 112, 134, 112,  52,  16,   1;
  1,  17,  68, 164, 246, 246, 164,  68,  17,   1;
  ...
		

Crossrefs

Cf. A034851, A042948, A077957, A122746 (row sums).

Programs

  • Magma
    A136489:= func< n,k | 2*Binomial(n,k) - Binomial(n mod 2, k mod 2)*Binomial(Floor(n/2), Floor(k/2)) >;
    [A136489(n,k): k in [0..n], n in [0..12]]; // G. C. Greubel, Aug 01 2023
    
  • Mathematica
    T[n_, k_]:= 2*Binomial[n,k] -Binomial[Mod[n,2], Mod[k,2]]*Binomial[Floor[n/2], Floor[k/2]];
    Table[T[n,k], {n,0,12}, {k,0,n}]//Flatten (* G. C. Greubel, Aug 01 2023 *)
  • SageMath
    def A136489(n,k): return 2*binomial(n,k) - binomial(n%2, k%2)*binomial(n//2, k//2)
    flatten([[A136489(n,k) for k in range(n+1)] for n in range(13)]) # G. C. Greubel, Aug 01 2023

Formula

T(n, k) = 3*A007318(n, k) - 2*A034851(n, k).
Sum_{k=0..n} T(n, k) = A122746(n).
From G. C. Greubel, Aug 01 2023: (Start)
T(n, k) = 2*A007318(n, k) - A051159(n, k).
T(n, k) = T(n-1, k) + T(n-1, k-1) if k is even.
T(n, n-k) = T(n, k).
T(n, n-1) = A042948(n).
Sum_{k=0..n} (-1)^k * T(n, k) = 2*[n=0] - A077957(n). (End)

A156665 Triangle read by rows, A156663 * A007318.

Original entry on oeis.org

1, 1, 1, 3, 2, 1, 3, 5, 3, 1, 7, 8, 8, 4, 1, 7, 15, 16, 12, 5, 1, 15, 22, 31, 28, 17, 6, 1, 15, 37, 53, 59, 45, 23, 7, 1, 31, 52, 90, 112, 104, 68, 30, 8, 1, 31, 83, 142, 202, 216, 172, 98, 38, 9, 1, 63, 114, 225, 344, 418, 388, 270, 136, 47, 10, 1
Offset: 0

Views

Author

Gary W. Adamson, Feb 12 2009

Keywords

Comments

Row sums = A122746: (1, 2, 6, 12, 28, 56, 120,...).

Examples

			First few rows of the triangle =
1;
1, 1;
3, 2, 1;
3, 5, 3, 1;
7, 8, 8, 4, 1;
7, 15, 16, 12, 5, 1;
15, 22, 31, 28, 17, 6, 1;
15, 37, 53, 59, 45, 23, 7, 1;
31, 52, 90, 112, 104, 68, 30, 8, 1;
31, 83, 142, 202, 216, 172, 98, 38, 9, 1;
63, 114, 225, 344, 418, 388, 270, 136, 47, 10, 1;
...
		

Crossrefs

Programs

  • Maple
    N:= 12: # for the first N rows
    A156663:= Matrix(N,N,(i,j) -> `if`((i-j)::even, 2^((i-j)/2),0), shape=triangular[lower]):
    A007318:= Matrix(N,N,(i,j) -> binomial(i-1,j-1),shape=triangular[lower]):
    P:= A156663 . A007318:
    seq(seq(P[i,j],j=1..i),i=1..N); # Robert Israel, Aug 10 2015

Formula

Triangle read by rows, A156663 * A007318
G.f. for triangle: 1/((1-2*x^2)*(1-x-x*y)). - Robert Israel, Aug 10 2015
Previous Showing 11-20 of 20 results.