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.

A032085 Number of reversible strings with n beads of 2 colors. If more than 1 bead, not palindromic.

Original entry on oeis.org

2, 1, 2, 6, 12, 28, 56, 120, 240, 496, 992, 2016, 4032, 8128, 16256, 32640, 65280, 130816, 261632, 523776, 1047552, 2096128, 4192256, 8386560, 16773120, 33550336, 67100672, 134209536, 268419072, 536854528
Offset: 1

Views

Author

Keywords

Comments

a(n) is also the number of induced subgraphs with odd number of edges in the path graph P(n) if n>0. - Alessandro Cosentino (cosenal(AT)gmail.com), Feb 06 2009
A common recurrence of the bisections A020522 and A006516 means a(n+4) = 6*a(n+2) - 8*a(n), n>1. - Yosu Yurramendi, Aug 07 2008
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 566", based on the 5-celled von Neumann neighborhood, initialized with a single black (ON) cell at stage zero. - Robert Price, Jul 05 2017

References

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

Crossrefs

Cf. A005418, A016116. Essentially the same as A122746.
Row sums of triangle A034877.

Programs

Formula

"BHK" (reversible, identity, unlabeled) transform of 2, 0, 0, 0, ...
a(n) = 2^(n-1)-2^floor((n-1)/2), n > 1. - Vladeta Jovovic, Nov 11 2001
G.f.: 2*x+x^2/((1-2*x)*(1-2*x^2)). - Mohammed Bouayoun (bouyao(AT)wanadoo.fr), Mar 25 2004
a(n) = A005418(n+1)-A016116(n+2), n>1. - Yosu Yurramendi, Aug 07 2008
a(n+1) = A077957(n) + 2*a(n), n>1. a(n+2) = A000079(n+1) + 2*a(n), n>1. - Yosu Yurramendi, Aug 10 2008
First differences: a(n+1)-a(n) = A007179(n) = A156232(n+2)/4, n>1. - Paul Curtz, Nov 16 2009
a(n) = 2*(a(n-1) bitwiseOR a(n-2)), n>3. - Pierre Charland, Dec 12 2010
a(n) = 2*a(n-1) + 2*a(n-2) - 4*a(n-3). - Wesley Ivan Hurt, Jul 03 2020

A158474 Triangle read by rows generated from (x-1)*(x-2)*(x-4)*...

Original entry on oeis.org

1, 1, -1, 1, -3, 2, 1, -7, 14, -8, 1, -15, 70, -120, 64, 1, -31, 310, -1240, 1984, -1024, 1, -63, 1302, -11160, 41664, -64512, 32768, 1, -127, 5334, -94488, 755904, -2731008, 4161536, -2097152, 1, -255, 21590, -777240, 12850368, -99486720, 353730560
Offset: 0

Views

Author

Gary W. Adamson, Mar 20 2009

Keywords

Comments

Row sum of the unsigned triangle = A028361: (1, 2, 6, 30, 270, 4590, ...).
Right border of the unsigned triangle = A006125: (1, 1, 2, 8, 64, 1024, ...).
From Philippe Deléham, Mar 20 2009: (Start)
Unsigned triangle: A077957(n) DELTA A007179(n+1) = [1,0,2,0,4,0,8,0,16,0,32,0,...]DELTA[1,1,4,6,16,28,64,120,256,496,...], where DELTA is the operator defined in A084938.
Signed triangle: [1,0,2,0,4,0,8,0,16,0,...]DELTA[-1,-1,-4,-6,-16,-28,-64,...]. (End)

Examples

			First few rows of the triangle =
1;
1,  -1;
1,  -3,     2;
1,  -7,    14,     -8;
1, -15,    70,   -120,       64;
1, -31,   310,  -1240,     1984,    -1024;
1, -63,  1302, -11160,    41664,   -64512,     32768;
1,-127,  5334, -94488,   755904, -2731008,   4161536,  -2097152;
1,-255, 21590,-777240, 12850368,-99486720, 353730560,-534773760, 268435456;
...
Example: row 3 = x^3 - 7x^2 + 14x - 8 = (x-1)*(x-2)*(x-4).
		

Crossrefs

Cf. A157963, A135950. - R. J. Mathar, Mar 20 2009

Programs

  • Maple
    A158474 := proc(n,k) mul(x-2^j,j=0..n-1) ; expand(%); coeftayl(%,x=0,n-k) ; end proc: # R. J. Mathar, Aug 27 2011
  • Mathematica
    {{1}}~Join~Table[Reverse@ CoefficientList[Fold[#1 (x - #2) &, 1, 2^Range[0, n]], x], {n, 0, 7}] // Flatten (* Michael De Vlieger, Dec 22 2016 *)

Formula

T(n,k) = coefficient [x^(n-k)] of (x-1)*(x-2)*(x-4)*...*(x-2^(n-1)).
T(n,k) = (-1)^k*(Sum_{j=0..k} T(k,j)*2^((k-j)*n))/(Product_{i=1..k} (2^i-1)) for n >= 0 and k > 0, i.e., e.g.f. of col k > 0 is: (-1)^k*(Sum_{j=0..k} T(k,j)* exp(2^(k-j)*t))/(Product_{i=1..k} (2^i-1)). - Werner Schulte, Dec 18 2016
T(n,k)/T(k,k) = A022166(n,k) for 0 <= k <= n. - Werner Schulte, Dec 21 2016

A309748 The number of non-equivalent distinguishing coloring partitions of the path on n vertices (n>=1) with exactly k parts (k>=1). Regular triangle read by rows: the rows are indexed by n, the number of vertices of the path, and the columns are indexed by k, the number of parts.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 4, 4, 1, 0, 6, 14, 6, 1, 0, 16, 49, 37, 9, 1, 0, 28, 154, 182, 76, 12, 1, 0, 64, 496, 876, 542, 142, 16, 1, 0, 120, 1520, 3920, 3522, 1346, 242, 20, 1, 0, 256, 4705, 17175, 21392, 11511, 2980, 390, 25, 1, 0, 496, 14266, 73030, 123665, 89973, 32141, 5990, 595, 30, 1
Offset: 1

Views

Author

Keywords

Comments

A vertex-coloring of a graph G is called distinguishing if it is only preserved by the identity automorphism of G. This notion is considered in the subject of symmetry breaking of simple (finite or infinite) graphs. A distinguishing coloring partition of a graph G is a partition of the vertices of G such that it induces a distinguishing coloring for G. We say two distinguishing coloring partitions P1 and P2 of G are equivalent if there is a nontrivial automorphism of G which maps P1 onto P2. Given a graph G, we use the notation psi_k(G) to denote the number of non-equivalent distinguishing coloring partitions of G with at exactly k parts. For n>=1, this sequence gives T(n,k) = psi_k(P_n), i.e., the number of non-equivalent distinguishing coloring partitions of the path P_n on n vertices with exactly k parts.
Also, for n > 1 the number of reversible string structures of length n using exactly k different symbols that are not equivalent to their reversal (compare A284949). - Andrew Howroyd, Aug 15 2019

Examples

			The triangle begins:
  1;
  0,   1;
  0,   1,    1;
  0,   4,    4,     1;
  0,   6,   14,     6,     1;
  0,  16,   49,    37,     9,     1;
  0,  28,  154,   182,    76,    12,    1;
  0,  64,  496,   876,   542,   142,   16,   1;
  0, 120, 1520,  3920,  3522,  1346,  242,  20,  1;
  0, 256, 4705, 17175, 21392, 11511, 2980, 390, 25, 1;
  ...
----
For n=4, we can partition the vertices of P_4 into exactly 3 parts in 4 ways such that all these partitions induce distinguishing colorings for P_4 and that all the 4 partitions are non-equivalent. The partitions are as follows:
    { { 1 }, { 2 }, { 3, 4 } }
    { { 1 }, { 2, 3 }, { 4 } }
    { { 1 }, { 2, 4 }, { 3 } }
    { { 1, 4 }, { 2 }, { 3 } }
		

Crossrefs

Columns k=2..4 are A007179, A327610, A327611.
Row sums are A327612(n > 1).

Programs

  • PARI
    \\ Ach is A304972 as square matrix.
    Ach(n)={my(M=matrix(n, n, i, k, i>=k)); for(i=3, n, for(k=2, n, M[i, k]=k*M[i-2, k] + M[i-2, k-1] + if(k>2, M[i-2, k-2]))); M}
    T(n)={(matrix(n, n, i, k, stirling(i, k, 2) - 2*stirling((i+1)\2, k, 2)) + Ach(n))/2}
    { my(A=T(10)); A[1,1]=1; for(n=1, #A, print(A[n, 1..n])) } \\ Andrew Howroyd, Sep 18 2019

Formula

T(n,k) = A309635(n,k) - A309635(n,k-1) for k > 1.
T(n,k) = A284949(n,k) - Stirling2(ceiling(n/2), k) for n > 1. - Andrew Howroyd, Aug 15 2019

Extensions

Terms a(56) and beyond from Andrew Howroyd, Sep 18 2019

A014236 Expansion of g.f.: 2*x*(1-x)/((1-2*x)*(1-2*x^2)).

Original entry on oeis.org

0, 2, 2, 8, 12, 32, 56, 128, 240, 512, 992, 2048, 4032, 8192, 16256, 32768, 65280, 131072, 261632, 524288, 1047552, 2097152, 4192256, 8388608, 16773120, 33554432, 67100672, 134217728, 268419072, 536870912, 1073709056, 2147483648, 4294901760, 8589934592
Offset: 0

Views

Author

Paul F. Hudrlik (hudrlik(AT)scs.howard.edu)

Keywords

Comments

Number of symmetric chiral (optically active) isomers possible for organic compounds with n distinct carbon atoms.
A020522 interleaved with A004171 and apparently the number of asymmetric Dyck (n+2)-paths with exactly half of the steps lying between the first and last peaks; e.g. all asymmetric 3-paths (UU*DDU*D and U*DUU*DD) comply so a(1)=2. - David Scambler, Sep 14 2012

Crossrefs

Second differences of A027556.

Programs

  • GAP
    a:=[0,2,2];; for n in [4..30] do a[n]:=2*a[n-1]+2*a[n-2]-4*a[n-3]; od; a; # G. C. Greubel, Jun 22 2019
  • Magma
    R:=PowerSeriesRing(Integers(), 30); [0] cat Coefficients(R!( 2*x*(1-x)/((1-2*x)*(1-2*x^2)) )); // G. C. Greubel, Jun 22 2019
    
  • Maple
    f := n -> if n mod 2 = 0 then 2^n-2^(n/2) else 2^n; fi;
  • Mathematica
    CoefficientList[Series[2x (1-x)/((1-2x)(1-2x^2)),{x,0,30}],x] (* or *) LinearRecurrence[{2,2,-4},{0,2,2},30] (* Harvey P. Dale, Dec 04 2018 *)
  • PARI
    my(x='x+O('x^30)); concat([0], Vec(2*x*(1-x)/((1-2*x)*(1-2*x^2)))) \\ G. C. Greubel, Jun 22 2019
    
  • Sage
    (2*x*(1-x)/((1-2*x)*(1-2*x^2))).series(x, 30).coefficients(x, sparse=False) # G. C. Greubel, Jun 22 2019
    

Formula

a(n) = 2*A007179(n). - R. J. Mathar, Nov 14 2011
From G. C. Greubel, Jun 22 2019: (Start)
a(n) = 2^((n - 2)/2)*(2^((n + 2)/2) - 1 - (-1)^n).
E.g.f.: exp(2*x) - cosh(sqrt(2)*x). (End)

Extensions

G.f. corrected by Olivier Gérard, Nov 13 2011

A122006 Expansion of x^2*(1-x)/((1-3*x)*(1-3*x^2)).

Original entry on oeis.org

0, 1, 2, 9, 24, 81, 234, 729, 2160, 6561, 19602, 59049, 176904, 531441, 1593594, 4782969, 14346720, 43046721, 129133602, 387420489, 1162241784, 3486784401, 10460294154, 31381059609, 94143001680, 282429536481, 847288078002, 2541865828329, 7625595890664
Offset: 1

Views

Author

Roger L. Bagula and Gary W. Adamson, Sep 11 2006

Keywords

Comments

Limit(n->infinity) a(n+1)/a(n)=3.
The sequence can be created by multiplying the n-th power of the matrix [[0,1,2],[1,2,0],[2,0,1]], multiplying from the right with the vector [1,0,0] and taking the middle element of the resulting vector.

References

  • Alain M. Robert, "Linear Algebra, Examples and Applications", World Scientific, 2005, p. 58.

Crossrefs

Cf. A007179.

Programs

  • Mathematica
    M = {{0, 1, 2}, {1, 2, 0}, {2, 0, 1}} v[1] = {1, 0, 0} v[n_] := v[n] = M.v[n - 1] a1 = Table[v[n][[2]], {n, 1, 50}]
    Rest[CoefficientList[Series[x^2(1-x)/((1-3x)(1-3x^2)),{x,0,30}],x]] (* or *) LinearRecurrence[{3,3,-9},{0,1,2},30] (* Harvey P. Dale, Aug 20 2024 *)
  • PARI
    concat(0, Vec(x^2*(1-x)/((1-3*x)*(1-3*x^2)) + O(x^40))) \\ Colin Barker, Sep 23 2016

Formula

a(n) = 3*a(n-1) + 3*a(n-2) - 9*a(n-3). - Philippe Deléham, Mar 09 2009
From Colin Barker, Sep 23 2016: (Start)
a(n) = 3^(n-2) for n even.
a(n) = 3^(n-2)-3^((n-3)/2) for n odd. (End)

A157963 Triangle T(n,k), 0<=k<=n, read by rows given by [1,q-1,q^2,q^3-q,q^4,q^5-q^2,q^6,q^7-q^3,q^8,...] DELTA [ -1,0,-q,0,-q^2,0,-q^3,0,-q^4,0,-q^5,0,...] (for q=2) = [1,1,4,6,16,28,64,...] DELTA [ -1,0,-2,0,-4,0,-8,0,-16,0,...] where DELTA is the operator defined in A084938.

Original entry on oeis.org

1, 1, -1, 2, -3, 1, 8, -14, 7, -1, 64, -120, 70, -15, 1, 1024, -1984, 1240, -310, 31, -1, 32768, -64512, 41664, -11160, 1302, -63, 1, 2097152, -4161536, 2731008, -755904, 94488, -5334, 127, -1, 268435456, -534773760, 353730560, -99486720, 12850368
Offset: 0

Views

Author

Philippe Deléham, Mar 10 2009

Keywords

Comments

Row sums equal 0^n.
Row n contains the coefficients of Product_{j=0..n-1} (2^j*x-1), highest coefficient first. - Alois P. Heinz, Mar 26 2012
The elements of the matrix inverse are apparently given by T^(-1)(n,k) = (-1)^k*A022166(n,k). - R. J. Mathar, Mar 26 2013

Examples

			Triangle begins :
1;
1,    -1;
2,    -3,  1;
8,   -14,  7,  -1;
64, -120, 70, -15,  1;
		

Crossrefs

Programs

  • Maple
    T:= n-> seq (coeff (mul (2^j*x-1, j=0..n-1), x, n-k), k=0..n):
    seq (T(n), n=0..10);  # Alois P. Heinz, Mar 26 2012
  • Mathematica
    row[n_] := CoefficientList[(-1)^n QPochhammer[x, 2, n] + O[x]^(n+1), x] // Reverse; Table[row[n], {n, 0, 10}] // Flatten (* Jean-François Alcover, May 26 2016 *)

Formula

T(n,k) = (-1)^n*A135950(n,k). T(n,0) = A006125(n).
T(n,k) = [x^(n-k)] Product_{j=0..n-1} (2^j*x-1). - Alois P. Heinz, Mar 26 2012

A309635 The number of non-equivalent distinguishing coloring partitions of the path on n vertices (n>=1) with at most k parts (k>=1). Square array read by descending antidiagonals: the rows are indexed by n, the number of vertices of the path, and the columns are indexed by k, the number of parts.

Original entry on oeis.org

1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 2, 4, 0, 1, 1, 2, 8, 6, 0, 1, 1, 2, 9, 20, 16, 0, 1, 1, 2, 9, 26, 65, 28, 0, 1, 1, 2, 9, 27, 102, 182, 64, 0, 1, 1, 2, 9, 27, 111, 364, 560, 120, 0, 1, 1, 2, 9, 27, 112, 440, 1436, 1640, 256, 0
Offset: 1

Views

Author

Keywords

Comments

A vertex-coloring of a graph G is called distinguishing if it is only preserved by the identity automorphism of G. This notion is considered in the subject of symmetry breaking of simple (finite or infinite) graphs. A distinguishing coloring partition of a graph G is a partition of the vertices of G such that it induces a distinguishing coloring for G. We say two distinguishing coloring partitions P1 and P2 of G are equivalent if there is a nontrivial automorphism of G which maps P1 onto P2. Given a graph G, we use the notation Psi_k(G) to denote the number of non-equivalent distinguishing coloring partitions of G with at most k parts. This sequence gives A(n,k) = Psi_k(P_n), i.e., the number of non-equivalent distinguishing coloring partitions of the path P_n on n vertices with at most k parts.
Note that, for any graph G, Psi_k(G) = Sum_{i<=k} psi_i(G), where psi_i(G) is the number of non-equivalent distinguishing coloring partitions of G with exactly i parts. For instance, here we have T(n,k) = Sum_{i<=k} A309748(n,i).

Examples

			Table begins:
  ======================================================================
  n\k| 1    2     3      4      5      6      7      8      9     10
  ---+------------------------------------------------------------------
   1 | 1,   1,    1,     1,     1,     1,     1,     1,     1,     1 ...
   2 | 0,   1,    1,     1,     1,     1,     1,     1,     1,     1 ...
   3 | 0,   1,    2,     2,     2,     2,     2,     2,     2,     2 ...
   4 | 0,   4,    8,     9,     9,     9,     9,     9,     9,     9 ...
   5 | 0,   6,   20,    26,    27,    27,    27,    27,    27,    27 ...
   6 | 0,  16,   65,   102,   111,   112,   112,   112,   112,   112 ...
   7 | 0,  28,  182,   364,   440,   452,   453,   453,   453,   453 ...
   8 | 0,  64,  560,  1436,  1978,  2120,  2136,  2137,  2137,  2137 ...
   9 | 0, 120, 1640,  5560,  9082, 10428, 10670, 10690, 10691, 10691 ...
  10 | 0, 256, 4961, 22136, 43528, 55039, 58019, 58409, 58434, 58435 ...
  ...
For n=4, we can partition the vertices of P_4 into at most 3 parts in 8 ways such that all these partitions induce distinguishing colorings for P_4 and that all the 8 partitions are non-equivalent. The partitions are as follows:
    { { 1 }, { 2 }, { 3, 4 } }
    { { 1 }, { 2, 3 }, { 4 } }
    { { 1 }, { 2, 4 }, { 3 } }
    { { 1, 4 }, { 2 }, { 3 } }
    { { 1 }, { 2, 3, 4 } }
    { { 1, 2 }, { 3, 4 } }
    { { 1, 2, 4 }, { 3 } }
    { { 1, 3 }, { 2, 4 } }
		

Crossrefs

Column k=2 is A007179(n > 1).

Formula

T(n, k) = Sum_{i=1..k} A309748(n,i).

A097895 Number of compositions of n with at least 1 odd and 1 even part.

Original entry on oeis.org

0, 0, 2, 3, 11, 20, 51, 99, 222, 441, 935, 1872, 3863, 7751, 15774, 31653, 63939, 128232, 257963, 517011, 1037630, 2078417, 4165647, 8340192, 16702191, 33428943, 66912446, 133891725, 267921227, 536022488, 1072395555, 2145272571, 4291442718, 8584166169
Offset: 1

Views

Author

Dubois Marcel (dubois.ml(AT)club-internet.fr), Sep 03 2004

Keywords

Examples

			n=4: 2+1+1, 1+2+1, 1+1+2. Total=3.
		

Crossrefs

Cf. A000041 (partitions), A006477 (partitions of n with at least 1 odd and 1 even part), A000009 (partitions into odd parts), A035363 (partitions into even parts); A000079 (compositions). Compositions into odd parts give Fibonacci numbers (A000045), into even parts gives 0, 1, 0, 2, 0, 4, 0, 8, 0, 16, 0, 32, 0, 64, ... (essentially A000079).
Cf. A007179.

Programs

  • Maple
    G:=x^3*(3*x-2)/((2*x-1)*(2*x^2-1)*(x^2+x-1)): Gser:=series(G,x=0,37): seq(coeff(Gser,x^n),n=1..35); # Emeric Deutsch, Feb 15 2005
    # second Maple program
    b:= proc(n, o, e) option remember; `if`(n=0, `if`(o and e, 1, 0),
          add(`if`(irem(i, 2)=1, b(n-i, true, e),
                                 b(n-i, o, true)), i=1..n))
        end:
    a:= n-> b(n, false$2):
    seq(a(n), n=1..50);  # Alois P. Heinz, Jun 11 2013
  • Mathematica
    e=(1-x^2)/(1-2x^2); o=(1-x^2)/(1-x-x^2); nn=30; Drop[CoefficientList[Series[(1-x)/(1-2x)-(o+e), {x,0,nn}], x], 1]  (* Geoffrey Critzer, Jan 18 2012 *)

Formula

G.f.: x^3*(3*x-2)/((2*x-1)*(2*x^2-1)*(x^2+x-1)). - Vladeta Jovovic, Sep 03 2004
a(n) = 3*a(n-1) + a(n-2) - 8*a(n-3) + 2*a(n-4) + 4*a(n-5) for n > 5. - Jinyuan Wang, Mar 10 2020
From Gregory L. Simay, May 27 2021: (Start)
a(2*n) = 2^(2*n - 1) - 2^(n-1) - A000045(2*n).
a(2*n+1) = 2^(2*n) - A000045(2*n + 1). (End)

Extensions

More terms from Emeric Deutsch, Feb 15 2005

A235501 Riordan array (1/(1-2*x^2), x/(1-x)).

Original entry on oeis.org

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

Views

Author

Philippe Deléham, Jan 11 2014

Keywords

Comments

Row sums are A007179(n+1).

Examples

			Triangle begins (0<=k<=n):
1
0, 1
2, 1, 1
0, 3, 2, 1
4, 3, 5, 3, 1
0, 7, 8, 8, 4, 1
8, 7, 15, 16, 12, 5, 1
0, 15, 22, 31, 28, 17, 6, 1
		

Crossrefs

Cf. Columns: A077957, A052551, A077866.
Diagonals: A000012, A001477, A022856.
Cf. Similar sequences: A059260, A191582.

Formula

T(n,n)=1, T(2n,0)=2^n, T(2n+1,0)=0, T(n,k)=T(n-1,k-1)+T(n-1,k) for 0
T(n,k)=T(n-1,k)+T(n-1,k-1)+2*T(n-2,k)-T(n-3,k)-2*T(n-3,k-1), T(0,0)=1, T(1,0)=0, T(1,1)=1, T(n,k)=0 if k<0 or if k>n.
T(n,n)=1, T(n+1,n)=n, T(n+2,n)=n*(n+1)/2 + 2.
exp(x) * e.g.f. for row n = e.g.f. for diagonal n. For example, for n = 3 we have exp(x)*(3*x + 2*x^2/2! + x^3/3!) = 3*x + 8*x^2/2! + 16*x^3/3! + 28*x^4/4! + 45*x^5/5! + .... The same property holds more generally for Riordan arrays of the form ( f(x), x/(1 - x) ). - Peter Bala, Dec 22 2014
Showing 1-9 of 9 results.