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 14 results. Next

A005418 Number of (n-1)-bead black-white reversible strings; also binary grids; also row sums of Losanitsch's triangle A034851; also number of caterpillar graphs on n+2 vertices.

Original entry on oeis.org

1, 2, 3, 6, 10, 20, 36, 72, 136, 272, 528, 1056, 2080, 4160, 8256, 16512, 32896, 65792, 131328, 262656, 524800, 1049600, 2098176, 4196352, 8390656, 16781312, 33558528, 67117056, 134225920, 268451840, 536887296, 1073774592, 2147516416, 4295032832
Offset: 1

Views

Author

Keywords

Comments

Equivalently, walks on triangle, visiting n+2 vertices, so length n+1, n "corners"; the symmetry group is S3, reversing a walk does not count as different. Walks are not self-avoiding. - Colin Mallows
Slavik V. Jablan observes that this is also the number of rational knots and links with n+2 crossings (cf. A018240). See reference. [Corrected by Andrey Zabolotskiy, Jun 18 2020]
Number of bit strings of length (n-1), not counting strings which are the end-for-end reversal or the 0-for-1 reversal of each other as different. - Carl Witty (cwitty(AT)newtonlabs.com), Oct 27 2001
The formula given in page 1095 of the Balasubramanian reference can be used to derive this sequence. - Parthasarathy Nambi, May 14 2007
Also number of compositions of n up to direction, where a composition is considered equivalent to its reversal, see example. - Franklin T. Adams-Watters, Oct 24 2009
Number of normally non-isomorphic realizations of the associahedron of type I starting with dimension 2 in Ceballos et al. - Tom Copeland, Oct 19 2011
Number of fibonacenes with n+2 hexagons. See the Balaban and the Dobrynin references. - Emeric Deutsch, Apr 21 2013
From the point of view of binary grids, it is a (1,n)-rectangular grid. A225826 to A225834 are the numbers of binary pattern classes in the (m,n)-rectangular grid, 1 < m < 11. - Yosu Yurramendi, May 19 2013
Number of n-vertex difference graphs (bipartite 2K_2-free graphs) [Peled & Sun, Thm. 9]. - Falk Hüffner, Jan 10 2016
The offset should be 0, since the first row of A034851 is row 0. The name would then be: "Number of n bead...". - Daniel Forgues, Jul 26 2018
a(n) is the number of non-isomorphic generalized rigid ladders with n cells. A generalized rigid ladder with n cells is a graph with vertex set is the union of {u_0, u_1, ..., u_n} and {v_0, v_1, ..., v_n}, and for every 0 <= i <= n-1, the edges are of the form {u_i,u_i+1}, {v_i, v_i+1}, {u_i,v_i} and either {u_i,v_i+1} or {u_i+1,v_i}. - Christian Barrientos, Jul 29 2018
Also number of non-isomorphic stairs with n+1 cells. A stair is a snake polyomino allowing only two directions for adjacent cells: east and north. - Christian Barrientos and Sarah Minion, Jul 29 2018
From Robert A. Russell, Oct 28 2018: (Start)
There are two different unoriented row colorings using two colors that give us very similar results here, a difference of one in the offset. In an unoriented row, chiral pairs are counted as one.
a(n) is the number of color patterns (set partitions) of an unoriented row of length n using two or fewer colors (subsets). Two color patterns are equivalent if the colors are permutable.
a(n+1) is the number of ways to color an unoriented row of length n using two noninterchangeable colors (one need not use both colors).
See the examples below of these two different colorings. (End)
Also arises from the enumeration of types of based polyhedra with exactly two triangular faces [Rademacher]. - N. J. A. Sloane, Apr 24 2020
a(n) is the number of (unlabeled) 2-paths with n+4 vertices. (A 2-path with order n at least 4 can be constructed from a 3-clique by iteratively adding a new 2-leaf (vertex of degree 2) adjacent to an existing 2-clique containing an existing 2-leaf.) - Allan Bickle, Apr 05 2022
a(n) is the number of caterpillars with a perfect matching and order 2n+2. - Christian Barrientos, Sep 12 2023
a(n) is also the number of distinct planar embeddings of the (n+2)-centipede graph (up to at least n=8 and likely for all larger n). - Eric W. Weisstein, May 21 2024
a(n) is also the number of distinct planar embeddings of the 2 X (n+2) grid graph i.e., the (n+2)-ladder graph. - Eric W. Weisstein, May 21 2024
Dimension of the homogeneous component of degree n of the free Jordan algebra on two generators (or, in this case, the free special Jordan algebra on two generators). It follows from (Shirshov 1956, Cohn 1959). - Vladimir Dotsenko, Mar 29 2025

Examples

			a(5) = 10 because there are 16 compositions of 5 (shown as <vectors>) but only 10 equivalence classes (shown as {sets}): {<5>}, {<4,1>,<1,4>}, {<3,2>,<2,3>}, {<3,1,1>,<1,1,3>}, {<1,3,1>},{<2,2,1>,<1,2,2>}, {<2,1,2>}, {<2,1,1,1>,<1,1,1,2>}, {<1,2,1,1>,<1,1,2,1>}, {<1,1,1,1,1>}. - _Geoffrey Critzer_, Nov 02 2012
G.f. = x + 2*x^2 + 3*x^3 + 6*x^4 + 10*x^5 + 20*x^6 + 36*x^7 + 72*x^8 + ... - _Michael Somos_, Jun 24 2018
From _Robert A. Russell_, Oct 28 2018: (Start)
For a(5)=10, the 4 achiral patterns (set partitions) are AAAAA, AABAA, ABABA, and ABBBA. The 6 chiral pairs are AAAAB-ABBBB, AAABA-ABAAA, AAABB-AABBB, AABAB-ABABB, AABBA-ABBAA, and ABAAB-ABBAB. The colors are permutable.
For n=4 and a(n+1)=10, the 4 achiral colorings are AAAA, ABBA, BAAB, and BBBB. The 6 achiral pairs are AAAB-BAAA, AABA-ABAA, AABB-BBAA, ABAB-BABA, ABBB-BBBA, and BABB-BBAB. The colors are not permutable. (End)
		

References

  • K. Balasubramanian, "Combinatorial Enumeration of Chemical Isomers", Indian J. Chem., (1978) vol. 16B, pp. 1094-1096. See page 1095.
  • Wayne M. Dymacek, Steinhaus graphs. Proceedings of the Tenth Southeastern Conference on Combinatorics, Graph Theory and Computing (Florida Atlantic Univ., Boca Raton, Fla., 1979), pp. 399--412, Congress. Numer., XXIII-XXIV, Utilitas Math., Winnipeg, Man., 1979. MR0561065 (81f:05120)
  • Jablan S. and Sazdanovic R., LinKnot: Knot Theory by Computer, World Scientific Press, 2007.
  • Joseph S. Madachy: Madachy's Mathematical Recreations. New York: Dover Publications, Inc., 1979, p. 46 (first publ. by Charles Scribner's Sons, New York, 1966, under the title: Mathematics on Vacation)
  • 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.]
  • C. A. Pickover, Keys to Infinity, Wiley 1995, p. 75.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Column 2 of A320750 (set partitions).
Cf. A131577 (oriented), A122746(n-3) (chiral), A016116 (achiral), for set partitions with up to two subsets.
Column 2 of A277504, offset by one (colors not permutable).
Cf. A000079 (oriented), A122746(n-2) (chiral), and A060546 (achiral), for a(n+1).

Programs

  • Haskell
    a005418 n = sum $ a034851_row (n - 1) -- Reinhard Zumkeller, Jan 14 2012
    
  • Maple
    A005418 := n->2^(n-2)+2^(floor(n/2)-1): seq(A005418(n), n=1..34);
  • Mathematica
    LinearRecurrence[{2,2,-4}, {1,2,3}, 40] (* or *) Table[2^(n-2)+2^(Floor[n/2]-1), {n,40}] (* Harvey P. Dale, Jan 18 2012 *)
  • PARI
    A005418(n)= 2^(n-2) + 2^(n\2-1); \\ Joerg Arndt, Sep 16 2013
    
  • Python
    def A005418(n): return 1 if n == 1 else 2**((m:= n//2)-1)*(2**(n-m-1)+1) # Chai Wah Wu, Feb 03 2022

Formula

a(n) = 2^(n-2) + 2^(floor(n/2) - 1).
G.f.: -x*(-1 + 3*x^2) / ( (2*x - 1)*(2*x^2 - 1) ). - Simon Plouffe in his 1992 dissertation
G.f.: x*(1+2*x)*(1-3*x^2)/((1-4*x^2)*(1-2*x^2)), not reduced. - Wolfdieter Lang, May 08 2001
a(n) = 6*a(n - 2) - 8*a(n - 4). a(2*n) = A063376(n - 1) = 2*a(2*n - 1); a(2*n + 1) = A007582(n). - Henry Bottomley, Jul 14 2001
a(n+2) = 2*a(n+1) - A077957(n) with a(1) = 1, a(2) = 2. - Yosu Yurramendi, Oct 24 2008
a(n) = 2*a(n-1) + 2*a(n-2) - 4*a(n-3). - Jaume Oliver Lafont, Dec 05 2008
Union of A007582 and A161168. Union of A007582 and A063376. - Jaroslav Krizek, Aug 14 2009
G.f.: G(0); G(k) = 1 + 2*x/(1 - x*(1+2^(k+1))/(x*(1+2^(k+1)) + (1+2^k)/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, Dec 12 2011
a(2*n) = 2*a(2*n-1) and a(2*n+1) = a(2*n) + 4^(n-1) with a(1) = 1. - Johannes W. Meijer, Aug 26 2013
From Robert A. Russell, Oct 28 2018: (Start)
a(n) = (A131577(n) + A016116(n)) / 2 = A131577(n) - A122746(n-3) = A122746(n-3) + A016116(n), for set partitions with up to two subsets.
a(n+1) = (A000079(n) + A060546(n)) / 2 = A000079(n) - A122746(n-2) = A122746(n-2) + A060546(n), for two colors that do not permute.
a(n) = Sum_{j=0..k} (S2(n,j) + Ach(n,j)) / 2, where k=2 is the maximum number of colors, S2(n,k) 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) = (k^n + k^ceiling(n/2)) / 2, where k=2 is number of colors we can use. (End)
E.g.f.: (cosh(2*x) + 2*cosh(sqrt(2)*x) + sinh(2*x) + sqrt(2)*sinh(sqrt(2)*x) - 3)/4. - Stefano Spezia, Jun 01 2022

A005329 a(n) = Product_{i=1..n} (2^i - 1). Also called 2-factorial numbers.

Original entry on oeis.org

1, 1, 3, 21, 315, 9765, 615195, 78129765, 19923090075, 10180699028325, 10414855105976475, 21319208401933844325, 87302158405919092510875, 715091979502883286756577125, 11715351900195736886933003038875, 383876935713713710574133710574817125
Offset: 0

Views

Author

Keywords

Comments

Conjecture: this sequence is the inverse binomial transform of A075272 or, equivalently, the inverse binomial transform of the BinomialMean transform of A075271. - John W. Layman, Sep 12 2002
To win a game, you must flip n+1 heads in a row, where n is the total number of tails flipped so far. Then the probability of winning for the first time after n tails is A005329 / A006125. The probability of having won before n+1 tails is A114604 / A006125. - Joshua Zucker, Dec 14 2005
Number of upper triangular n X n (0,1)-matrices with no zero rows. - Vladeta Jovovic, Mar 10 2008
Equals the q-Fibonacci series for q = (-2), and the series prefaced with a 1: (1, 1, 1, 3, 21, ...) dot (1, -2, 4, -8, ...) if n is even, and (-1, 2, -4, 8, ...) if n is odd. For example, a(3) = 21 = (1, 1, 1, 3) dot (-1, 2, -4, 8) = (-1, 2, -4, 24) and a(4) = 315 = (1, 1, 1, 3, 21) dot (1, -2, 4, -8 16) = (1, -2, 4, -24, 336). - Gary W. Adamson, Apr 17 2009
Number of chambers in an A_n(K) building where K=GF(2) is the field of two elements. This is also the number of maximal flags in an n-dimensional vector space over a field of two elements. - Marcos Spreafico, Mar 22 2012
Given probability p = 1/2^n that an outcome will occur at the n-th stage of an infinite process, then starting at n=1, A114604(n)/A006125(n+2) = 1-a(n)/A006125(n+1) is the probability that the outcome has occurred up to and including the n-th iteration. The limiting ratio is 1-A048651 ~ 0.7112119. These observations are a more formal and generalized statement of Joshua Zucker's Dec 14, 2005 comment. - Bob Selcoe, Mar 02 2016
Also the number of dominating sets in the n-triangular honeycomb rook graph. - Eric W. Weisstein, Jul 14 2017
Empirical: Letting Q denote the Hall-Littlewood Q basis of the symmetric functions over the field of fractions of the univariate polynomial ring in t over the field of rational numbers, and letting h denote the complete homogeneous basis, a(n) is equal to the absolute value of 2^A000292(n) times the coefficient of h_{1^(n*(n+1)/2)} in Q_{(n, n-1, ..., 1)} with t evaluated at 1/2. - John M. Campbell, Apr 30 2018
The series f(x) = Sum_{n>=0} x^(2^n-1)/a(n) satisfies f'(x) = f(x^2), f(0) = 1. - Lucas Larsen, Jan 05 2022

Examples

			G.f. = 1 + x + 3*x^2 + 21*x^3 + 315*x^4 + 9765*x^5 + 615195*x^6 + 78129765*x^7 + ...
		

References

  • Annie Cuyt, Vigdis Brevik Petersen, Brigitte Verdonk, Haakon Waadeland, and William B. Jones, Handbook of continued fractions for special functions, Springer, New York, 2008. (see 19.2.1)
  • Steven R. Finch, Mathematical Constants, Cambridge University Press, 2003, p. 358.
  • Mark Ronan, Lectures on Buildings (Perspectives in Mathematics; Vol. 7), Academic Press Inc., 1989.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A048651, A079555, A152476 (inverse binomial transform).
Column q=2 of A069777.

Programs

  • GAP
    List([0..15],n->Product([1..n],i->2^i-1)); # Muniru A Asiru, May 18 2018
  • Magma
    [1] cat [&*[ 2^k-1: k in [1..n] ]: n in [1..16]]; // Vincenzo Librandi, Dec 24 2015
    
  • Maple
    A005329 := proc(n) option remember; if n<=1 then 1 else (2^n-1)*procname(n-1); end if; end proc: seq(A005329(n), n=0..15);
  • Mathematica
    a[0] = 1; a[n_] := a[n] = (2^n-1)*a[n-1]; a /@ Range[0,14] (* Jean-François Alcover, Apr 22 2011 *)
    FoldList[Times, 1, 2^Range[15] - 1] (* Harvey P. Dale, Dec 21 2011 *)
    Table[QFactorial[n, 2], {n, 0, 14}] (* Arkadiusz Wesolowski, Oct 30 2012 *)
    QFactorial[Range[0, 10], 2] (* Eric W. Weisstein, Jul 14 2017 *)
    a[ n_] := If[ n < 0, 0, (-1)^n QPochhammer[ 2, 2, n]]; (* Michael Somos, Jan 28 2018 *)
  • PARI
    a(n)=polcoeff(sum(m=0,n,2^(m*(m+1)/2)*x^m/prod(k=0,m,1+2^k*x+x*O(x^n))),n) \\ Paul D. Hanna, Sep 17 2009
    
  • PARI
    Dx(n,F)=local(D=F);for(i=1,n,D=deriv(D));D
    a(n)=local(A=1+x+x*O(x^n));for(i=1,n,A=1+sum(k=1,n,x^k/k!*Dx(k,x*A+x*O(x^n) ))); polcoeff(A,n) \\ Paul D. Hanna, Apr 21 2012
    
  • PARI
    {a(n) = if( n<0, 0, prod(k=1, n, 2^k - 1))}; /* Michael Somos, Jan 28 2018 */
    
  • PARI
    {a(n) = if( n<0, 0, (-1)^n * sum(k=0, n+1, (-1)^k * 2^(k*(k+1)/2) * prod(j=1, k, (2^(n+1-j) - 1) / (2^j - 1))))}; /* Michael Somos, Jan 28 2018 */
    

Formula

a(n)/2^(n*(n+1)/2) -> c = 0.2887880950866024212788997219294585937270... (see A048651, A048652).
From Paul D. Hanna, Sep 17 2009: (Start)
G.f.: Sum_{n>=0} 2^(n*(n+1)/2) * x^n / (Product_{k=0..n} (1+2^k*x)).
Compare to: 1 = Sum_{n>=0} 2^(n*(n+1)/2) * x^n/(Product_{k=1..n+1} (1+2^k*x)). (End)
G.f. satisfies: A(x) = 1 + Sum_{n>=1} x^n/n! * d^n/dx^n x*A(x). - Paul D. Hanna, Apr 21 2012
a(n) = 2^(binomial(n+1,2))*(1/2; 1/2){n}, where (a;q){n} is the q-Pochhammer symbol. - G. C. Greubel, Dec 23 2015
a(n) = Product_{i=1..n} A000225(i). - Michel Marcus, Dec 27 2015
From Peter Bala, Nov 10 2017: (Start)
O.g.f. as a continued fraction of Stieltjes' type: A(x) = 1/(1 - x/(1 - 2*x/(1 - 6*x/(1 - 12*x/(1 - 28*x/(1 - 56*x/(1 - ... -(2^n - 2^floor(n/2))*x/(1 - ... )))))))) (follows from Heine's continued fraction for the ratio of two q-hypergeometric series at q = 2. See Cuyt et al. 19.2.1).
A(x) = 1/(1 + x - 2*x/(1 - (2 - 1)^2*x/(1 + x - 2^3*x/(1 - (2^2 - 1)^2*x/(1 + x - 2^5*x/(1 - (2^3 - 1)^2*x/(1 + x - 2^7*x/(1 - (2^4 - 1)^2*x/(1 + x - ... ))))))))). (End)
0 = a(n)*(a(n+1) - a(n+2)) + 2*a(n+1)^2 for all n>=0. - Michael Somos, Feb 23 2019
From Amiram Eldar, Feb 19 2022: (Start)
Sum_{n>=0} 1/a(n) = A079555.
Sum_{n>=0} (-1)^n/a(n) = A048651. (End)

Extensions

Better definition from Leslie Ann Goldberg (leslie(AT)dcs.warwick.ac.uk), Dec 11 1999

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

Original entry on oeis.org

1, 1, 3, 3, 7, 7, 15, 15, 31, 31, 63, 63, 127, 127, 255, 255, 511, 511, 1023, 1023, 2047, 2047, 4095, 4095, 8191, 8191, 16383, 16383, 32767, 32767, 65535, 65535, 131071, 131071, 262143, 262143, 524287, 524287, 1048575, 1048575, 2097151, 2097151
Offset: 0

Views

Author

encyclopedia(AT)pommard.inria.fr, Jan 25 2000

Keywords

Comments

Equals row sums of triangle A137865. - Gary W. Adamson, Feb 18 2008
Also, the decimal representation of the diagonal from the corner to the origin 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
Number of nonempty subsets of {1,2,...,n+1} that contain only odd numbers. a(0) = a(1) = 1: {1}; a(6) = a(7) = 15: {1}, {3}, {5}, {7}, {1,3}, {1,5}, {1,7}, {3,5}, {3,7}, {5,7}, {1,3,5}, {1,3,7}, {1,5,7}, {3,5,7}, {1,3,5,7}. - Enrique Navarrete, Mar 16 2018
Number of nonempty subsets of {1,2,...,n+2} that contain only even numbers. a(0) = a(1) = 1: {2}; a(4) = a(5) = 7: {2}, {4}, {6}, {2,4}, {2,6}, {4,6}, {2,4,6}. - Enrique Navarrete, Mar 26 2018
Doubling of A000225(n+1), n >= 0 entries. First differences give A077957. - Wolfdieter Lang, Apr 08 2018
a(n-2) is the number of achiral rows or cycles of length n partitioned into two sets or the number of color patterns using exactly 2 colors. An achiral row or cycle is equivalent to its reverse. Two color patterns are equivalent if the colors are permuted. For n = 4, the a(n-2) = 3 row patterns are AABB, ABAB, and ABBA; the cycle patterns are AAAB, AABB, and ABAB. For n = 5, the a(n-2) = 3 patterns for both rows and cycles are AABAA, ABABA, and ABBBA. For n = 6, the a(n-2) = 7 patterns for rows are AAABBB, AABABB, AABBAA, ABAABA, ABABAB, ABBAAB, and ABBBBA; the cycle patterns are AAAAAB, AAAABB, AAABAB, AAABBB, AABAAB, AABABB, and ABABAB. - Robert A. Russell, Oct 15 2018
For integers m > 1, the expansion of 1/((1 - x)*(1 - m*x^2)) generates a(n) = (sqrt(m)^(n + 1)*((-1)^n*(sqrt(m) - 1) + sqrt(m) + 1) - 2)/(2*(m - 1)). It appears, for integer values of n >= 0 and m > 1, that it could be simplified in the integral domain a(n) = (m^(1 + floor(n/2)) - 1)/(m - 1). - Federico Provvedi, Nov 23 2018
From Werner Schulte, Mar 04 2019: (Start)
More generally: For some fixed integers q and r > 0 the expansion of A(q,r; x) = 1/((1-x)*(1-q*x^r)) generates coefficients a(q,r; n) = (q^(1+floor(n/r))-1)/(q-1) for n >= 0; the special case q = 1 leads to a(1,r; n) = 1 + floor(n/r).
The a(q,r; n) satisfy for n > r a linear recurrence equation with constant coefficients. The signature vector is given by the sum of two vectors v and w where v has terms 1 followed by r zeros, i.e., (1,0,0,...,0), and w has r-1 leading zeros followed by q and -q, i.e., (0,0,...,0,q,-q).
Let a_i(q,r; n) be the convolution inverse of a(q,r; n). The terms are given by the sum a_i(q,r; n) = b(n) + c(n) for n >= 0 where b(n) has terms 1 and -1 followed by infinitely zeros, i.e., (1,-1,0,0,0,...), and c(n) has r leading zeros followed by -q, q and infinitely zeros, i.e., (0,0,...,0,-q,q,0,0,0,...).
Here is an example for q = 3 and r = 5: The expansion of A(3,5; x) = 1/((1-x)*(1-3*x^5)) = Sum_{n>=0} a(3,5; n)*x^n generates the sequence of coefficients (a(3,5; n)) = (1,1,1,1,1,4,4,4,4,4,13,13,13,13,13,40,...) where r = 5 controls the repetition and q = 3 the different values.
The a(3,5; n) satisfy for n > 5 the linear recurrence equation with constant coefficients and signature (1,0,0,0,0,0) + (0,0,0,0,3,-3) = (1,0,0,0,3,-3).
The convolution inverse a_i(3,5; n) has terms (1,-1,0,0,0,0,0,0,0,...) + (0,0,0,0,0,-3,3,0,0,...) = (1,-1,0,0,0,-3,3,0,0,...).
For further examples and informations see A014983 (q,r = -3,1), A077925 (q,r = -2,1), A000035 (q,r = -1,1), A000012 (q,r = 0,1), A000027 (q,r = 1,1), A000225 (q,r = 2,1), A003462 (q,r = 3,1), A077953 (q,r = -2,2), A133872 (q,r = -1,2), A004526 (q,r = 1,2), A052551 (this sequence with q,r = 2,2), A077886 (q,r = -2,3), A088911 (q,r = -1,3), A002264 (q,r = 1,3) and A077885 (q,r = 2,3). The offsets might be different.
(End)
a(n) is the number of palindromes of length n over the alphabet {1,2} containing the letter 1. More generally, the number of palindromes of length n over the alphabet {1,2,...,k} containing the letter 1 is given by k^ceiling(n/2)-(k-1)^ceiling(n/2). - Sela Fried, Dec 10 2024

References

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

Crossrefs

Column 2 (offset by two) of A304972.
Cf. A000225 (oriented), A056326 (unoriented), and A122746(n-2) (chiral) for rows.
Cf. A056295 (oriented), A056357 (unoriented), and A059053 (chiral) for cycles.

Programs

  • GAP
    Flat(List([1..21],n->[2^n-1,2^n-1])); # Muniru A Asiru, Oct 16 2018
    
  • Magma
    [2^Floor(n/2)-1: n in [2..50]]; // Vincenzo Librandi, Aug 16 2011
    
  • Maple
    spec := [S,{S=Prod(Sequence(Prod(Z,Union(Z,Z))),Sequence(Z))},unlabeled]: seq(combstruct[count](spec,size=n), n=0..20);
  • Mathematica
    Table[StirlingS2[Floor[n/2] + 2, 2], {n, 0, 50}] (* Robert A. Russell, Dec 20 2017 *)
    Drop[LinearRecurrence[{1, 2, -2}, {0, 1, 1}, 50], 1] (* Robert A. Russell, Oct 14 2018 *)
    CoefficientList[Series[1/((1-x)*(1-2*x^2)), {x, 0, 50}], x] (* Stefano Spezia, Oct 16 2018 *)
    2^(1+Floor[(Range[0,50])/2])-1 (* Federico Provvedi, Nov 22 2018 *)
    ((-1)^#(Sqrt[2]-1)+Sqrt[2]+1)2^((#-1)/2)-1&@Range[0, 50] (* Federico Provvedi, Nov 23 2018 *)
  • PARI
    x='x+O('x^50); Vec(1/((1-x)*(1-2*x^2))) \\ Altug Alkan, Mar 19 2018
    
  • Sage
    [2^(floor(n/2)) -1 for n in (2..50)] # G. C. Greubel, Mar 04 2019

Formula

G.f.: 1/((1 - x)*(1 - 2*x^2)).
Recurrence: a(1) = 1, a(0) = 1, -2*a(n) - 1 + a(n+2) = 0.
a(n) = -1 + Sum((1/2)*(1 + 2*alpha)*alpha^(-1 - n)) where the sum is over alpha = the two roots of -1 + 2*x^2.
a(n) = A016116(n+2) - 1. - R. J. Mathar, Jun 15 2009
a(n) = A060546(n+1) - 1. - Filip Zaludek, Dec 10 2016
From Robert A. Russell, Oct 15 2018: (Start)
a(n-2) = S2(floor(n/2)+1,2), where S2 is the Stirling subset number A008277.
a(n-2) = 2*A056326(n) - A000225(n) = A000225(n) - 2*A122746(n-2) = A056326(n) - A122746(n-2).
a(n-2) = 2*A056357(n) - A056295(n) = A056295(n) - 2*A059053(n) = A056357(n) - A059053(n). (End)
From Federico Provvedi, Nov 22 2018: (Start)
a(n) = 2^( 1 + floor(n/2) ) - 1.
a(n) = ( (-1)^n*(sqrt(2)-1) + sqrt(2) + 1 ) * 2^( (n - 1)/2 ) - 1. (End)
E.g.f.: 2*cosh(sqrt(2)*x) + sqrt(2)*sinh(sqrt(2)*x) - cosh(x) - sinh(x). - Franck Maminirina Ramaharo, Nov 23 2018

Extensions

More terms from James Sellers, Jun 06 2000

A122746 G.f.: 1/((1-2*x)*(1-2*x^2)).

Original entry on oeis.org

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, 1073709056, 2147450880, 4294901760, 8589869056
Offset: 0

Views

Author

N. J. A. Sloane, Sep 24 2006

Keywords

Comments

Equals row sums of triangle A156665. - Gary W. Adamson, Feb 12 2009
a(n) is the number of subsets of {1,2,...,n+1} that contain at least one odd integer. - Geoffrey Critzer, Mar 03 2009
a(n-3) is the number of chiral pairs of color patterns of length n using two colors. Two color patterns are equivalent if the colors are permuted. For example, a string of five colors using exactly two different colors has six chiral pairs: AAAAB-ABBBB, AAABA-ABAAA, AAABB-AABBB, AABAB-ABABB, AABBA-ABBAA, and ABAAB-ABBAB. The number of color patterns of length n using exactly k colors when chiral pairs are counted twice is the Stirling subset number S2(n,k). The number of achiral color patterns of length n using exactly 2 colors is S2(floor(n/2)+1,2). The value of a(n-3) is half the difference of these two. - Robert A. Russell, Feb 01 2018
a(n-2) is the number of chiral pairs for a row of n colors with exactly 2 different colors. If the reverse of a sequence is different, the combination of the two is a chiral pair. For a row of 4 colors using exactly 2 different colors, the chiral pairs are AAAB-BAAA, AABA-ABAA, AABB-BBAA, ABAB-BABA, ABBB-BBBA, and BABB-BBAB. Thus a(4-2) = a(2) = 6. - Robert A. Russell, Jun 10 2018

Examples

			G.f. = 1 + 2*x + 6*x^2 + 12*x^3 + 28*x^4 + 56*x^5 + 120*x^6 + 240*x^7 + 496*x^8 + ... - _Michael Somos_, Jul 01 2018
		

Crossrefs

Essentially the same as A032085.

Programs

  • GAP
    List([0..35],n->2^(n+1)-2^(QuoInt(n+1,2))); # Muniru A Asiru, Sep 27 2018
  • Maple
    seq(coeff(series(((1-2*x)*(1-2*x^2))^(-1),x,n+1), x, n), n = 0..35); # Muniru A Asiru, Sep 27 2018
  • Mathematica
    RecurrenceTable[{a[n] == 2 (BitOr[a[n - 1], a[n - 2]]), a[0] == 1, a[1] == 2}, a, {n, 0, 32}] (* Geoffrey Critzer, Jan 09 2011 *)
    CoefficientList[Series[1/((1-2x)(1-2x^2)),{x,0,40}],x] (* or *) LinearRecurrence[{2,2,-4},{1,2,6},40] (* Harvey P. Dale, Jun 25 2013 *)
    Table[(StirlingS2[n,2] - StirlingS2[Floor[n/2]+1,2])/2, {n,3,30}] (* Robert A. Russell, Jan 29 2018 *)
    a[ n_] := 2^(n + 1) - 2^Quotient[n + 1, 2]; (* Michael Somos, Jul 01 2018 *)
  • PARI
    {a(n) = 2^(n+1) - 2^((n+1)\2)}; /* Michael Somos, Jul 01 2018 */
    

Formula

From Alexander Adamchuk, Sep 25 2006: (Start)
a(2k) = A006516(k+1) = 2^k*(2^(k+1) - 1) = A020522(k+1) /2.
a(2k+1) = 2*A006516(k+1) = 2^(k+1)*(2^(k+1) - 1) = A020522(k+1). (End)
a(n) = 2^(n+1) - 2^(floor((n+1)/2)). - Geoffrey Critzer, Mar 03 2009
a(n) = 2*(a(n-1) bitwiseOR a(n-2)), a(0)=1, a(1)=2. - Pierre Charland, Dec 12 2010
G.f.: (1+x*Q(0))/(1-x)^2, where Q(k)= 1 - 1/(2^k - 2*x*2^(2*k)/(2*x*2^k - 1/(1 + 1/(2*2^k - 8*x*2^(2*k)/(4*x*2^k + 1/Q(k+1)))))); (continued fraction). - Sergei N. Gladkovskii, May 23 2013
a(0)=1, a(1)=2, a(2)=6, a(n) = 2*a(n-1) + 2*a(n-2) - 4*a(n-3). - Harvey P. Dale, Jun 25 2013
a(n) = (A000079(n+2) - A060546(n+2))/ 2. - Robert A. Russell, Jun 19 2018
a(n) = -a(-3-n) * 2^(n+2 + floor((n+1)/2)) for all n in Z. - Michael Somos, Jul 01 2018
a(n) = (A000918(n+2) - A056453(n+2)) / 2 = A000918(n+2) - A056309(n+2) = A056309(n+2) - A056453(n+2). - Robert A. Russell, Sep 26 2018

A293500 Number of orientable strings of length n using a maximum of k colors, array read by descending antidiagonals, T(n,k) for n >= 1 and k >= 1.

Original entry on oeis.org

0, 0, 0, 0, 1, 0, 0, 3, 2, 0, 0, 6, 9, 6, 0, 0, 10, 24, 36, 12, 0, 0, 15, 50, 120, 108, 28, 0, 0, 21, 90, 300, 480, 351, 56, 0, 0, 28, 147, 630, 1500, 2016, 1053, 120, 0, 0, 36, 224, 1176, 3780, 7750, 8064, 3240, 240, 0, 0, 45, 324, 2016, 8232, 23220, 38750, 32640, 9720, 496, 0
Offset: 1

Views

Author

Andrew Howroyd, Oct 10 2017

Keywords

Comments

Reversing the string does not leave it unchanged. Only one string from each pair is counted.
Equivalently, the number of nonequivalent strings up to reversal that are not palindromes.
Except for the first term, column k is the "BHK" (reversible, identity, unlabeled) transform of k,0,0,0,... [Corrected by Petros Hadjicostas, Jul 01 2018]
From Petros Hadjicostas, Jul 01 2018: (Start)
Consider the input sequence (c_k(n): n >= 1) with g.f. C_k(x) = Sum_{n>=1} c_k(n)*x^n. Let a_k(n) = BHK(c_k(n): n >= 1) be the output sequence under Bower's BHK transform. It can be proved that the g.f. of BHK(c_k(n): n >= 1) is A_k(x) = (C_k(x)^2 - C_k(x^2))/(2*(1-C_k(x))*(1-C_k(x^2))) + C_k(x). (See the comments for sequences A032096, A032097, and A032098.)
For column k of this two-dimensional array, the input sequence is defined by c_k(1) = k and c_k(n) = 0 for n >= 1. Thus, C_k(x) = k*x, and hence the g.f. of column k (with the term C_k(x) = k*x excluded) is (C_k(x)^2 - C_k(x^2))/(2*(1-C_k(x))*(1-C_k(x^2))) = (1/2)*(k - 1)*k*x^2/((k*x^2 - 1)*(k*x - 1)), from which we can easily prove Howroyd's formula.
(End)
Comment from Bahman Ahmadi, Aug 05 2019: (Start)
We give an alternative definition for the square array A(n,k) = T(n,k) with n >= 2 and k >= 0. A(n,k) is the number of inequivalent "distinguishing colorings" of the path on n vertices using at most k colors. The rows are indexed by n, the number of vertices of the path, and the columns are indexed by k, the number of permissible colors.
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 context of "symmetry breaking" of simple (finite or infinite) graphs. Two vertex-colorings of a graph are called "equivalent" if there is an automorphism of the graph which preserves the colors of the vertices. Given a graph G, we use the notation Phi_k(G) to denote the number of inequivalent distinguishing colorings of G with at most k colors. This sequence gives A(n,k) = Phi_k(P_n), i.e., the number of inequivalent distinguishing colorings of the path P_n on n vertices with at most k colors.
For n=3, we can color the vertices of P_3 with at most 2 colors in 3 ways such that all the colorings distinguish the graph (i.e., no non-identity automorphism of the path P_3 preserves the coloring) and that all the three colorings are inequivalent.
We have Phi_k(P_n) = binomial(k,2)*k^(n-2) + k*Phi_k(P_(n-2)) for n >= 4; Phi_k(P_2) = binomial(k,2); Phi_k(P_3) = k*binomial(k,2).
(End)

Examples

			Array begins:
======================================================
n\k| 1   2    3     4      5      6       7       8
---|--------------------------------------------------
1  | 0   0    0     0      0      0       0       0...
2  | 0   1    3     6     10     15      21      28...
3  | 0   2    9    24     50     90     147     224...
4  | 0   6   36   120    300    630    1176    2016...
5  | 0  12  108   480   1500   3780    8232   16128...
6  | 0  28  351  2016   7750  23220   58653  130816...
7  | 0  56 1053  8064  38750 139320  410571 1046528...
8  | 0 120 3240 32640 195000 839160 2881200 8386560...
...
For T(4,2)=6, the chiral pairs are AAAB-BAAA, AABA-ABAA, AABB-BBAA, ABAB-BABA, ABBB-BBBA, and BABB-BBAB.
		

Crossrefs

Columns 2-5 for n > 1 are A032085, A032086, A032087, A032088.
Column 6 is A320524.
Rows 2-6 are A161680, A006002(n-1), A083374, A321672, A085744.
Cf. A003992 (oriented), A277504 (unoriented), A321391 (achiral).

Programs

  • Mathematica
    Table[Function[n, (k^n - k^(Ceiling[n/2]))/2][m - k + 1], {m, 11}, {k, m, 1, -1}] // Flatten (* Michael De Vlieger, Oct 11 2017 *)
  • PARI
    T(n,k) = (k^n - k^(ceil(n/2)))/2;

Formula

T(n,k) = (k^n - k^(ceiling(n/2)))/2.
G.f. for column k: (1/2)*(k - 1)*k*x^2/((k*x^2 - 1)*(k*x - 1)). - Petros Hadjicostas, Jul 07 2018
From Robert A. Russell, Nov 16 2018: (Start)
T(n,k) = (A003992(k,n) - A321391(n,k)) / 2.
T(n,k) = = A003992(k,n) - A277504(n,k) = A277504(n,k) - A321391(n,k).
G.f. for row n: (Sum_{j=0..n} S2(n,j)*j!*x^j/(1-x)^(j+1) - Sum_{j=0..ceiling(n/2)} S2(ceiling(n/2),j)*j!*x^j/(1-x)^(j+1)) / 2, where S2 is the Stirling subset number A008277.
G.f. for row n>1: x * Sum_{k=1..n-1} A145883(n,k) * x^k / (1-x)^(n+1).
E.g.f. for row n: (Sum_{k=0..n} S2(n,k)*x^k - Sum_{k=0..ceiling(n/2)} S2(ceiling(n/2),k)*x^k) * exp(x) / 2, where S2 is the Stirling subset number A008277.
T(0,k) = T(1,k) = 0; T(2,k) = binomial(k,2); for n>2, T(n,k) = k*(T(n-3,k)+T(n-2,k)-k*T(n-1,k)).
For k>n, T(n,k) = Sum_{j=1..n+1} -binomial(j-n-2,j) * T(n,k-j). (End)

A356185 The difference between number of even and number of odd Grassmannian permutations of size n.

Original entry on oeis.org

1, 1, 0, 1, 0, 3, 2, 9, 8, 23, 22, 53, 52, 115, 114, 241, 240, 495, 494, 1005, 1004, 2027, 2026, 4073, 4072, 8167, 8166, 16357, 16356, 32739, 32738, 65505, 65504, 131039, 131038, 262109, 262108, 524251, 524250, 1048537, 1048536, 2097111, 2097110, 4194261, 4194260
Offset: 0

Views

Author

Per W. Alexandersson, Jul 28 2022

Keywords

Comments

A permutation is Grassmann if it has at most one descent. A closed-form formula was proved by J. B. Gil and J. A. Tomasko.

Examples

			For n=3, 123, 231, 312 are even Grassmann permutations, and 132, 213 are the odd ones. Hence a(3) = 1.
		

Crossrefs

Bisections give: A005803 (even part), A183155 (odd part).

Programs

  • Mathematica
    Table[2^Floor[1 + (n - 1)/2] - n, {n, 1, 80}]

Formula

a(n) = 2^(1+floor((n-1)/2))-n.
From Alois P. Heinz, Jul 28 2022: (Start)
G.f.: -(4*x^3-3*x^2-x+1)/((2*x^2-1)*(x-1)^2).
a(n) = A000325(n) - A233411(n) = A060546(n) - n = 2^ceiling(n/2) - n.
a(n) = A000325(n) - 2*A032085(n) = A000325(n) - 2*A122746(n-2) for n>=2. (End)

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

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

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Same as A034852, but omitting the border of 0's.

Examples

			Triangle begins:
  1;
  1, 1;
  2, 2,  2;
  2, 4,  4,  2;
  3, 6, 10,  6, 3;
  3, 9, 16, 16, 9, 3;
  ...
		

References

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

Crossrefs

Row sums are essentially A032085. Central column is A032095.

Programs

  • Haskell
    a034877 n k = a034877_tabl !! n !! k
    a034877_row n = a034877_tabl !! n
    a034877_tabl = map (init . tail) $ drop 2 a034852_tabl
    -- Reinhard Zumkeller, Dec 16 2013

Extensions

More terms from James Sellers, May 04 2000

A289404 Binary representation of the diagonal from the corner to the origin 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.

Original entry on oeis.org

1, 1, 11, 11, 111, 111, 1111, 1111, 11111, 11111, 111111, 111111, 1111111, 1111111, 11111111, 11111111, 111111111, 111111111, 1111111111, 1111111111, 11111111111, 11111111111, 111111111111, 111111111111, 1111111111111, 1111111111111, 11111111111111
Offset: 0

Views

Author

Robert Price, Jul 05 2017

Keywords

Comments

Initialized with a single black (ON) cell at stage zero.

References

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

Crossrefs

Programs

  • Mathematica
    CAStep[rule_, a_] := Map[rule[[10 - #]] &, ListConvolve[{{0, 2, 0},{2, 1, 2}, {0, 2, 0}}, a, 2],{2}];
    code = 566; stages = 128;
    rule = IntegerDigits[code, 2, 10];
    g = 2 * stages + 1; (* Maximum size of grid *)
    a = PadLeft[{{1}}, {g, g}, 0,Floor[{g, g}/2]]; (* Initial ON cell on grid *)
    ca = a;
    ca = Table[ca = CAStep[rule, ca], {n, 1, stages + 1}];
    PrependTo[ca, a];
    (* Trim full grid to reflect growth by one cell at each stage *)
    k = (Length[ca[[1]]] + 1)/2;
    ca = Table[Table[Part[ca[[n]] [[j]],Range[k + 1 - n, k - 1 + n]], {j, k + 1 - n, k - 1 + n}], {n, 1, k}];
    Table[FromDigits[Table[ca[[i, j, j]], {j, 1, i}], 10], {i, 1, stages - 1}]

Formula

Conjectures from Colin Barker, Jul 05 2017: (Start)
G.f.: 1 / ((1 - x)*(1 - 10*x^2)).
a(n) = a(n-1) + 10*a(n-2) - 10*a(n-3) for n>2.
(End)
Conjectures from Federico Provvedi, Nov 21 2018: (Start)
a(n) = (10^(1 + floor(n/2)) - 1)/9.
a(n) = (sqrt(10)^(n+1)*((sqrt(10)-1)*(-1)^n+(sqrt(10)+1))-2)/18.
(End)

A156232 a(n) is the number of induced subgraphs with odd number of edges in the cycle graph C(n).

Original entry on oeis.org

0, 4, 4, 16, 24, 64, 112, 256, 480, 1024, 1984, 4096, 8064, 16384, 32512, 65536, 130560, 262144, 523264, 1048576, 2095104, 4194304, 8384512, 16777216, 33546240, 67108864, 134201344, 268435456, 536838144, 1073741824, 2147418112
Offset: 2

Views

Author

Alessandro Cosentino (cosenal(AT)gmail.com), Feb 06 2009

Keywords

Comments

Essentially the same sequence (see A204696) appears in the Cusick-Stanica paper.

Crossrefs

Programs

  • Mathematica
    RecurrenceTable[{a[n]== 2*a[n-1]  + 2*a[n-2] - 4*a[n-3], a[0]==0, a[1]==4, a[2]==4}, a, {n,0,50}] (* G. C. Greubel, Aug 26 2015 *)
    LinearRecurrence[{2, 2, -4}, {0, 4, 4}, 40] (* Vincenzo Librandi, Aug 27 2015 *)
  • PARI
    Vec(4*x^3*(1-x)/((1-2*x)*(1-2*x^2)) + O(x^40)) \\ Michel Marcus, Aug 26 2015

Formula

a(n) = 2^(n-1) - 2^(n/2) if n is even, 2^(n-1) otherwise.
G.f.: 4*x^3*(1-x)/((1-2*x)*(1-2*x^2)). a(n)=2*a(n-1)+2*a(n-2)-4*a(n-3). - R. J. Mathar, Feb 10 2009
E.g.f.: 2*(exp(2*x) - cosh(sqrt(2)*x)). - G. C. Greubel, Aug 26 2015

Extensions

More terms from R. J. Mathar, Feb 10 2009
Showing 1-10 of 14 results. Next