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

A000244 Powers of 3: a(n) = 3^n.

Original entry on oeis.org

1, 3, 9, 27, 81, 243, 729, 2187, 6561, 19683, 59049, 177147, 531441, 1594323, 4782969, 14348907, 43046721, 129140163, 387420489, 1162261467, 3486784401, 10460353203, 31381059609, 94143178827, 282429536481, 847288609443, 2541865828329, 7625597484987
Offset: 0

Views

Author

Keywords

Comments

Same as Pisot sequences E(1, 3), L(1, 3), P(1, 3), T(1, 3). Essentially same as Pisot sequences E(3, 9), L(3, 9), P(3, 9), T(3, 9). See A008776 for definitions of Pisot sequences.
Number of (s(0), s(1), ..., s(2n+2)) such that 0 < s(i) < 6 and |s(i) - s(i-1)| = 1 for i = 1, 2, ..., 2n + 2, s(0) = 1, s(2n+2) = 3. - Herbert Kociemba, Jun 10 2004
a(1) = 1, a(n+1) is the least number such that there are a(n) even numbers between a(n) and a(n+1). Generalization for the sequence of powers of k: 1, k, k^2, k^3, k^4, ... There are a(n) multiples of k-1 between a(n) and a(n+1). - Amarnath Murthy, Nov 28 2004
a(n) = sum of (n+1)-th row in Triangle A105728. - Reinhard Zumkeller, Apr 18 2005
With p(n) being the number of integer partitions of n, p(i) being the number of parts of the i-th partition of n, d(i) being the number of different parts of the i-th partition of n, m(i, j) being the multiplicity of the j-th part of the i-th partition of n, Sum_{i = 1..p(n)} being the sum over i and Product_{j = 1..d(i)} being the product over j, one has: a(n) = Sum_{i = 1..p(n)} (p(i)!/(Product_{j = 1..d(i)} m(i, j)!))*2^(p(i) - 1). - Thomas Wieder, May 18 2005
For any k > 1 in the sequence, k is the first prime power appearing in the prime decomposition of repunit R_k, i.e., of A002275(k). - Lekraj Beedassy, Apr 24 2006
a(n-1) is the number of compositions of compositions. In general, (k+1)^(n-1) is the number of k-levels nested compositions (e.g., 4^(n-1) is the number of compositions of compositions of compositions, etc.). Each of the n - 1 spaces between elements can be a break for one of the k levels, or not a break at all. - Franklin T. Adams-Watters, Dec 06 2006
Let S be a binary relation on the power set P(A) of a set A having n = |A| elements such that for every element x, y of P(A), xSy if x is a subset of y. Then a(n) = |S|. - Ross La Haye, Dec 22 2006
From Manfred Boergens, Mar 28 2023: (Start)
With regard to the comment by Ross La Haye:
Cf. A001047 if either nonempty subsets are considered or x is a proper subset of y.
Cf. a(n+1) in A028243 if nonempty subsets are considered and x is a proper subset of y. (End)
If X_1, X_2, ..., X_n is a partition of the set {1, 2, ..., 2*n} into blocks of size 2 then, for n >= 1, a(n) is equal to the number of functions f : {1, 2, ..., 2*n} -> {1, 2} such that for fixed y_1, y_2, ..., y_n in {1, 2} we have f(X_i) <> {y_i}, (i = 1, 2, ..., n). - Milan Janjic, May 24 2007
This is a general comment on all sequences of the form a(n) = [(2^k)-1]^n for all positive integers k. Example 1.1.16 of Stanley's "Enumerative Combinatorics" offers a slightly different version. a(n) in the number of functions f:[n] into P([k]) - {}. a(n) is also the number of functions f:[k] into P([n]) such that the generalized intersection of f(i) for all i in [k] is the empty set. Where [n] = {1, 2, ..., n}, P([n]) is the power set of [n] and {} is the empty set. - Geoffrey Critzer, Feb 28 2009
a(n) = A064614(A000079(n)) and A064614(m)A000079(n). - Reinhard Zumkeller, Feb 08 2010
3^(n+1) = (1, 2, 2, 2, ...) dot (1, 1, 3, 9, ..., 3^n); e.g., 3^3 = 27 = (1, 2, 2, 2) dot (1, 1, 3, 9) = (1 + 2 + 6 + 18). - Gary W. Adamson, May 17 2010
a(n) is the number of generalized compositions of n when there are 3*2^i different types of i, (i = 1, 2, ...). - Milan Janjic, Sep 24 2010
For n >= 1, a(n-1) is the number of generalized compositions of n when there are 2^(i-1) different types of i, (i = 1, 2, ...). - Milan Janjic, Sep 24 2010
The sequence in question ("Powers of 3") also describes the number of moves of the k-th disk solving the [RED ; BLUE ; BLUE] or [RED ; RED ; BLUE] pre-colored Magnetic Tower of Hanoi puzzle (cf. A183111 - A183125).
a(n) is the number of Stern polynomials of degree n. See A057526. - T. D. Noe, Mar 01 2011
Positions of records in the number of odd prime factors, A087436. - Juri-Stepan Gerasimov, Mar 17 2011
Sum of coefficients of the expansion of (1+x+x^2)^n. - Adi Dani, Jun 21 2011
a(n) is the number of compositions of n elements among {0, 1, 2}; e.g., a(2) = 9 since there are the 9 compositions 0 + 0, 0 + 1, 1 + 0, 0 + 2, 1 + 1, 2 + 0, 1 + 2, 2 + 1, and 2 + 2. [From Adi Dani, Jun 21 2011; modified by editors.]
Except the first two terms, these are odd numbers n such that no x with 2 <= x <= n - 2 satisfy x^(n-1) == 1 (mod n). - Arkadiusz Wesolowski, Jul 03 2011
The compositions of n in which each natural number is colored by one of p different colors are called p-colored compositions of n. For n >= 1, a(n) equals the number of 3-colored compositions of n such that no adjacent parts have the same color. - Milan Janjic, Nov 17 2011
Explanation from David Applegate, Feb 20 2017: (Start)
Since the preceding comment appears in a large number of sequences, it might be worth adding a proof.
The number of compositions of n into exactly k parts is binomial(n-1,k-1).
For a p-colored composition of n such that no adjacent parts have the same color, there are exactly p choices for the color of the first part, and p-1 choices for the color of each additional part (any color other than the color of the previous one). So, for a partition into k parts, there are p (p-1)^(k-1) valid colorings.
Thus the number of p-colored compositions of n into exactly k parts such that no adjacent parts have the same color is binomial(n-1,k-1) p (p-1)^(k-1).
The total number of p-colored compositions of n such that no adjacent parts have the same color is then
Sum_{k=1..n} binomial(n-1,k-1) * p * (p-1)^(k-1) = p^n.
To see this, note that the binomial expansion of ((p - 1) + 1)^(n - 1) = Sum_{k = 0..n - 1} binomial(n - 1, k) (p - 1)^k 1^(n - 1 - k) = Sum_{k = 1..n} binomial(n - 1, k - 1) (p - 1)^(k - 1).
(End)
Also, first and least element of the matrix [1, sqrt(2); sqrt(2), 2]^(n+1). - M. F. Hasler, Nov 25 2011
One-half of the row sums of the triangular version of A035002. - J. M. Bergot, Jun 10 2013
Form an array with m(0,n) = m(n,0) = 2^n; m(i,j) equals the sum of the terms to the left of m(i,j) and the sum of the terms above m(i,j), which is m(i,j) = Sum_{k=0..j-1} m(i,k) + Sum_{k=0..i-1} m(k,j). The sum of the terms in antidiagonal(n+1) = 4*a(n). - J. M. Bergot, Jul 10 2013
a(n) = A007051(n+1) - A007051(n), and A007051 are the antidiagonal sums of an array defined by m(0,k) = 1 and m(n,k) = Sum_{c = 0..k - 1} m(n, c) + Sum_{r = 0..n - 1} m(r, k), which is the sum of the terms to left of m(n, k) plus those above m(n, k). m(1, k) = A000079(k); m(2, k) = A045623(k + 1); m(k + 1, k) = A084771(k). - J. M. Bergot, Jul 16 2013
Define an array to have m(0,k) = 2^k and m(n,k) = Sum_{c = 0..k - 1} m(n, c) + Sum_{r = 0..n - 1} m(r, k), which is the sum of the terms to the left of m(n, k) plus those above m(n, k). Row n = 0 of the array comprises A000079, column k = 0 comprises A011782, row n = 1 comprises A001792. Antidiagonal sums of the array are a(n): 1 = 3^0, 1 + 2 = 3^1, 2 + 3 + 4 = 3^2, 4 + 7 + 8 + 8 = 3^3. - J. M. Bergot, Aug 02 2013
The sequence with interspersed zeros and o.g.f. x/(1 - 3*x^2), A(2*k) = 0, A(2*k + 1) = 3^k = a(k), k >= 0, can be called hexagon numbers. This is because the algebraic number rho(6) = 2*cos(Pi/6) = sqrt(3) of degree 2, with minimal polynomial C(6, x) = x^2 - 3 (see A187360, n = 6), is the length ratio of the smaller diagonal and the side in the hexagon. Hence rho(6)^n = A(n-1)*1 + A(n)*rho(6), in the power basis of the quadratic number field Q(rho(6)). One needs also A(-1) = 1. See also a Dec 02 2010 comment and the P. Steinbach reference given in A049310. - Wolfdieter Lang, Oct 02 2013
Numbers k such that sigma(3k) = 3k + sigma(k). - Jahangeer Kholdi, Nov 23 2013
All powers of 3 are perfect totient numbers (A082897), since phi(3^n) = 2 * 3^(n - 1) for n > 0, and thus Sum_{i = 0..n} phi(3^i) = 3^n. - Alonso del Arte, Apr 20 2014
The least number k > 0 such that 3^k ends in n consecutive decreasing digits is a 3-term sequence given by {1, 13, 93}. The consecutive increasing digits are {3, 23, 123}. There are 100 different 3-digit endings for 3^k. There are no k-values such that 3^k ends in '012', '234', '345', '456', '567', '678', or '789'. The k-values for which 3^k ends in '123' are given by 93 mod 100. For k = 93 + 100*x, the digit immediately before the run of '123' is {9, 5, 1, 7, 3, 9, 5, 1, 3, 7, ...} for x = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, ...}, respectively. Thus we see the digit before '123' will never be a 0. So there are no further terms. - Derek Orr, Jul 03 2014
All elements of A^n where A = (1, 1, 1; 1, 1, 1; 1, 1, 1). - David Neil McGrath, Jul 23 2014
Counts all walks of length n (open or closed) on the vertices of a triangle containing a loop at each vertex starting from any given vertex. - David Neil McGrath, Oct 03 2014
a(n) counts walks (closed) on the graph G(1-vertex;1-loop,1-loop,1-loop). - David Neil McGrath, Dec 11 2014
2*a(n-2) counts all permutations of a solitary closed walk of length (n) from the vertex of a triangle that contains 2 loops on each of the remaining vertices. In addition, C(m,k)=2*(2^m)*B(m+k-2,m) counts permutations of walks that contain (m) loops and (k) arcs. - David Neil McGrath, Dec 11 2014
a(n) is the sum of the coefficients of the n-th layer of Pascal's pyramid (a.k.a., Pascal's tetrahedron - see A046816). - Bob Selcoe, Apr 02 2016
Numbers n such that the trinomial x^(2*n) + x^n + 1 is irreducible over GF(2). Of these only the trinomial for n=1 is primitive. - Joerg Arndt, May 16 2016
Satisfies Benford's law [Berger-Hill, 2011]. - N. J. A. Sloane, Feb 08 2017
a(n-1) is also the number of compositions of n if the parts can be runs of any length from 1 to n, and can contain any integers from 1 to n. - Gregory L. Simay, May 26 2017
Also the number of independent vertex sets and vertex covers in the n-ladder rung graph n P_2. - Eric W. Weisstein, Sep 21 2017
Also the number of (not necessarily maximal) cliques in the n-cocktail party graph. - Eric W. Weisstein, Nov 29 2017
a(n-1) is the number of 2-compositions of n; see Hopkins & Ouvry reference. - Brian Hopkins, Aug 15 2020
a(n) is the number of faces of any dimension (vertices, edges, square faces, etc.) of the n-dimensional hypercube. For example, the 0-dimensional hypercube is a point, and its only face is itself. The 1-dimensional hypercube is a line, which has two vertices and an edge. The 2-dimensional hypercube is a square, which has four vertices, four edges, and a square face. - Kevin Long, Mar 14 2023
Number of pairs (A,B) of subsets of M={1,2,...,n} with union(A,B)=M. For nonempty subsets cf. A058481. - Manfred Boergens, Mar 28 2023
From Jianing Song, Sep 27 2023: (Start)
a(n) is the number of disjunctive clauses of n variables up to equivalence. A disjunctive clause is a propositional formula of the form l_1 OR ... OR l_m, where l_1, ..., l_m are distinct elements in {x_1, ..., x_n, NOT x_1, ..., NOT x_n} for n variables x_1, ... x_n, and no x_i and NOT x_i appear at the same time. For each 1 <= i <= n, we can have neither of x_i or NOT x_i, only x_i or only NOT x_i appearing in a disjunctive clause, so the number of such clauses is 3^n. Viewing the propositional formulas of n variables as functions {0,1}^n -> {0,1}, a disjunctive clause corresponds to a function f such that the inverse image of 0 is of the form A_1 X ... X A_n, where A_i is nonempty for all 1 <= i <= n. Since each A_i has 3 choices ({0}, {1} or {0,1}), we also find that the number of disjunctive clauses of n variables is 3^n.
Equivalently, a(n) is the number of conjunctive clauses of n variables. (End)
The finite subsequence a(2), a(3), a(4), a(5) = 9, 27, 81, 243 is one of only two geometric sequences that can be formed with all interior angles (all integer, in degrees) of a simple polygon. The other sequence is a subsequence of A007283 (see comment there). - Felix Huber, Feb 15 2024

Examples

			G.f. = 1 + 3*x + 9*x^2 + 27*x^3 + 81*x^4 + 243*x^5 + 729*x^6 + 2187*x^7 + ...
		

References

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

Crossrefs

Cf. A008776 (2*a(n), and first differences).
a(n) = A092477(n, 2) for n > 0.
a(n) = A159991(n) / A009964(n).
Cf. A100772, A035002. Row sums of A125076 and A153279.
a(n) = A217764(0, n).
Cf. A046816, A006521, A014945, A275414 (multisets).
The following are parallel families: A000079 (2^n), A004094 (2^n reversed), A028909 (2^n sorted up), A028910 (2^n sorted down), A036447 (double and reverse), A057615 (double and sort up), A263451 (double and sort down); A000244 (3^n), A004167 (3^n reversed), A321540 (3^n sorted up), A321539 (3^n sorted down), A163632 (triple and reverse), A321542 (triple and sort up), A321541 (triple and sort down).

Programs

Formula

a(n) = 3^n.
a(0) = 1; a(n) = 3*a(n-1).
G.f.: 1/(1-3*x).
E.g.f.: exp(3*x).
a(n) = n!*Sum_{i + j + k = n, i, j, k >= 0} 1/(i!*j!*k!). - Benoit Cloitre, Nov 01 2002
a(n) = Sum_{k = 0..n} 2^k*binomial(n, k), binomial transform of A000079.
a(n) = A090888(n, 2). - Ross La Haye, Sep 21 2004
a(n) = 2^(2n) - A005061(n). - Ross La Haye, Sep 10 2005
a(n) = A112626(n, 0). - Ross La Haye, Jan 11 2006
Hankel transform of A007854. - Philippe Deléham, Nov 26 2006
a(n) = 2*StirlingS2(n+1,3) + StirlingS2(n+2,2) = 2*(StirlingS2(n+1,3) + StirlingS2(n+1,2)) + 1. - Ross La Haye, Jun 26 2008
a(n) = 2*StirlingS2(n+1, 3) + StirlingS2(n+2, 2) = 2*(StirlingS2(n+1, 3) + StirlingS2(n+1, 2)) + 1. - Ross La Haye, Jun 09 2008
Sum_{n >= 0} 1/a(n) = 3/2. - Gary W. Adamson, Aug 29 2008
If p(i) = Fibonacci(2i-2) and if A is the Hessenberg matrix of order n defined by A(i, j) = p(j-i+1), (i <= j), A(i, j) = -1, (i = j+1), and A(i, j) = 0 otherwise, then, for n >= 1, a(n-1) = det A. - Milan Janjic, May 08 2010
G.f. A(x) = M(x)/(1-M(x))^2, M(x) - o.g.f for Motzkin numbers (A001006). - Vladimir Kruchinin, Aug 18 2010
a(n) = A133494(n+1). - Arkadiusz Wesolowski, Jul 27 2011
2/3 + 3/3^2 + 2/3^3 + 3/3^4 + 2/3^5 + ... = 9/8. [Jolley, Summation of Series, Dover, 1961]
a(n) = Sum_{k=0..n} A207543(n,k)*4^(n-k). - Philippe Deléham, Feb 25 2012
a(n) = Sum_{k=0..n} A125185(n,k). - Philippe Deléham, Feb 26 2012
Sum_{n > 0} Mobius(n)/a(n) = 0.181995386702633887827... (see A238271). - Alonso del Arte, Aug 09 2012. See also the sodium 3s orbital energy in table V of J. Chem. Phys. 53 (1970) 348.
a(n) = (tan(Pi/3))^(2*n). - Bernard Schott, May 06 2022
a(n-1) = binomial(2*n-1, n) + Sum_{k >= 1} binomial(2*n, n+3*k)*(-1)^k. - Greg Dresden, Oct 14 2022
G.f.: Sum_{k >= 0} x^k/(1-2*x)^(k+1). - Kevin Long, Mar 14 2023

A001047 a(n) = 3^n - 2^n.

Original entry on oeis.org

0, 1, 5, 19, 65, 211, 665, 2059, 6305, 19171, 58025, 175099, 527345, 1586131, 4766585, 14316139, 42981185, 129009091, 387158345, 1161737179, 3485735825, 10458256051, 31376865305, 94134790219, 282412759265, 847255055011, 2541798719465, 7625463267259, 22876524019505
Offset: 0

Views

Author

Keywords

Comments

a(n+1) is the sum of the elements in the n-th row of triangle pertaining to A036561. - Amarnath Murthy, Jan 02 2002
Number of 2 X n binary arrays with a path of adjacent 1's and no path of adjacent 0's from top row to bottom row. - R. H. Hardin, Mar 21 2002
With offset 1, partial sums of A027649. - Paul Barry, Jun 24 2003
Number of distinct lines through the origin in the n-dimensional lattice of side length 2. A049691 has the values for the 2-dimensional lattice of side length n. - Joshua Zucker, Nov 19 2003
a(n+1)/(n+1)=(3*3^n-2*2^n)/(n+1) is the second binomial transform of the harmonic sequence 1/(n+1). - Paul Barry, Apr 19 2005
a(n+1) is the sum of n-th row of A036561. - Reinhard Zumkeller, May 14 2006
The sequence gives the sum of the lengths of the segments in Cantor's dust generating sequence up to the i-th step. Measurement unit = length of the segment of i-th step. - Giorgio Balzarotti, Nov 18 2006
Let T be a binary relation on the power set P(A) of a set A having n = |A| elements such that for every element x, y of P(A), xTy if x is a proper subset of y. Then a(n) = |T|. - Ross La Haye, Dec 22 2006
From Alexander Adamchuk, Jan 04 2007: (Start)
a(n) is prime for n in A057468.
p divides a(p) - 1 for prime p.
Quotients (3^p - 2^p - 1)/p, where p = prime(n), are listed in A127071.
Numbers k such that k divides 3^k - 2^k - 1 are listed in A127072.
Pseudoprimes in A127072(n) include all powers of primes {2,3,7} and some composite numbers that are listed in A127073, which includes all Carmichael numbers A002997.
Numbers n such that n^2 divides 3^n - 2^n - 1 are listed in A127074.
5 divides a(2n).
5^2 divides a(2*5n).
5^3 divides a(2*5^2n).
5^4 divides a(2*5^3n).
7^2 divides a(6*7n).
13 divides a(4n).
13^2 divides a(4*13n).
19 divides a(3n).
19^2 divides a(3*19n).
23^2 divides a(11n).
23^3 divides a(11*23n).
23^4 divides a(11*23^2n).
29 divides a(7n).
p divides a((p-1)n) for prime p>3.
p divides a((p-1)/2) for prime p in A097934. Also primes p such that 6 is a square mod p, except {2,3}, A038876(n).
p^(k+1) divides a(p^k*(p-1)/2*n) for prime p in A097934.
p^(k+1) divides a(p^k*(p-1)*n) for prime p>3.
Note the exception that for p = 23, p^(k+2) divides a(p^k*(p-1)/2*n).
There are no more such exceptions for primes p up to 600000. (End)
a(n) divides a(q*(n+1)-1), for all q integer. Leonardo Sarasua, Apr 15 2024
Final digits of terms follow sequence 1,5,9,5. - Enoch Haga, Nov 26 2007
This is also the second column sequence of the Sheffer triangle A143494 (2-restricted Stirling2 numbers). See the e.g.f. given below. - Wolfdieter Lang, Oct 08 2011
Partial sums give A000392. - Jon Perry, Apr 05 2014
For n >= 1, this is also row 2 of A281890: when consecutive positive integers are written as a product of primes in nondecreasing order, "3" occurs in n-th position a(n) times out of every 6^n. - Peter Munn, May 17 2017
a(n) is the number of ternary sequences of length n which include the digit 2. For example, a(2)=5 since the sequences are 02,20,12,21,22. - Enrique Navarrete, Apr 05 2021
a(n-1) is the number of ways we can form disjoint unions of two nonempty subsets of [n] such that the union contains n. For example, for n = 3, a(2) = 5 since the disjoint unions are {1}U{3}, {1}U{2,3}, {2}U{3}, {2}U{1,3}, and {1,2}U{3}. Cf. A000392 if we drop the requirement that the union contains n. - Enrique Navarrete, Aug 24 2021
Configures as a composite Koch Snowflake Fractal (see illustration in links) based on the five-fold division of the Cantor Square/Cantor Dust Fractal of (9^n-4^n)/5 see my illustration in (A016153). - John Elias, Oct 13 2021
Number of pairs (A,B) where B is a subset of {1,2,...,n} and A is a proper subset of B. - Jianing Song, Jun 18 2022
From Manfred Boergens, Mar 29 2023: (Start)
With regard to the comments by Ross La Haye and Jianing Song: Omitting "proper" gives A000244.
Number of pairs (A,B) where B is a nonempty subset of {1,2,...,n} and A is a nonempty subset of B. For nonempty proper subsets see a(n+1) in A028243. (End)
a(n) is the number of n-digit numbers whose smallest decimal digit is 7. - Stefano Spezia, Nov 15 2023
a(n-1) is the number of all possible player-reduced binary games observed by each player in an nx2 game assuming the individual strategies of k < n - 1 players are fixed and the remaining n - k - 1 player will play as one, either maintaining their status quo strategies or jointly adopting an alternative strategy. - Ambrosio Valencia-Romero, Apr 11 2024

References

  • John H. Conway and Richard K. Guy, The Book of Numbers, New York: Springer-Verlag, 1996. See pp. 86-87.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

a(n) = row sums of A091913, row 2 of A047969, column 1 of A090888 and column 1 of A038719.
Cf. partitions: A241766, A241759.
A diagonal of A262307.

Programs

  • Haskell
    a001047 n = a001047_list !! n
    a001047_list = map fst $ iterate (\(u, v) -> (3 * u + v, 2 * v)) (0, 1)
    -- Reinhard Zumkeller, Jun 09 2013
  • Magma
    [3^n - 2^n: n in [0..30]]; // Vincenzo Librandi, Jul 17 2011
    
  • Maple
    seq(3^n - 2^n, n=0..40); # Giorgio Balzarotti, Nov 18 2006
    A001047:=1/(3*z-1)/(2*z-1); # Simon Plouffe in his 1992 dissertation, dropping the initial zero
  • Mathematica
    Table[ 3^n - 2^n, {n, 0, 25} ]
    LinearRecurrence[{5, -6}, {0, 1}, 25] (* Harvey P. Dale, Aug 18 2011 *)
    Numerator@NestList[(3#+1)/2&,1/2,100] (* Zak Seidov, Oct 03 2011 *)
  • PARI
    {a(n) = 3^n - 2^n};
    
  • Python
    [3**n - 2**n for n in range(25)] # Ross La Haye, Aug 19 2005; corrected by David Radcliffe, Jun 26 2016
    
  • Sage
    [lucas_number1(n, 5, 6) for n in range(26)]  # Zerinvary Lajos, Apr 22 2009
    

Formula

G.f.: x/((1-2*x)*(1-3*x)).
a(n) = 5*a(n-1) - 6*a(n-2).
a(n) = 3*a(n-1) + 2^(n-1). - Jon Perry, Aug 23 2002
Starting 0, 0, 1, 5, 19, ... this is 3^n/3 - 2^n/2 + 0^n/6, the binomial transform of A086218. - Paul Barry, Aug 18 2003
a(n) = A083323(n)-1 = A056182(n)/2 = (A002783(n)-1)/2 = (A003063(n+2)-A003063(n+1))/2. - Ralf Stephan, Jan 12 2004
Binomial transform of A000225. - Ross La Haye, Feb 07 2005
a(n) = Sum_{k=0..n-1} binomial(n, k)*2^k. - Ross La Haye, Aug 20 2005
a(n) = 2^(2n) - A083324(n). - Ross La Haye, Sep 10 2005
a(n) = A112626(n, 1). - Ross La Haye, Jan 11 2006
E.g.f.: exp(3*x) - exp(2*x). - Mohammad K. Azarian, Jan 14 2009
a(n) = A217764(n,1). - Ross La Haye, Mar 27 2013
a(n) = 2*a(n-1) + 3^(n-1). - Toby Gottfried, Mar 28 2013
a(n) = A000244(n) - A000079(n). - Omar E. Pol, Mar 28 2013
a(n) = Sum_{k=0..2} Stirling1(2,k)*(k+1)^n = c_2^{(-n)}, poly-Cauchy numbers. - Takao Komatsu, Mar 28 2013
a(n) = A227048(n,A098294(n)). - Reinhard Zumkeller, Jun 30 2013
a(n+1) = Sum_{k=0..n} 2^k*3^(n-k). - J. M. Bergot, Mar 27 2018
Sum_{n>=1} 1/a(n) = A329064. - Amiram Eldar, Nov 20 2020
a(n) = (1/2)*Sum_{k=0..n} binomial(n, k)*(2^(n-k) + 2^k - 2).
a(n) = A001117(n) + 2*A000918(n) + 1. - Ambrosio Valencia-Romero, Mar 08 2022
a(n) = A000225(n) + A028243(n+1). - Ambrosio Valencia-Romero, Mar 09 2022
From Peter Bala, Jun 27 2025: (Start)
exp(Sum_{n >=1} a(2*n)/a(n)*x^n/n) = Sum_{n >= 0} a(n+1)*x^n.
exp(Sum_{n >=1} a(3*n)/a(n)*x^n/n) = 1 + 19*x + 247*x^2 + ... is the g.f. of A019443.
exp(Sum_{n >=1} a(4*n)/a(n)*x^n/n) = 1 + 65*x + 2743*x^2 + ... is the g.f. of A383754.
The following are all examples of telescoping series:
Sum_{n >= 1} 6^n/(a(n)*a(n+1)) = 2, since 6^n/(a(n)*a(n+1)) = b(n) - b(n+1), where b(n) = 2^n/a(n);
Sum_{n >= 1} 18^n/(a(n)*a(n+1)*a(n+2)) = 22/75, since 18^n/(a(n)*a(n+1)*a(n+2)) = c(n) - c(n+1), where c(n) = (5*6^n - 2*4^n)/(15*a(n)*a(n+1));
Sum_{n >= 1} 54^n/(a(n)*a(n+1)*a(n+2)*a(n+3)) = 634/48735 since 54^n/(a(n)*a(n+1)*a(n+2)*a(n+3)) = d(n) - d(n+1), where d(n) = (57*18^n - 38*12^n + 8*8^n)/(513*a(n)*a(n+1)*a(n+2)).
Sum_{n >= 1} 6^n/(a(n)*a(n+2)) = 14/25; Sum_{n >= 1} (-6)^n/(a(n)*a(n+2)) = -6/25.
Sum_{n >= 1} 6^n/(a(n)*a(n+3)) = 306/1805.
Sum_{n >= 1} 6^n/(a(n)*a(n+4)) = 4282/80275; Sum_{n >= 1} (-6)^n/(a(n)*a(n+4)) = -1698/80275. (End)

Extensions

Edited by Charles R Greathouse IV, Mar 24 2010

A000392 Stirling numbers of second kind S(n,3).

Original entry on oeis.org

0, 0, 0, 1, 6, 25, 90, 301, 966, 3025, 9330, 28501, 86526, 261625, 788970, 2375101, 7141686, 21457825, 64439010, 193448101, 580606446, 1742343625, 5228079450, 15686335501, 47063200806, 141197991025, 423610750290, 1270865805301
Offset: 0

Views

Author

Keywords

Comments

Number of palindromic structures using exactly three different symbols; Mobius transform: A056279. - Marks R. Nester
Number of ways of placing n labeled balls into k=3 indistinguishable boxes. - Thomas Wieder, Nov 30 2004
With two leading zeros, this is the second binomial transform of cosh(x)-1 and the binomial transform of A000225 (with extra leading zero). - Paul Barry, May 13 2003
Let [m] denote the first m positive integers. Then a(n) is the number of functions f from [n] to [n+1] that satisfy (i) f(x) > x for all x, (ii) f(x) = n+1 for exactly 3 elements and (iii) f(f(x)) = n+1 for the remaining n-3 elements of [n]. For example, a(4)=6 since there are exactly 6 functions from {1,2,3,4} to {1,2,3,4,5} such that f(x) > x, f(x) = 5 for 3 elements and f(f(x)) = 5 for the remaining element. The functions are f1 = {(1,5), (2,5), (3,4), (4,5)}, f2 = {(1,5), (2,3), (3,5), (4,5)}, f3 = {(1,5), (2,4), (3,5), (4,5)}, f4 = {(1,2), (2,5), (3,5), (4,5)}, f5 = {(1,3), (2,5), (3,5), (4,5)}, f6 = {(1,4), (2,5), (3,5), (4,5)}. - Dennis P. Walsh, Feb 20 2007
Conjecture. Let S(1)={1} and, for n > 1, let S(n) be the smallest set containing x, 2x and 3x for each element x in S(n-1). Then a(n+2) is the sum of the elements in S(n). (It is easy to prove that the number of elements in S(n) is the n-th triangular number given by A001952.) See A122554 for a sequence defined in this way. - John W. Layman, Nov 21 2007; corrected (a(n) to a(n+2) due to offset change) by Fred Daniel Kline, Oct 02 2014
Let P(A) be the power set of an n-element set A. Then a(n+1) = the number of pairs of elements {x,y} of P(A) for which x and y are disjoint and for which x is not a subset of y and y is not a subset of x. Wieder calls these "disjoint strict 2-combinations". - Ross La Haye, Jan 11 2008; corrected by Ross La Haye, Oct 29 2008
Also, let P(A) be the power set of an n-element set A. Then a(n+2) = the number of pairs of elements {x,y} of P(A) for which either 0) x and y are disjoint and for which either x is a subset of y or y is a subset of x, or 1) x and y are disjoint and for which x is not a subset of y and y is not a subset of x, or 2) x and y are intersecting and for which either x is a proper subset of y or y is a proper subset of x. - Ross La Haye, Jan 11 2008
3 * a(n+1) = p(n+1) where p(x) is the unique degree-n polynomial such that p(k) = a(k+1) for k = 0, 1, ..., n. - Michael Somos, Apr 29 2012
John W. Layman's conjecture that a(n+2) is the sum of elements in S(n) follows from the identification of S(n) with the first n rows of A036561, whose row sums are A001047. - Fred Daniel Kline, Oct 02 2014
From M. Sinan Kul, Sep 08 2016: (Start)
Let m be equal to the product of n-1 distinct primes. Then a(n) is equal to the number of distinct fractions >=1 that may be created by dividing a divisor of m by another divisor. For example for m = 2*3*5 = 30, we would have the following 6 fractions: 6/5, 3/2, 5/3, 5/2, 10/3, 15/2.
Here finding the number of fractions would be equivalent to distributing n-1 balls (distinct primes) to two bins (numerator and denominator) with no empty bins which can be found by Stirling numbers of the second kind. So another definition for a(n) is a(n) = Sum_{i=2..n-1} Stirling2(i,2)*binomial(n-1,i).
Also for n > 0, a(n) = (d(m^2)+1)/2 - d(m) where m is equal to the product of n-1 distinct primes. Example for a(5): m = 2*3*5*7 = 210 (product of four distinct primes) so a(5) = (d(210^2)+1)/2 - d(210) = 41 - 16 = 25. (End)
6*a(n) is the number of ternary strings of length n that contain at least one of each of the 3 symbols on which they are defined. For example, for n=4, the strings are the 12 permutations of 0012, the 12 permutations of 0112, and the 12 permutations of 0122. - Enrique Navarrete, Aug 23 2021
A simpler form of La Haye's first comment is: a(n+1) is the number of ways we can form disjoint unions of two nonempty subsets of [n] (see example below). Cf. A001047 for the requirement that the union contains n. - Enrique Navarrete, Aug 24 2021
As partial sums of the Nicomachus triangle's rows and the differences of the powers of 3 and 2 (A001047), each iteration corresponds to two figurate variations of the Sierpinski triangle (3^n) with cross-correlation to the Nicomachus triangle, see illustrations in links. The Sierpinski half-hexagons of (A001047) stack and conform to the footprint of 2^n - 1 triangular numbers. The 3^n Sierpinski triangle minus its 2^n bottom row, also correlates to the Nicomachus triangle according to each Sierpinski triangular sub-row. - John Elias, Oct 04 2021

Examples

			a(4) = 6. Let denote Z[i] the i-th labeled element = "ball". Then one has for n=4 six different ways to fill sets = "boxes" with the labeled elements:
Set(Set(Z[3], Z[4]), Set(Z[1]), Set(Z[2])), Set(Set(Z[3], Z[1]), Set(Z[4]), Set(Z[2])), Set(Set(Z[4], Z[1]), Set(Z[3]), Set(Z[2])), Set(Set(Z[4]), Set(Z[1]), Set(Z[3], Z[2])), Set(Set(Z[3]), Set(Z[1], Z[2]), Set(Z[4])), Set(Set(Z[3]), Set(Z[1]), Set(Z[4], Z[2])).
G.f. = x^3 + 6*x^4 + 25*x^5 + 90*x^6 + 301*x^7 + 966*x^8 + 3025*x^9 + ...
For example, for n=3, a(4)=6 since the disjoint unions are: {1}U{2}, {1}U{3}, {1}U{2,3}, {2}U{3}, {2}U{1,3}, and {1,2}U{3}. - _Enrique Navarrete_, Aug 24 2021
		

References

  • M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 835.
  • F. N. David, M. G. Kendall and D. E. Barton, Symmetric Function and Allied Tables, Cambridge, 1966, p. 223.
  • 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]
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • GAP
    List([0..400], n->Stirling2(n,3)); # Muniru A Asiru, Feb 04 2018
  • Maple
    A000392 := n -> 9/2*3^n-4*2^n+1/2;  [ seq(9/2*3^n-4*2^n+1/2,n=0..30) ]; # Thomas Wieder
    A000392:=-1/(z-1)/(3*z-1)/(2*z-1); # Simon Plouffe in his 1992 dissertation
  • Mathematica
    StirlingS2[Range[0,30],3] (* Harvey P. Dale, Dec 29 2011 *)
  • PARI
    {a(n) = 3^(n-1) / 2 - 2^(n-1) + 1/2};
    
  • Sage
    [stirling_number2(i,3) for i in (0..40)] # Zerinvary Lajos, Jun 26 2008
    

Formula

G.f.: x^3/((1-x)*(1-2*x)*(1-3*x)).
E.g.f.: ((exp(x) - 1)^3) / 3!.
Recurrence: a(n+3) = 6*a(n+2) - 11*a(n+1) + 6*a(n), a(3) = 1, a(4) = 6, a(5) = 25. - Thomas Wieder, Nov 30 2004
With offset 0, this is 9*3^n/2 - 4*2^n + 1/2, the partial sums of 3*3^n - 2*2^n = A001047(n+1). - Paul Barry, Jun 26 2003
a(n) = (1 + 3^(n-1) - 2^n)/2, n > 0. - Dennis P. Walsh, Feb 20 2007
For n >= 3, a(n) = 3*a(n-1) + 2^(n-2) - 1. - Geoffrey Critzer, Mar 03 2009
a(n) = 5*a(n-1) - 6*a(n-2) + 1, for n > 3. - Vincenzo Librandi Nov 25 2010
a(n) = det(|s(i+3,j+2)|, 1 <= i,j <= n-3), where s(n,k) are Stirling numbers of the first kind. - Mircea Merca, Apr 06 2013
G.f.: x^3 + 12*x^4/(G(0)-12*x), where G(k) = x + 1 + 9*(3*x+1)*3^k - 8*(2*x+1)*2^k - x*(9*3^k+1-8*2^k)*(81*3^k+1-32*2^k)/G(k+1); (continued fraction). - Sergei N. Gladkovskii, Feb 01 2014
a(n + 2) = (1 - 2^(2 + n) + 3^(1 + n))/2 for n > 0. - Fred Daniel Kline, Oct 02 2014
For n > 0, a(n) = (1/2) * Sum_{k=1..n-1} Sum_{i=1..n-1} C(n-k-1,i) * C(n-1,k). - Wesley Ivan Hurt, Sep 22 2017
a(n) = Sum_{k=0..n-3} 2^(k-1)*(3^(n-2-k) - 1). - J. M. Bergot, Feb 05 2018

Extensions

Offset changed by N. J. A. Sloane, Feb 08 2008

A007582 a(n) = 2^(n-1)*(1+2^n).

Original entry on oeis.org

1, 3, 10, 36, 136, 528, 2080, 8256, 32896, 131328, 524800, 2098176, 8390656, 33558528, 134225920, 536887296, 2147516416, 8590000128, 34359869440, 137439215616, 549756338176, 2199024304128, 8796095119360, 35184376283136, 140737496743936, 562949970198528
Offset: 0

Views

Author

Keywords

Comments

Let G_n be the elementary Abelian group G_n = (C_2)^n for n >= 1: A006516 is the number of times the number -1 appears in the character table of G_n and A007582 is the number of times the number 1. Together the two sequences cover all the values in the table, i.e., A006516(n) + A007582(n) = 2^(2n). - Ahmed Fares (ahmedfares(AT)my-deja.com), Jun 01 2001
Number of walks of length 2n+1 between two adjacent vertices in the cycle graph C_8. Example: a(1)=3 because in the cycle ABCDEFGH we have three walks of length 3 between A and B: ABAB, ABCB and AHAB. - Emeric Deutsch, Apr 01 2004
Smallest number containing in its binary representation two equal non-overlapping subwords of length n: A097295(a(n))=n and A097295(m)Reinhard Zumkeller, Aug 04 2004
a(n)^2 + (A006516(n))^2 = a(2n). E.g., a(3) = 36, A006516(3) = 28, a(6) = 2080. 36^2 + 28^2 = 2080. - Gary W. Adamson, Jun 17 2006
Let P(A) be the power set of an n-element set A. Then a(n) = the number of pairs of elements {x,y} of P(A) for which either x equals y or x does not equal y. - Ross La Haye, Jan 02 2008
Let P(A) be the power set of an n-element set A. Then a(n) = the number of pairs of elements {x,y} of P(A). This is just a simpler statement of my previous comment for this sequence. - Ross La Haye, Jan 10 2008
For n>0: A000120(a(n))=2, A023414(a(n))=2*(n-1), A087117(a(n))=n-1. - Reinhard Zumkeller, Jun 23 2009
a(n+1) written in base 2: 11, 1010, 100100, 10001000, 1000010000, ..., i.e., number 1, n times 0, number 1, n times 0 (A163449(n)). - Jaroslav Krizek, Jul 27 2009
a(n) for n >= 1 is a bisection of A001445(n+1). - Jaroslav Krizek, Aug 14 2009
Related to A102573: letting T(q,r) be the coefficient of n^(r+1) in the polynomial 2^(q-n)/n times sum_{k=0..n} binomial(n,k)*k^q, then A007582(x)= sum_{k=0..x-1} T(x,k)*2^k. - John M. Campbell, Nov 16 2011
a(n) gives the number of pairs (r, s) such that 0 <= r <= s <= (2^n)-1 that satisfy AND(r, s, XOR(r, s)) = 0. - Ramasamy Chandramouli, Aug 30 2012
a(n) = A000217(2^n) = 2^(2n-1) + 2^(n-1) is the nearest triangular number above 2^(2n-1); cf. A006516, A233327. - Antti Karttunen, Feb 26 2014
Consider the quantum spin-1/2 chain with even number of sites L (physics, condensed matter theory). The spectrum of the Hamiltonian can be classified according to symmetries. If the only symmetry of the spin Hamiltonian is Parity, i.e., reflection with respect to the middle of the chain (see e.g. the transverse-field Ising model with open boundary conditions), then the dimension of the p=+1 parity sector is given by a(n) with n=L/2. - Marin Bukov, Mar 11 2016
a(n) is also the total number of words of length n, over an alphabet of four letters, of which one of them appears an even number of times. See the Lekraj Beedassy, Jul 22 2003, comment on A006516 (4-letter odd case), and the Balakrishnan reference there. For the 1- to 11-letter cases, see the crossrefs. - Wolfdieter Lang, Jul 17 2017
a(n) is the number of nonisomorphic spanning trees of the cyclic snake formed with n+1 copies of the cycle on 4 vertices. A cyclic snake is a connected graph whose block-cutpoint is a path and all its n blocks are isomorphic to the cycle C_m. - Christian Barrientos, Sep 05 2024
Also, with offset 1, the cogrowth sequence of the dihedral group with 16 elements, D8 = . - Sean A. Irvine, Nov 06 2024

References

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

Crossrefs

Cf. A006516.
Cf. A134308.
Cf. A102573.
The number of words of length n with m letters, one of them appearing an even number of times is for m = 1..11: A000035, A011782, A007051, A007582, A081186, A081187, A081188, A081189, A081190, A060531, A081192. - Wolfdieter Lang, Jul 17 2017

Programs

  • Magma
    [Binomial(2^n + 1, 2) : n in [0..30]]; // Wesley Ivan Hurt, Jul 03 2020
  • Maple
    seq(binomial(-2^n, 2), n=0..23); # Zerinvary Lajos, Feb 22 2008
  • Mathematica
    Table[ Binomial[2^n + 1, 2], {n, 0, 23}] (* Robert G. Wilson v, Jul 30 2004 *)
    LinearRecurrence[{6,-8},{1,3},30] (* Harvey P. Dale, Apr 08 2013 *)
  • Maxima
    A007582(n):=2^(n-1)*(1+2^n)$ makelist(A007582(n),n,0,30); /* Martin Ettl, Nov 15 2012 */
    
  • PARI
    a(n)=if(n<0,0,2^(n-1)*(1+2^n))
    
  • PARI
    a(n)=sum(k=-n\4,n\4,binomial(2*n+1,n+1+4*k))
    

Formula

G.f.: (1-3*x)/((1-2*x)*(1-4*x)). C(1+2^n, 2) where C(n, 2) is n-th triangular number A000217.
Binomial transform of A007051. Inverse binomial transform of A081186. - Paul Barry, Apr 07 2003
E.g.f.: exp(3*x)*cosh(x). - Paul Barry, Apr 07 2003
a(n) = Sum_{k=0..floor(n/2)} C(n, 2*k)*3^(n-2*k). - Paul Barry, May 08 2003
a(n+1) = 4*a(n) - 2^n; see also A049775. a(n) = 2^(n-1)*A000051(n). - Philippe Deléham, Feb 20 2004
a(n) = 6*a(n-1) - 8*a(n-2). - Emeric Deutsch, Apr 01 2004
Row sums of triangle A134308. - Gary W. Adamson, Oct 19 2007
a(n) = StirlingS2(2^n + 1,2^n) = 1 + 2*StirlingS2(n+1,2) + 3*StirlingS2(n+1,3) + 3*StirlingS2(n+1,4) = StirlingS2(n+2,2) + 3(StirlingS2(n+1,3) + StirlingS2(n+1,4)). - Ross La Haye, Mar 01 2008
a(n) = StirlingS2(2^n + 1,2^n) = 1 + 2*StirlingS2(n+1,2) + 3*StirlingS2(n+1,3) + 3*StirlingS2(n+1,4) = StirlingS2(n+2,2) + 3(StirlingS2(n+1,3) + StirlingS2(n+1,4)). - Ross La Haye, Apr 02 2008
a(n) = A000079(n) + A006516(n). - Yosu Yurramendi, Aug 06 2008
a(n) = A028403(n+1) / 4. - Jaroslav Krizek, Jul 27 2009
a(n) = Sum_{k=-floor(n/4)..floor(n/4)} binomial(2*n,n+4*k)/2. - Mircea Merca, Jan 28 2012
G.f.: Q(0)/2 where Q(k) = 1 + 2^k/(1 - 2*x/(2*x + 2^k/Q(k+1) )); (continued fraction ). - Sergei N. Gladkovskii, Apr 10 2013
a(n) = Sum_{k=1..2^n} k. - Joerg Arndt, Sep 01 2013
a(n) = (1/3) * Sum_{k=2^n..2^(n+1)} k. - J. M. Bergot, Jan 26 2015
a(n+1) = 2*a(n) + 4^n. - Yuchun Ji, Mar 10 2017

A028246 Triangular array a(n,k) = (1/k)*Sum_{i=0..k} (-1)^(k-i)*binomial(k,i)*i^n; n >= 1, 1 <= k <= n, read by rows.

Original entry on oeis.org

1, 1, 1, 1, 3, 2, 1, 7, 12, 6, 1, 15, 50, 60, 24, 1, 31, 180, 390, 360, 120, 1, 63, 602, 2100, 3360, 2520, 720, 1, 127, 1932, 10206, 25200, 31920, 20160, 5040, 1, 255, 6050, 46620, 166824, 317520, 332640, 181440, 40320, 1, 511, 18660, 204630, 1020600, 2739240, 4233600, 3780000, 1814400, 362880
Offset: 1

Views

Author

N. J. A. Sloane, Doug McKenzie (mckfam4(AT)aol.com)

Keywords

Comments

Let M = n X n matrix with (i,j)-th entry a(n+1-j, n+1-i), e.g., if n = 3, M = [1 1 1; 3 1 0; 2 0 0]. Given a sequence s = [s(0)..s(n-1)], let b = [b(0)..b(n-1)] be its inverse binomial transform and let c = [c(0)..c(n-1)] = M^(-1)*transpose(b). Then s(k) = Sum_{i=0..n-1} b(i)*binomial(k,i) = Sum_{i=0..n-1} c(i)*k^i, k=0..n-1. - Gary W. Adamson, Nov 11 2001
From Gary W. Adamson, Aug 09 2008: (Start)
Julius Worpitzky's 1883 algorithm generates Bernoulli numbers.
By way of example [Wikipedia]:
B0 = 1;
B1 = 1/1 - 1/2;
B2 = 1/1 - 3/2 + 2/3;
B3 = 1/1 - 7/2 + 12/3 - 6/4;
B4 = 1/1 - 15/2 + 50/3 - 60/4 + 24/5;
B5 = 1/1 - 31/2 + 180/3 - 390/4 + 360/5 - 120/6;
B6 = 1/1 - 63/2 + 602/3 - 2100/4 + 3360/5 - 2520/6 + 720/7;
...
Note that in this algorithm, odd n's for the Bernoulli numbers sum to 0, not 1, and the sum for B1 = 1/2 = (1/1 - 1/2). B3 = 0 = (1 - 7/2 + 13/3 - 6/4) = 0. The summation for B4 = -1/30. (End)
Pursuant to Worpitzky's algorithm and given M = A028246 as an infinite lower triangular matrix, M * [1/1, -1/2, 1/3, ...] (i.e., the Harmonic series with alternate signs) = the Bernoulli numbers starting [1/1, 1/2, 1/6, ...]. - Gary W. Adamson, Mar 22 2012
From Tom Copeland, Oct 23 2008: (Start)
G(x,t) = 1/(1 + (1-exp(x*t))/t) = 1 + 1 x + (2 + t)*x^2/2! + (6 + 6t + t^2)*x^3/3! + ... gives row polynomials for A090582, the f-polynomials for the permutohedra (see A019538).
G(x,t-1) = 1 + 1*x + (1 + t)*x^2 / 2! + (1 + 4t + t^2)*x^3 / 3! + ... gives row polynomials for A008292, the h-polynomials for permutohedra.
G[(t+1)x,-1/(t+1)] = 1 + (1+ t) x + (1 + 3t + 2 t^2) x^2 / 2! + ... gives row polynomials for the present triangle. (End)
The Worpitzky triangle seems to be an apt name for this triangle. - Johannes W. Meijer, Jun 18 2009
If Pascal's triangle is written as a lower triangular matrix and multiplied by A028246 written as an upper triangular matrix, the product is a matrix where the (i,j)-th term is (i+1)^j. For example,
1,0,0,0 1,1,1, 1 1,1, 1, 1
1,1,0,0 * 0,1,3, 7 = 1,2, 4, 8
1,2,1,0 0,0,2,12 1,3, 9,27
1,3,3,1 0,0,0, 6 1,4,16,64
So, numbering all three matrices' rows and columns starting at 0, the (i,j) term of the product is (i+1)^j. - Jack A. Cohen (ProfCohen(AT)comcast.net), Aug 03 2010
The Fi1 and Fi2 triangle sums are both given by sequence A000670. For the definition of these triangle sums see A180662. The mirror image of the Worpitzky triangle is A130850. - Johannes W. Meijer, Apr 20 2011
Let S_n(m) = 1^m + 2^m + ... + n^m. Then, for n >= 0, we have the following representation of S_n(m) as a linear combination of the binomial coefficients:
S_n(m) = Sum_{i=1..n+1} a(i+n*(n+1)/2)*C(m,i). E.g., S_2(m) = a(4)*C(m,1) + a(5)*C(m,2) + a(6)*C(m,3) = C(m,1) + 3*C(m,2) + 2*C(m,3). - Vladimir Shevelev, Dec 21 2011
Given the set X = [1..n] and 1 <= k <= n, then a(n,k) is the number of sets T of size k of subset S of X such that S is either empty or else contains 1 and another element of X and such that any two elemements of T are either comparable or disjoint. - Michael Somos, Apr 20 2013
Working with the row and column indexing starting at -1, a(n,k) gives the number of k-dimensional faces in the first barycentric subdivision of the standard n-dimensional simplex (apply Brenti and Welker, Lemma 2.1). For example, the barycentric subdivision of the 2-simplex (a triangle) has 1 empty face, 7 vertices, 12 edges and 6 triangular faces giving row 4 of this triangle as (1,7,12,6). Cf. A053440. - Peter Bala, Jul 14 2014
See A074909 and above g.f.s for associations among this array and the Bernoulli polynomials and their umbral compositional inverses. - Tom Copeland, Nov 14 2014
An e.g.f. G(x,t) = exp[P(.,t)x] = 1/t - 1/[t+(1-t)(1-e^(-xt^2))] = (1-t) * x + (-2t + 3t^2 - t^3) * x^2/2! + (6t^2 - 12t^3 + 7t^4 - t^5) * x^3/3! + ... for the shifted, reverse, signed polynomials with the first element nulled, is generated by the infinitesimal generator g(u,t)d/du = [(1-u*t)(1-(1+u)t)]d/du, i.e., exp[x * g(u,t)d/du] u eval. at u=0 generates the polynomials. See A019538 and the G. Rzadkowski link below for connections to the Bernoulli and Eulerian numbers, a Ricatti differential equation, and a soliton solution to the KdV equation. The inverse in x of this e.g.f. is Ginv(x,t) = (-1/t^2)*log{[1-t(1+x)]/[(1-t)(1-tx)]} = [1/(1-t)]x + [(2t-t^2)/(1-t)^2]x^2/2 + [(3t^2-3t^3+t^4)/(1-t)^3]x^3/3 + [(4t^3-6t^4+4t^5-t^6)/(1-t)^4]x^4/4 + ... . The numerators are signed, shifted A135278 (reversed A074909), and the rational functions are the columns of A074909. Also, dG(x,t)/dx = g(G(x,t),t) (cf. A145271). (Analytic G(x,t) added, and Ginv corrected and expanded on Dec 28 2015.) - Tom Copeland, Nov 21 2014
The operator R = x + (1 + t) + t e^{-D} / [1 + t(1-e^(-D))] = x + (1+t) + t - (t+t^2) D + (t+3t^2+2t^3) D^2/2! - ... contains an e.g.f. of the reverse row polynomials of the present triangle, i.e., A123125 * A007318 (with row and column offset 1 and 1). Umbrally, R^n 1 = q_n(x;t) = (q.(0;t)+x)^n, with q_m(0;t) = (t+1)^(m+1) - t^(m+1), the row polynomials of A074909, and D = d/dx. In other words, R generates the Appell polynomials associated with the base sequence A074909. For example, R 1 = q_1(x;t) = (q.(0;t)+x) = q_1(0;t) + q__0(0;t)x = (1+2t) + x, and R^2 1 = q_2(x;t) = (q.(0;t)+x)^2 = q_2(0:t) + 2q_1(0;t)x + q_0(0;t)x^2 = 1+3t+3t^2 + 2(1+2t)x + x^2. Evaluating the polynomials at x=0 regenerates the base sequence. With a simple sign change in R, R generates the Appell polynomials associated with A248727. - Tom Copeland, Jan 23 2015
For a natural refinement of this array, see A263634. - Tom Copeland, Nov 06 2015
From Wolfdieter Lang, Mar 13 2017: (Start)
The e.g.f. E(n, x) for {S(n, m)}{m>=0} with S(n, m) = Sum{k=1..m} k^n, n >= 0, (with undefined sum put to 0) is exp(x)*R(n+1, x) with the exponential row polynomials R(n, x) = Sum_{k=1..n} a(n, k)*x^k/k!. E.g., e.g.f. for n = 2, A000330: exp(x)*(1*x/1!+3*x^2/2!+2*x^3/3!).
The o.g.f. G(n, x) for {S(n, m)}{m >=0} is then found by Laplace transform to be G(n, 1/p) = p*Sum{k=1..n} a(n+1, k)/(p-1)^(2+k).
Hence G(n, x) = x/(1 - x)^(n+2)*Sum_{k=1..n} A008292(n,k)*x^(k-1).
E.g., n=2: G(2, 1/p) = p*(1/(p-1)^2 + 3/(p-1)^3 + 2/(p-1)^4) = p^2*(1+p)/(p-1)^4; hence G(2, x) = x*(1+x)/(1-x)^4.
This works also backwards: from the o.g.f. to the e.g.f. of {S(n, m)}_{m>=0}. (End)
a(n,k) is the number of k-tuples of pairwise disjoint and nonempty subsets of a set of size n. - Dorian Guyot, May 21 2019
From Rajesh Kumar Mohapatra, Mar 16 2020: (Start)
a(n-1,k) is the number of chains of length k in a partially ordered set formed from subsets of an n-element set ordered by inclusion such that the first term of the chains is either the empty set or an n-element set.
Also, a(n-1,k) is the number of distinct k-level rooted fuzzy subsets of an n-set ordered by set inclusion. (End)
The relations on p. 34 of Hasan (also p. 17 of Franco and Hasan) agree with the relation between A019538 and this entry given in the formula section. - Tom Copeland, May 14 2020
T(n,k) is the size of the Green's L-classes in the D-classes of rank (k-1) in the semigroup of partial transformations on an (n-1)-set. - Geoffrey Critzer, Jan 09 2023
T(n,k) is the number of strongly connected binary relations on [n] that have period k (A367948) and index 1. See Theorem 5.4.25(6) in Ki Hang Kim reference. - Geoffrey Critzer, Dec 07 2023

Examples

			The triangle a(n, k) starts:
n\k 1   2    3     4      5      6      7      8     9
1:  1
2:  1   1
3:  1   3    2
4:  1   7   12     6
5:  1  15   50    60     24
6:  1  31  180   390    360    120
7:  1  63  602  2100   3360   2520    720
8:  1 127 1932 10206  25200  31920  20160   5040
9:  1 255 6050 46620 166824 317520 332640 181440 40320
... [Reformatted by _Wolfdieter Lang_, Mar 26 2015]
-----------------------------------------------------
Row 5 of triangle is {1,15,50,60,24}, which is {1,15,25,10,1} times {0!,1!,2!,3!,4!}.
From _Vladimir Shevelev_, Dec 22 2011: (Start)
Also, for power sums, we have
S_0(n) = C(n,1);
S_1(n) = C(n,1) +    C(n,2);
S_2(n) = C(n,1) +  3*C(n,2) +  2*C(n,3);
S_3(n) = C(n,1) +  7*C(n,2) + 12*C(n,3) +  6*C(n,4);
S_4(n) = C(n,1) + 15*C(n,2) + 50*C(n,3) + 60*C(n,4) + 24*C(n,5); etc.
(End)
For X = [1,2,3], the sets T are {{}}, {{},{1,2}}, {{},{1,3}}, {{},{1,2,3}}, {{},{1,2},{1,2,3}}, {{},{1,3},{1,2,3}} and so a(3,1)=1, a(3,2)=3, a(3,3)=2. - _Michael Somos_, Apr 20 2013
		

References

  • Ki Hang Kim, Boolean Matrix Theory and Applications, Marcel Dekker, New York and Basel (1982).

Crossrefs

Dropping the column of 1's gives A053440.
Without the k in the denominator (in the definition), we get A019538. See also the Stirling number triangle A008277.
Row sums give A000629(n-1) for n >= 1.
Cf. A027642, A002445. - Gary W. Adamson, Aug 09 2008
Appears in A161739 (RSEG2 triangle), A161742 and A161743. - Johannes W. Meijer, Jun 18 2009
Binomial transform is A038719. Cf. A131689.
Cf. A119879.
From Rajesh Kumar Mohapatra, Mar 29 2020: (Start)
A000007(n-1) (column k=1), A000225(n-1) (column k=2), A028243(n-1) (column k=3), A028244(n-1) (column k=4), A028245(n-1) (column k=5), for n > 0.
Diagonal gives A000142(n-1), for n >=1.
Next-to-last diagonal gives A001710,
Third, fourth, fifth, sixth, seventh external diagonal respectively give A005460, A005461, A005462, A005463, A005464. (End)

Programs

  • GAP
    Flat(List([1..10], n-> List([1..n], k-> Stirling2(n,k)* Factorial(k-1) ))); # G. C. Greubel, May 30 2019
    
  • Magma
    [[StirlingSecond(n,k)*Factorial(k-1): k in [1..n]]: n in [1..10]]; // G. C. Greubel, May 30 2019
    
  • Maple
    a := (n,k) -> add((-1)^(k-i)*binomial(k,i)*i^n, i=0..k)/k;
    seq(print(seq(a(n,k),k=1..n)),n=1..10);
    T := (n,k) -> add(eulerian1(n,j)*binomial(n-j,n-k), j=0..n):
    seq(print(seq(T(n,k),k=0..n)),n=0..9); # Peter Luschny, Jul 12 2013
  • Mathematica
    a[n_, k_] = Sum[(-1)^(k-i) Binomial[k,i]*i^n, {i,0,k}]/k; Flatten[Table[a[n, k], {n, 10}, {k, n}]] (* Jean-François Alcover, May 02 2011 *)
  • PARI
    {T(n, k) = if( k<0 || k>n, 0, n! * polcoeff( (x / log(1 + x + x^2 * O(x^n) ))^(n+1), n-k))}; /* Michael Somos, Oct 02 2002 */
    
  • PARI
    {T(n,k) = stirling(n,k,2)*(k-1)!}; \\ G. C. Greubel, May 31 2019
    
  • Python
    # Assuming offset (n, k) = (0, 0).
    def T(n, k):
        if k >  n: return 0
        if k == 0: return 1
        return k*T(n - 1, k - 1) + (k + 1)*T(n - 1, k)
    for n in range(9):
        print([T(n, k) for k in range(n + 1)])  # Peter Luschny, Apr 26 2022
  • Sage
    def A163626_row(n) :
        x = polygen(ZZ,'x')
        A = []
        for m in range(0, n, 1) :
            A.append((-x)^m)
            for j in range(m, 0, -1):
                A[j - 1] = j * (A[j - 1] - A[j])
        return list(A[0])
    for i in (1..7) : print(A163626_row(i))  # Peter Luschny, Jan 25 2012
    
  • Sage
    [[stirling_number2(n,k)*factorial(k-1) for k in (1..n)] for n in (1..10)] # G. C. Greubel, May 30 2019
    

Formula

E.g.f.: -log(1-y*(exp(x)-1)). - Vladeta Jovovic, Sep 28 2003
a(n, k) = S2(n, k)*(k-1)! where S2(n, k) is a Stirling number of the second kind (cf. A008277). Also a(n,k) = T(n,k)/k, where T(n, k) = A019538.
Essentially same triangle as triangle [1, 0, 2, 0, 3, 0, 4, 0, 5, 0, 6, 0, 7, ...] DELTA [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, ...] where DELTA is Deléham's operator defined in A084938, but the notation is different.
Sum of terms in n-th row = A000629(n) - Gary W. Adamson, May 30 2005
The row generating polynomials P(n, t) are given by P(1, t)=t, P(n+1, t) = t(t+1)(d/dt)P(n, t) for n >= 1 (see the Riskin and Beckwith reference). - Emeric Deutsch, Aug 09 2005
From Gottfried Helms, Jul 12 2006: (Start)
Delta-matrix as can be read from H. Hasse's proof of a connection between the zeta-function and Bernoulli numbers (see link below).
Let P = lower triangular matrix with entries P[row,col] = binomial(row,col).
Let J = unit matrix with alternating signs J[r,r]=(-1)^r.
Let N(m) = column matrix with N(m)(r) = (r+1)^m, N(1)--> natural numbers.
Let V = Vandermonde matrix with V[r,c] = (r+1)^c.
V is then also N(0)||N(1)||N(2)||N(3)... (indices r,c always beginning at 0).
Then Delta = P*J * V and B' = N(-1)' * Delta, where B is the column matrix of Bernoulli numbers and ' means transpose, or for the single k-th Bernoulli number B_k with the appropriate column of Delta,
B_k = N(-1)' * Delta[ *,k ] = N(-1)' * P*J * N(k).
Using a single column instead of V and assuming infinite dimension, H. Hasse showed that in x = N(-1) * P*J * N(s), where s can be any complex number and s*zeta(1-s) = x.
His theorem reads: s*zeta(1-s) = Sum_{n>=0..inf} (n+1)^-1*delta(n,s), where delta(n,s) = Sum_{j=0..n} (-1)^j * binomial(n,j) * (j+1)^s.
(End)
a(n,k) = k*a(n-1,k) + (k-1)*a(n-1,k-1) with a(n,1) = 1 and a(n,n) = (n-1)!. - Johannes W. Meijer, Jun 18 2009
Rephrasing the Meijer recurrence above: Let M be the (n+1)X(n+1) bidiagonal matrix with M(r,r) = M(r,r+1) = r, r >= 1, in the two diagonals and the rest zeros. The row a(n+1,.) of the triangle is row 1 of M^n. - Gary W. Adamson, Jun 24 2011
From Tom Copeland, Oct 11 2011: (Start)
With e.g.f.. A(x,t) = G[(t+1)x,-1/(t+1)]-1 (from 2008 comment) = -1 + 1/[1-(1+t)(1-e^(-x))] = (1+t)x + (1+3t+2t^2)x^2/2! + ..., the comp. inverse in x is
B(x,t)= -log(t/(1+t)+1/((1+t)(1+x))) = (1/(1+t))x - ((1+2t)/(1+t)^2)x^2/2 + ((1+3t+3t^2)/(1+t)^3)x^3/3 + .... The numerators are the row polynomials of A074909, and the rational functions are (omitting the initial constants) signed columns of the re-indexed Pascal triangle A007318.
Let h(x,t)= 1/(dB/dx) = (1+x)(1+t(1+x)), then the row polynomial P(n,t) = (1/n!)(h(x,t)*d/dx)^n x, evaluated at x=0, A=exp(x*h(y,t)*d/dy) y, eval. at y=0, and dA/dx = h(A(x,t),t), with P(1,t)=1+t. (Series added Dec 29 2015.)(End)
Let denote the Eulerian numbers A173018(n,k), then T(n,k) = Sum_{j=0..n} *binomial(n-j,n-k). - Peter Luschny, Jul 12 2013
Matrix product A007318 * A131689. The n-th row polynomial R(n,x) = Sum_{k >= 1} k^(n-1)*(x/(1 + x))^k, valid for x in the open interval (-1/2, inf). Cf A038719. R(n,-1/2) = (-1)^(n-1)*(2^n - 1)*Bernoulli(n)/n. - Peter Bala, Jul 14 2014
a(n,k) = A141618(n,k) / C(n,k-1). - Tom Copeland, Oct 25 2014
For the row polynomials, A028246(n,x) = A019538(n-1,x) * (1+x). - Tom Copeland, Dec 28 2015
n-th row polynomial R(n,x) = (1+x) o (1+x) o ... o (1+x) (n factors), where o denotes the black diamond multiplication operator of Dukes and White. See example E11 in the Bala link. - Peter Bala, Jan 12 2018
From Dorian Guyot, May 21 2019: (Start)
Sum_{i=0..k} binomial(k,i) * a(n,i) = (k+1)^n.
Sum_{k=0..n} a(n,k) = 2*A000670(n).
(End)
With all offsets 0, let A_n(x;y) = (y + E.(x))^n, an Appell sequence in y where E.(x)^k = E_k(x) are the Eulerian polynomials of A123125. Then the row polynomials of this entry, A028246, are given by x^n * A_n(1 + 1/x;0). Other specializations of A_n(x;y) give A046802, A090582, A119879, A130850, and A248727. - Tom Copeland, Jan 24 2020
The row generating polynomials R(n,x) = Sum_{i=1..n} a(n,i) * x^i satisfy the recurrence equation R(n+1,x) = R(n,x) + Sum_{k=0..n-1} binomial(n-1,k) * R(k+1,x) * R(n-k,x) for n >= 1 with initial value R(1,x) = x. - Werner Schulte, Jun 17 2021

Extensions

Definition corrected by Li Guo, Dec 16 2006
Typo in link corrected by Johannes W. Meijer, Oct 17 2009
Error in title corrected by Johannes W. Meijer, Sep 24 2010
Edited by M. F. Hasler, Oct 29 2014

A163626 Triangle read by rows: The n-th derivative of the logistic function written in terms of y, where y = 1/(1 + exp(-x)).

Original entry on oeis.org

1, 1, -1, 1, -3, 2, 1, -7, 12, -6, 1, -15, 50, -60, 24, 1, -31, 180, -390, 360, -120, 1, -63, 602, -2100, 3360, -2520, 720, 1, -127, 1932, -10206, 25200, -31920, 20160, -5040, 1, -255, 6050, -46620, 166824, -317520, 332640, -181440, 40320, 1, -511, 18660
Offset: 0

Views

Author

Keywords

Comments

Apart from signs and offset, same as A028246. - Joerg Arndt, Nov 06 2016
Triangle T(n,k), read by rows, given by (1,0,2,0,3,0,4,0,5,0,6,0,7,0,8,0,9,...) DELTA (-1,-1,-2,-2,-3,-3,-4,-4,-5,-5,-6,-6,...) where DELTA is the operator defined in A084938. - Philippe Deléham, Nov 05 2011
The "Stirling-Bernoulli transform" maps a sequence b_0, b_1, b_2, ... to a sequence c_0, c_1, c_2, ..., where if B has o.g.f. B(x), c has e.g.f. exp(x)*B(1 - exp(x)). More explicity, c_n = Sum_{k = 0..n} A163626(n,k)*b_k. - Philippe Deléham, May 26 2015
Row sums of absolute values of terms give A000629. - Yahia DJEMMADA, Aug 16 2016
This is the triangle of connection constants for expressing the monomial polynomials (-x)^n as a linear combination of the basis polynomials {binomial(x+n,n)}n>=0, that is, (-x)^n = Sum_{k = 0..n} T(n,k)*binomial(x+k,k). Cf. A145901. - Peter Bala, Jun 06 2019
Row sums for n > 0 are zero. - Shel Kaphan, May 14 2024
The Akiyama-Tanigawa algorithm applied to a sequence yields the same result as the Stirling-Bernoulli Transform applied to the same sequence. See Philippe Deléham's comment of May 26 2015. - Shel Kaphan, May 16 2024

Examples

			y = 1/(1+exp(-x))
y^(0) = y
y^(1) = y-y^2
y^(2) = y-3*y^2+2*y^3
y^(3) = y-7*y^2+12*y^3-6*y^4
Triangle begins :
n\k 0     1     2     3     4     5    6
----------------------------------------
0:  1
1:  1    -1
2:  1    -3     2
3:  1    -7    12    -6
4:  1   -15    50   -60    24
5:  1   -31   180  -390   360  -120
6:  1   -63   602 -2100  3360 -2520  720
7:  1  -127 ... - Reformatted by _Philippe Deléham_, May 26 2015
Change of basis constants: x^4 = 1 - 15*binomial(x+1,1) + 50*binomial(x+2,2) - 60*binomial(x+3,3) + 24*binomial(x+4,4). - _Peter Bala_, Jun 06 2019
		

Crossrefs

Programs

  • Maple
    A163626 := (n, k) -> add((-1)^j*binomial(k, j)*(j+1)^n, j = 0..k):
    for n from 0 to 6 do seq(A163626(n, k), k = 0..n) od; # Peter Luschny, Sep 21 2017
  • Mathematica
    Derivative[0][y][x] = y[x]; Derivative[1][y][x] = y[x]*(1-y[x]);
    Derivative[n_][y][x] := Derivative[n][y][x] = D[Derivative[n-1][y][x], x];
    row[n_] := CoefficientList[Derivative[n][y][x], y[x]] // Rest;
    Table[row[n], {n, 0, 9}] // Flatten
    (* or *) Table[(-1)^k*k!*StirlingS2[n+1, k+1], {n, 0, 9}, {k, 0, n}] // Flatten
    (* Jean-François Alcover, Dec 16 2014 *)
  • Python
    from sympy.core.cache import cacheit
    @cacheit
    def T(n, k):return 1 if n==0 and k==0 else 0 if k>n or k<0 else (k + 1)*T(n - 1, k) - k*T(n - 1, k - 1)
    for n in range(51): print([T(n, k) for k in range(n + 1)]) # Indranil Ghosh, Sep 11 2017

Formula

T(n, k) = (-1)^k*k!*Stirling2(n+1, k+1). - Jean-François Alcover, Dec 16 2014
T(n, k) = (k+1)*T(n-1,k) - k*T(n-1,k-1), T(0,0) = 1, T(n,k) = 0 if k>n or if k<0. - Philippe Deléham, May 29 2015
Worpitzky's representation of the Bernoulli numbers B(n, 1) = Sum_{k = 0..n} T(n,k)/(k+1) = A164555(n)/A027642(n) (Bernoulli numbers). - Philippe Deléham, May 29 2015
T(n, k) = Sum_{j=0..k} (-1)^j*binomial(k, j)*(j+1)^n. - Peter Luschny, Sep 21 2017
Let W_n(x) be the row polynomials of this sequence and F_n(x) the row polynomials of A278075. Then W_n(1 - x) = F_n(x). Also Integral_{x=0..1} U_n(x) = Bernoulli(n, 1) for U in {W, F}. - Peter Luschny, Aug 10 2021

A036239 Number of 2-element intersecting families of an n-element set; number of 2-way interactions when 2 subsets of power set on {1..n} are chosen at random.

Original entry on oeis.org

0, 2, 15, 80, 375, 1652, 7035, 29360, 120975, 494252, 2007555, 8120840, 32753175, 131818052, 529680075, 2125927520, 8525298975, 34165897052, 136857560595, 548011897400, 2193792030375, 8780400395252, 35137296305115, 140596265198480
Offset: 1

Views

Author

Keywords

Comments

Let P(A) be the power set of an n-element set A. Then a(n) = the number of pairs of elements {x,y} of P(A) for which either 0) x and y are intersecting but for which x is not a subset of y and y is not a subset of x, or 1) x and y are intersecting and for which either x is a proper subset of y or y is a proper subset of x. - Ross La Haye, Jan 10 2008
Graph theory formulation. Let P(A) be the power set of an n-element set A. Then a(n) = the number of edges in the intersection graph G of P(A). The vertices of G are the elements of P(A) and the edges of G are the pairs of elements {x,y} of P(A) such that x and y are intersecting (and x <> y). - Ross La Haye, Dec 23 2017

References

  • W. W. Kokko, "Interactions", manuscript, 1983.

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{10,-35,50,-24},{0,2,15,80},40] (* or *) With[{c=1/2!}, Table[ c(4^n-3^n-2^n+1),{n,40}]] (* Harvey P. Dale, May 11 2011 *)
  • PARI
    a(n)=(4^n-3^n-2^n+1)/2 \\ Charles R Greathouse IV, Jul 25 2011
  • Sage
    [(4^n - 2^n)/2-(3^n - 1)/2 for n in range(1,24)] # Zerinvary Lajos, Jun 05 2009
    

Formula

a(n) = (1/2) * (4^n - 3^n - 2^n + 1).
a(n) = 3*Stirling2(n+1,4) + 2*Stirling2(n+1,3). - Ross La Haye, Jan 10 2008
a(n) = A006516(n) - A003462(n). - Zerinvary Lajos, Jun 05 2009
From Harvey P. Dale, May 11 2011: (Start)
a(n) = 10*a(n-1) - 35*a(n-2) + 50*a(n-3) - 24*a(n-4); a(0)=0, a(1)=2, a(2)=15, a(3)=80.
G.f.: x^2*(2-5*x)/(1 - 10*x + 35*x^2 - 50*x^3 + 24*x^4). (End)
E.g.f.: exp(x)*(exp(x) - 1)^2*(exp(x) + 1)/2. - Stefano Spezia, Jun 26 2022

A083323 a(n) = 3^n - 2^n + 1.

Original entry on oeis.org

1, 2, 6, 20, 66, 212, 666, 2060, 6306, 19172, 58026, 175100, 527346, 1586132, 4766586, 14316140, 42981186, 129009092, 387158346, 1161737180, 3485735826, 10458256052, 31376865306, 94134790220, 282412759266, 847255055012
Offset: 0

Views

Author

Paul Barry, Apr 27 2003

Keywords

Comments

Binomial transform of A000225 (if this starts 1,1,3,7....).
Let P(A) be the power set of an n-element set A. Then a(n) = the number of pairs of elements {x,y} of P(A) for which either 0) x and y are intersecting and for which either x is a proper subset of y or y is a proper subset of x, or 1) x = y. - Ross La Haye, Jan 10 2008
Let P(A) be the power set of an n-element set A and R be a relation on P(A) such that for all x, y of P(A), xRy if either 0) x is not a subset of y and y is not a subset of x and x and y are disjoint, or 1) x equals y. Then a(n) = |R|. - Ross La Haye, Mar 19 2009

Examples

			From _Gus Wiseman_, Dec 10 2019: (Start)
Also the number of achiral set-systems on n vertices, where a set-system is achiral if it is not changed by any permutation of the covered vertices. For example, the a(0) = 1 through a(3) = 20 achiral set-systems are:
  0  0    0           0
     {1}  {1}         {1}
          {2}         {2}
          {12}        {3}
          {1}{2}      {12}
          {1}{2}{12}  {13}
                      {23}
                      {123}
                      {1}{2}
                      {1}{3}
                      {2}{3}
                      {1}{2}{3}
                      {1}{2}{12}
                      {1}{3}{13}
                      {2}{3}{23}
                      {12}{13}{23}
                      {1}{2}{3}{123}
                      {12}{13}{23}{123}
                      {1}{2}{3}{12}{13}{23}
                      {1}{2}{3}{12}{13}{23}{123}
BII-numbers of these set-systems are A330217. Fully chiral set-systems are A330282, with covering case A330229.
(End)
		

Crossrefs

Programs

Formula

G.f.: (1-4*x+5*x^2)/((1-x)*(1-2*x)*(1-3*x)).
E.g.f.: exp(3*x) - exp(2*x) + exp(x).
Row sums of triangle A134319. - Gary W. Adamson, Oct 19 2007
a(n) = 2*StirlingS2(n+1,3) + StirlingS2(n+1,2) + 1. - Ross La Haye, Jan 10 2008
a(n) = Sum_{k=0..n}(binomial(n,k)*A255047(k)). - Yuchun Ji, Feb 23 2019

A056182 First differences of A003063.

Original entry on oeis.org

0, 2, 10, 38, 130, 422, 1330, 4118, 12610, 38342, 116050, 350198, 1054690, 3172262, 9533170, 28632278, 85962370, 258018182, 774316690, 2323474358, 6971471650, 20916512102, 62753730610, 188269580438, 564825518530, 1694510110022, 5083597438930, 15250926534518, 45753048039010
Offset: 0

Views

Author

N. J. A. Sloane, Aug 05 2000

Keywords

Comments

Let V be a binary relation on the power set P(A) of a set A having n = |A| elements such that for every element x, y of P(A), xVy if x is a proper subset of y or y is a proper subset of x. Then a(n) = |V|. - Ross La Haye, Dec 22 2006
With regard to the comment by Ross La Haye: For nonempty subsets see a(n+1) in A260217. - If "proper" is omitted see A027649. - For nonempty subsets with "proper" omitted see A091344. - Manfred Boergens, Sep 04 2023
It appears that a(n) is the number of permutations p of 1,..,(n+2) such that max[p(i+1)-p(i)] is 2. For example, for n=1, the permutations (1,3,2) and (2,1,3) and no others have the desired property, so a(1)=2. This approach gives values in agreement with all listed terms. [John W. Layman, Nov 09 2011]
In the terdragon curve, a(n-1) is the number of enclosed unit triangles in expansion level n. - Kevin Ryde, Oct 20 2020

Crossrefs

3rd column of A056151. Cf. A028243 (partial sums).
A002783(n) - 1.
a(n) = A293181(n+1,3).

Programs

  • Maple
    A056182:=n->2 * (3^n - 2^n); seq(A056182(n), n=0..30); # Wesley Ivan Hurt, Feb 10 2014
  • Mathematica
    Table[ -((-1 + k)^(1-k+n)*(-1+k)!)+k^(-k+n)*k! /. k -> 3, {n, 3, 36} ]
    Table[2 (3^n - 2^n), {n, 0, 30}] (* Wesley Ivan Hurt, Feb 10 2014 *)
    CoefficientList[Series[2 x/((2 x - 1) (3 x - 1)), {x, 0, 40}], x] (* Vincenzo Librandi, Feb 12 2014 *)
    LinearRecurrence[{5,-6},{0,2},30] (* Harvey P. Dale, Sep 22 2015 *)

Formula

a(n) = 2 * (3^n - 2^n).
a(n) = 5*a(n-1)-6*a(n-2). G.f.: 2*x/((2*x-1)*(3*x-1)). [Colin Barker, Dec 10 2012]
a(n) = A217764(n,3). - Ross La Haye, Mar 27 2013
a(n) = sum_{i=1..n} binomial(n, i) * 2^(n - i + 1). - Wesley Ivan Hurt, Feb 10 2014
a(n) = 2 * A001047(n). - Wesley Ivan Hurt, Feb 10 2014
E.g.f.: 2*exp(2*x)*(exp(x) - 1). - Stefano Spezia, May 18 2024

Extensions

More terms from Wouter Meeussen, Aug 05 2000

A134057 a(n) = binomial(2^n-1,2).

Original entry on oeis.org

0, 0, 3, 21, 105, 465, 1953, 8001, 32385, 130305, 522753, 2094081, 8382465, 33542145, 134193153, 536821761, 2147385345, 8589737985, 34359345153, 137438167041, 549754241025, 2199020109825, 8796086730753, 35184359505921
Offset: 0

Views

Author

Ross La Haye, Jan 11 2008, Jun 01 2008

Keywords

Comments

Let P(A) be the power set of an n-element set A. Then a(n) = the number of pairs of elements {x,y} of P(A) for which either 0) x and y are disjoint and for which x is not a subset of y and y is not a subset of x, or 1) x and y are intersecting but for which x is not a subset of y and y is not a subset of x, or 2) x and y are intersecting and for which either x is a proper subset of y or y is a proper subset of x.
Or: Number of connections between the nodes of the perfect depth n binary tree and the nodes of a perfect depth (n-1) binary tree. - Alex Ratushnyak, Jun 02 2013
a(n) is the number of positive entries in the positive rows and columns of a Walsh matrix of order 2^n. It is also the size of the smallest nontrivial conjugacy class in the general linear group GL(n,2). See the link "3-bit Walsh permutation...". - Tilman Piesk, Sep 15 2022

Examples

			a(2) = 3 because for P(A) = {{},{1},{2},{1,2}} we have for case 0 {{1},{2}} and we have for case 2 {{1},{1,2}}, {{2},{1,2}}. There are 0 {x,y} of P(A) in this example that fall under case 1.
		

Crossrefs

Programs

  • Magma
    [Binomial(2^n-1, 2): n in [0..30]]; // Vincenzo Librandi, Nov 30 2015
  • Maple
    seq((2^n-1)*(2^(n-1)-1), n=0..100); # Robert Israel, Nov 30 2015
  • Mathematica
    Table[Binomial[2^n - 1, 2], {n, 0, 30}] (* Vincenzo Librandi, Nov 30 2015 *)
  • PARI
    a(n) = binomial(2^n-1, 2); \\ Michel Marcus, Nov 30 2015
    
  • Python
    print([(2**n-1)*(2**(n-1)-1) for n in range(23)])
    # Alex Ratushnyak, Jun 02 2013
    

Formula

a(n) = (1/2)*(4^n - 3*2^n + 2) = 3*(Stirling2(n+1,4) + Stirling2(n+1,3)).
a(n) = 3 *A006095(n).
a(n) = (2^n-1)*(2^(n-1)-1). - Alex Ratushnyak, Jun 02 2013
a(n) = Stirling2(2^n - 1,2^n - 2).
G.f.: 3*x^2/(1-x)/(1-2*x)/(1-4*x). - Colin Barker, Feb 22 2012
a(n) = A000225(n)*A000225(n-1). - Michel Marcus, Nov 30 2015
a(n) = A000217(2^n-2). - Michel Marcus, Nov 30 2015
a(n) = 7*a(n-1) - 14*a(n-2) + 8*a(n-3). - Wesley Ivan Hurt, May 17 2021
E.g.f.: exp(x)*(exp(x) - 1)^2*(exp(x) + 2)/2. - Stefano Spezia, Apr 06 2022
Showing 1-10 of 33 results. Next