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

A241038 a(n) = A000217(A058481(n)).

Original entry on oeis.org

0, 1, 28, 325, 3160, 29161, 264628, 2388205, 21513520, 193680721, 1743303628, 15690264085, 141213971080, 1270930522681, 11438389053028, 102945544523965, 926510029855840, 8338590656123041, 75047317067368828
Offset: 0

Views

Author

Kival Ngaokrajang, Apr 15 2014

Keywords

Comments

a(n) is the total number of hexagon holes in triflake-like fractal (A240917) after n iterations. A240917(n) - a(n) is the total number of rhombic holes.

Crossrefs

Programs

  • Maple
    A241038:=n->(1/2)*3^(2*n) - (3/2)*3^n + 1; seq(A241038(n), n=0..30); # Wesley Ivan Hurt, Apr 15 2014
  • Mathematica
    Table[(1/2)*3^(2 n) - (3/2)*3^n + 1, {n, 0, 30}] (* Wesley Ivan Hurt, Apr 15 2014 *)
    LinearRecurrence[{13,-39,27},{0,1,28},30] (* Harvey P. Dale, Oct 12 2017 *)
  • PARI
    a(n)= (1/2)*3^(2*n) - (3/2)*3^n + 1
           for(n=0,100,print1(a(n),", "))
    
  • PARI
    Vec(-x*(15*x+1)/((x-1)*(3*x-1)*(9*x-1)) + O(x^100)) \\ Colin Barker, Apr 15 2014

Formula

a(n) = (1/2)*3^(2*n) - (3/2)*3^n + 1.
a(n) = 13*a(n-1)-39*a(n-2)+27*a(n-3). G.f.: -x*(15*x+1) / ((x-1)*(3*x-1)*(9*x-1)). - Colin Barker, Apr 15 2014

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

A052548 a(n) = 2^n + 2.

Original entry on oeis.org

3, 4, 6, 10, 18, 34, 66, 130, 258, 514, 1026, 2050, 4098, 8194, 16386, 32770, 65538, 131074, 262146, 524290, 1048578, 2097154, 4194306, 8388610, 16777218, 33554434, 67108866, 134217730, 268435458, 536870914, 1073741826, 2147483650
Offset: 0

Views

Author

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

Keywords

Comments

The most "compact" sequence that satisfies Bertrand's Postulate. Begin with a(1) = 3 = n, then 2n - 2 = 4 = n_1, 2n_1 - 2 = 6 = n_2, 2n_2 - 2 = 10, etc. = a(n), hence there is guaranteed to be at least one prime between successive members of the sequence. - Andrew S. Plewe, Dec 11 2007
Number of 2-sided prudent polygons of area n, for n>0, see Beaton, p. 5. - Jonathan Vos Post, Nov 30 2010

Crossrefs

Programs

  • Haskell
    a052548 = (+ 2) . a000079
    a052548_list = iterate ((subtract 2) . (* 2)) 3
    -- Reinhard Zumkeller, Sep 05 2015
  • Magma
    [2^n + 2: n in [0..35]]; // Vincenzo Librandi, Apr 29 2011
    
  • Maple
    spec := [S,{S=Union(Sequence(Union(Z,Z)),Sequence(Z),Sequence(Z))},unlabeled]: seq(combstruct[count](spec,size=n), n=0..20);
  • Mathematica
    2^Range[0,40]+2 (* Harvey P. Dale, Jun 26 2012 *)
  • PARI
    a(n)=1<Charles R Greathouse IV, Nov 20 2011
    

Formula

G.f.: (3-5*x)/((1-2*x)*(1-x)) = (3-5*x)/(1 - 3*x + 2*x^2) = 2/(1-x) + 1/(1-2*x).
a(0)=3, a(1)=4, a(n) = 3*a(n-1) - 2*a(n-2).
a(n) = A058896(n)/A000918(n), for n>0. - Reinhard Zumkeller, Feb 14 2009
a(n) = A173786(n,1), for n>0. - Reinhard Zumkeller, Feb 28 2010
a(n)*A000918(n) = A028399(2*n), for n>0. - Reinhard Zumkeller, Feb 28 2010
a(0)=3, a(n) = 2*a(n-1) - 2. - Vincenzo Librandi, Aug 06 2010
E.g.f.: (2 + exp(x))*exp(x). - Ilya Gutkovskiy, Aug 16 2016

Extensions

More terms from James Sellers, Jun 06 2000

A014224 Numbers k such that 3^k - 2 is prime.

Original entry on oeis.org

2, 4, 5, 6, 9, 22, 37, 41, 90, 102, 105, 317, 520, 541, 561, 648, 780, 786, 957, 1353, 2224, 2521, 6184, 7989, 8890, 19217, 20746, 31722, 37056, 69581, 195430, 225922, 506233, 761457, 1180181
Offset: 1

Views

Author

Keywords

Comments

If n is of the form 4k + 3 then 3^n - 2 is composite, because 3^n - 2 = (3^4)^k*3^3 - 2 == 0 (mod 5). So there is no term of the form 4k + 3. If Q is a perfect number such that gcd(3(3^a(n) - 2), Q) = 1 then x = 3^(a(n) - 1)*(3^a(n) - 2)*Q is a solution of the equation sigma(x) = 3x + Q. See comment lines of the sequences A058959 and A171271. - M. F. Hasler and Farideh Firoozbakht, Dec 07 2009
For all numbers n in this sequence, 3^(n-1)*(3^n-2) is a 2-hyperperfect number, cf. A007593, and no other 2-hyperperfect number seems to be known. - Farideh Firoozbakht and M. F. Hasler, Apr 25 2012
225922 is the last term in the sequence up to 500000. All n <= 500000 have been tested with the Miller-Rabin PRP test and/or PFGW. - Ryan Propper, Aug 18 2013
For n <= 506300 there is one additional term, 506233, a probable prime as tested by PFGW. - Ryan Propper, Sep 03 2013
a(35) > 10^6. - Ryan Propper, Jul 22 2015

References

  • Daniel Minoli, Sufficient Forms For Generalized Perfect Numbers, Ann. Fac. Sciences, Univ. Nation. Zaire, Section Mathem; Vol. 4, No. 2, Dec 1978, pp. 277-302. [From Daniel Minoli (daniel.minoli(AT)ses.com), Aug 26 2009]
  • Daniel Minoli, Voice over MPLS, McGraw-Hill, New York, NY, 2002, ISBN 0-07-140615-8 (pp. 114-134) [From Daniel Minoli (daniel.minoli(AT)ses.com), Aug 26 2009]
  • Daniel Minoli and W. Nakamine, Mersenne Numbers Rooted On 3 For Number Theoretic Transforms, 1980 IEEE International Conf. on Acoust., Speech and Signal Processing. [From Daniel Minoli (daniel.minoli(AT)ses.com), Aug 26 2009]

Crossrefs

3^n - 2 = A058481(n).

Programs

Extensions

Corrected by Andrey V. Kulsha, Feb 04 2001
a(26) = 19217, a(27) = 20746 from Ryan Propper, May 11 2007
a(28) = 31722 from Henri Lifchitz, Oct 2002
a(29) = 37056 from Henri Lifchitz, Oct 2004
a(30) = 69581 from Henri Lifchitz, Jan 2005
a(31) = 195430 from Theodore Burton, Feb 2007
a(32) = 225922 from Ryan Propper, Aug 18 2013
a(33) = 506233 from Ryan Propper, Sep 02 2013
a(34) = 761457 from Ryan Propper, Jul 22 2015
a(35) = 1180181 from Jorge Coveiro, May 22 2020

A100774 a(n) = 2*(3^n - 1).

Original entry on oeis.org

0, 4, 16, 52, 160, 484, 1456, 4372, 13120, 39364, 118096, 354292, 1062880, 3188644, 9565936, 28697812, 86093440, 258280324, 774840976, 2324522932, 6973568800, 20920706404, 62762119216, 188286357652, 564859072960, 1694577218884
Offset: 0

Views

Author

Pawel P. Mazur (Pawel.Mazur(AT)pwr.wroc.pl), Apr 06 2005

Keywords

Comments

a(n) is the number of steps which are made when generating all n-step nonreversing random walks that begin in a fixed point P on a two-dimensional square lattice. To make one step means to move along one edge on the lattice.
These are also the first local maxima reached in the Collatz trajectories of 2^n - 1. - David Rabahy, Oct 30 2017
Also the graph diameter of the n-Sierpinski carpet graph. - Eric W. Weisstein, Mar 13 2018
a(n) is the number of edge covers of F_{n,2}, which has adjacent vertices u and w, and n vertices each adjacent to both u and w. An edge cover is a subset of the edges where each vertex is adjacent to at least one vertex. To cover each of the n vertices v_i, we need to have at least the edge uv_i or wv_i or both, giving us three choices for each. We can then add the edge uw or not, which is 2*3^n choices. But we need to remove the case where all uv_i's were chosen and uw not chosen, and all ww_i's were chosen and uw not chosen. - Feryal Alayont, Jun 17 2024

Crossrefs

Programs

Formula

a(n) = 2*(3^n - 1).
a(n) = 4*Sum_{i=0..n-1} 3^i.
a(n) = 4*A003462(n).
a(n) = A048473(n) - 1. - Paul Curtz, Jan 19 2009
G.f.: 4*x/((1-x)*(1-3*x)). - Eric W. Weisstein, Mar 13 2018
a(n) = 4*a(n-1) - 3*a(n-2). - Eric W. Weisstein, Mar 13 2018
From Elmo R. Oliveira, Dec 06 2023: (Start)
a(n) = 2*A024023(n).
a(n) = 3*a(n-1) + 4 for n>0.
E.g.f.: 2*(exp(3*x) - exp(x)). (End)

A183109 Triangle read by rows: T(n,m) = number of n X m binary matrices with no zero rows or columns (n >= 1, 1 <= m <= n).

Original entry on oeis.org

1, 1, 7, 1, 25, 265, 1, 79, 2161, 41503, 1, 241, 16081, 693601, 24997921, 1, 727, 115465, 10924399, 831719761, 57366997447, 1, 2185, 816985, 167578321, 26666530801, 3776451407065, 505874809287625
Offset: 1

Views

Author

Steffen Eger, Feb 01 2011

Keywords

Comments

T(n,m) = T(m,n) is also the number of complete alignments between two strings of sizes m and n, respectively; i.e. the number of complete matchings in a bipartite graph
From Manfred Boergens, Jul 25 2021: (Start)
The matrices in the definition are a superset of the matrices in the comment to A019538 by Manfred Boergens.
T(n,m) is the number of coverings of [n] by tuples (A_1,...,A_m) in P([n])^m with nonempty A_j, with P(.) denoting the power set (corrected for clarity by Manfred Boergens, May 26 2024). For the disjoint case see A019538.
For tuples with "nonempty" dropped see A092477 and A329943 (amendment by Manfred Boergens, Jun 24 2024). (End)

Examples

			Triangle begins:
  1;
  1,    7;
  1,   25,    265;
  1,   79,   2161,     41503;
  1,  241,  16081,    693601,    24997921;
  1,  727, 115465,  10924399,   831719761,   57366997447;
  1, 2185, 816985, 167578321, 26666530801, 3776451407065, 505874809287625;
  ...
		

Crossrefs

Cf. A218695 (same sequence with restriction m<=n dropped).
Cf. A058482 (this gives the general formula, but values only for m=3).
Main diagonal gives A048291.
Column 2 is A058481.

Programs

  • Maple
    A183109 := proc(n,m)
        add((-1)^j*binomial(m,j)*(2^(m-j)-1)^n,j=0..m) ;
    end proc:
    seq(seq(A183109(n,m),m=1..n),n=1..10) ; # R. J. Mathar, Dec 03 2015
  • Mathematica
    Flatten[Table[Sum[ (-1)^j*Binomial[m, j]*(2^(m - j) - 1)^n, {j, 0, m}], {n, 1, 7}, {m, 1, n}]] (* Indranil Ghosh, Mar 14 2017 *)
  • PARI
    tabl(nn) = {for(n=1, nn, for(m = 1, n, print1(sum(j=0, m, (-1)^j*binomial(m, j)*(2^(m - j) - 1)^n),", ");); print(););};
    tabl(8); \\ Indranil Ghosh, Mar 14 2017
    
  • Python
    import math
    f = math.factorial
    def C(n,r): return f(n)//f(r)//f(n - r)
    def T(n,m):
        return sum((-1)**j*C(m,j)*(2**(m - j) - 1)**n for j in range (m+1))
    i=1
    for n in range(1,21):
        for m in range(1, n+1):
            print(str(i)+" "+str(T(n, m)))
            i+=1 # Indranil Ghosh, Mar 14 2017

Formula

T(n,m) = Sum_{j=0..m}(-1)^j*C(m, j)*(2^(m-j)-1)^n.
Recursion: T(m,n) = Sum_{k=1..m} T(k,n-1)*C(m,k)*2^k - T(m,n-1).
From Robert FERREOL, Mar 14 2017: (Start)
T(n,m) = Sum_{i = 0 .. n,j = 0 ..m}(-1)^(n+m+i+j)*C(n,i)*C(m,j)*2^(i*j).
Inverse formula of: 2^(n*m) = Sum_{i = 0 .. n , j = 0 ..m} C(n,i)*C(m,j)*T(i,j). (End)
A019538(j) <= a(j). - Manfred Boergens, Jul 25 2021

A218695 Square array A(h,k) = (2^h-1)*A(h,k-1) + Sum_{i=1..h-1} binomial(h,h-i)*2^i*A(i,k-1), with A(1,k) = A(h,1) = 1; read by antidiagonals.

Original entry on oeis.org

1, 1, 1, 1, 7, 1, 1, 25, 25, 1, 1, 79, 265, 79, 1, 1, 241, 2161, 2161, 241, 1, 1, 727, 16081, 41503, 16081, 727, 1, 1, 2185, 115465, 693601, 693601, 115465, 2185, 1, 1, 6559, 816985, 10924399, 24997921, 10924399, 816985, 6559, 1
Offset: 1

Views

Author

M. F. Hasler, Nov 04 2012

Keywords

Comments

This symmetric table is defined in the Kreweras papers, used also in A223911. Its upper or lower triangular part equals A183109, which might provide a simpler formula.
Number of h X k binary matrices with no zero rows or columns. - Andrew Howroyd, Mar 29 2023
A(h,k) is the number of coverings of [h] by tuples (A_1,...,A_k) in P([h])^k with nonempty A_j, with P(.) denoting the power set. For the disjoint case see A019538. For tuples with "nonempty" omitted see A092477 and A329943 (amendment by Manfred Boergens, Jun 24 2024). - Manfred Boergens, May 26 2024

Examples

			Array A(h,k) begins:
=====================================================
h\k | 1   2      3        4         5           6 ...
----+------------------------------------------------
  1 | 1   1      1        1         1           1 ...
  2 | 1   7     25       79       241         727 ...
  3 | 1  25    265     2161     16081      115465 ...
  4 | 1  79   2161    41503    693601    10924399 ...
  5 | 1 241  16081   693601  24997921   831719761 ...
  6 | 1 727 115465 10924399 831719761 57366997447 ...
  ...
		

Crossrefs

Columns 1..3 are A000012, A058481, A058482.
Main diagonal is A048291.
Cf. A019538, A056152 (unlabeled case), A052332, A092477, A183109, A223911, A329943.

Programs

  • PARI
    c(h,k)={(h<2 || k<2) & return(1); sum(i=1,h-1,binomial(h,h-i)*2^i*c(i,k-1))+(2^h-1)*c(h,k-1)}
    /* For better performance when h and k are large, insert the following memoization code before "sum(...)": cM=='cM & cM=matrix(h,k); my(s=matsize(cM));
    s[1] >= h & s[2] >= k & cM[h,k] & return(cM[h,k]);
    s[1]
    				
  • PARI
    A(m, n) = sum(k=0, m, (-1)^(m-k) * binomial(m, k) * (2^k-1)^n ) \\ Andrew Howroyd, Mar 29 2023

Formula

From Andrew Howroyd, Mar 29 2023: (Start)
A(h, k) = Sum_{i=0..h} (-1)^(h-i) * binomial(h, i) * (2^i-1)^k.
A052332(n) = Sum_{i=1..n-1} binomial(n,i)*A(i, n-i) for n > 0. (End)

A164123 Partial sums of A162436.

Original entry on oeis.org

1, 4, 7, 16, 25, 52, 79, 160, 241, 484, 727, 1456, 2185, 4372, 6559, 13120, 19681, 39364, 59047, 118096, 177145, 354292, 531439, 1062880, 1594321, 3188644, 4782967, 9565936, 14348905, 28697812, 43046719, 86093440, 129140161, 258280324, 387420487, 774840976, 1162261465
Offset: 1

Views

Author

Klaus Brockhaus, Aug 10 2009

Keywords

Comments

Interleaving of A058481 and A100774 without initial term 0.
Apparently a(n) = A062318(n+2) - 1.
The terms beginning with a(2) are the row numbers in Pascal's Triangle where every 3rd element in those rows is divisible by 3 and none of the other elements in those rows are divisible by 3. - Thomas M. Green, Apr 03 2013

Examples

			For n = 3, a(3) = 7. The binomial coefficients of the 7th row of Pascal's Triangle are 1 7 21 35 35 21 7 1 and every 3rd element is a multiple of 3. - _Thomas M. Green_, Apr 03 2013
		

References

  • Thomas M. Green, Prime Patterns in Pascal's Triangle, paper in review process, 2013.

Crossrefs

Cf. A162436, A058481 (3^n-2), A100774 (2*(3^n - 1)), A062318, A038754, A038754.

Programs

  • Magma
    T:=[ n le 2 select 2*n-1 else 3*Self(n-2): n in [1..33] ]; [ n eq 1 select T[1] else Self(n-1)+T[n]: n in [1..#T]];
    
  • Mathematica
    Accumulate[Transpose[NestList[{Last[#],3*First[#]}&,{1,3},40]][[1]]] (* Harvey P. Dale, Feb 17 2012 *)
  • PARI
    a(n) = (2+n%2)*3^(n\2)-2 \\ Charles R Greathouse IV, Jul 15 2011

Formula

a(n) = A038754(n+1) - 2.
a(n) = 3*a(n-2) + 4 for n > 2; a(1) = 1, a(2) = 4.
a(n) = (5 - (-1)^n)*3^(1/4*(2*n - 1 + (-1)^n))/2 - 2.
G.f.: x*(1 + 3*x)/((1 - x)*(1 - 3*x^2)).
E.g.f.: 2*(cosh(sqrt(3)*x) - cosh(x)) + sqrt(3)*sinh(sqrt(3)*x) - 2*sinh(x). - Stefano Spezia, Dec 31 2022

Extensions

Incorrect formula removed by Stefano Spezia, Dec 31 2022

A165665 a(n) = (3*2^n - 2) * 2^n.

Original entry on oeis.org

1, 8, 40, 176, 736, 3008, 12160, 48896, 196096, 785408, 3143680, 12578816, 50323456, 201310208, 805273600, 3221159936, 12884770816, 51539345408, 206157905920, 824632672256, 3298532786176, 13194135339008, 52776549744640
Offset: 0

Views

Author

Klaus Brockhaus, Sep 24 2009

Keywords

Comments

Binomial transform of A058481. Second binomial transform of (A082505 without initial term 0). Third binomial transform of A010686.
Partial sums are in A060867.
a(n) is the sum of the odd numbers taken progressively by moving through them by 2^n-tuples. a(0)=1; a(1) = 3+5=8; a(2) = 7+9+11+13 = 40; a(3) = 15+17+19+21+23+25+27+29 = 176; a(n) = sum_{k=0,1,..,A000225(n)} (A000225(n+1)+2*k). - J. M. Bergot, Dec 06 2014
The number of active (ON, black) cells at stage 2^n-1 of the two-dimensional cellular automaton defined by "Rule 773", based on the 5-celled von Neumann neighborhood. - Robert Price, May 23 2016

Crossrefs

Cf. A058481, A082505, A010686 (repeat 1, 5), A060867, A010036, A124647.

Programs

  • Magma
    [ (3*2^n-2)*2^n: n in [0..23] ];
    
  • Mathematica
    Table[(3*2^n-2)2^n,{n,0,30}] (* or  *) LinearRecurrence[{6,-8},{1,8},30] (* Harvey P. Dale, Nov 18 2020 *)
  • PARI
    a(n)=(3*2^n-2)*2^n \\ Charles R Greathouse IV, Oct 07 2015

Formula

a(n) = 6*a(n-1)-8*a(n-2) for n > 1; a(0) = 1, a(1) = 8.
a(n) = 8*A010036(n-1) for n > 0.
G.f.: (2*x+1)/((1-2*x)*(1-4*x)).
E.g.f.: 3*e^(4*x) - 2*e^(2*x). - Robert Israel, Dec 15 2014

A208904 Triangle of coefficients of polynomials v(n,x) jointly generated with A208660; see the Formula section.

Original entry on oeis.org

1, 3, 1, 5, 6, 1, 7, 19, 9, 1, 9, 44, 42, 12, 1, 11, 85, 138, 74, 15, 1, 13, 146, 363, 316, 115, 18, 1, 15, 231, 819, 1059, 605, 165, 21, 1, 17, 344, 1652, 2984, 2470, 1032, 224, 24, 1, 19, 489, 3060, 7380, 8378, 4974, 1624, 292, 27, 1, 21, 670, 5301, 16488
Offset: 1

Views

Author

Clark Kimberling, Mar 03 2012

Keywords

Comments

For a discussion and guide to related arrays, see A208510.
Riordan array ((1+x)/(1-x)^2, x(1+x)/(1-x)^2) (follows from Kruchinin formula). - Ralf Stephan, Jan 02 2014
From Peter Bala, Jul 21 2014: (Start)
Let M denote the lower unit triangular array A099375 and for k = 0,1,2,... define M(k) to be the lower unit triangular block array
/I_k 0\
\ 0 M/
having the k x k identity matrix I_k as the upper left block; in particular, M(0) = M. Then the present triangle equals the infinite matrix product M(0)*M(1)*M(2)*... (which is clearly well-defined). See the Example section. (End)

Examples

			First five rows:
1
3...1
5...6....1
7...19...9....1
9...44...42...12...1
First five polynomials v(n,x):
1
3 + x
5 + 6x + x^2
7 + 19x + 9x^2 + x^3
9 + 44x + 42x^2 + 12x^3 + x^4
From _Peter Bala_, Jul 21 2014: (Start)
With the arrays M(k) as defined in the Comments section, the infinite product M(0*)M(1)*M(2)*... begins
/1        \/1        \/1        \      /1            \
|3 1      ||0 1      ||0 1      |      |3  1         |
|5 3 1    ||0 3 1    ||0 0 1    |... = |5  6  1      |
|7 5 3 1  ||0 5 3 1  ||0 0 3 1  |      |7 19  9  1   |
|9 7 5 3 1||0 7 5 3 1||0 0 5 3 1|      |9 44 42 12 1 |
|...      ||...      ||...      |      |...
(End)
		

Crossrefs

Programs

  • Mathematica
    u[1, x_] := 1; v[1, x_] := 1; z = 16;
    u[n_, x_] := u[n - 1, x] + 2 x*v[n - 1, x];
    v[n_, x_] := u[n - 1, x] + (x + 1)*v[n - 1, x] + 1;
    Table[Expand[u[n, x]], {n, 1, z/2}]
    Table[Expand[v[n, x]], {n, 1, z/2}]
    cu = Table[CoefficientList[u[n, x], x], {n, 1, z}];
    TableForm[cu]
    Flatten[%]    (* A208660 *)
    Table[Expand[v[n, x]], {n, 1, z}]
    cv = Table[CoefficientList[v[n, x], x], {n, 1, z}];
    TableForm[cv]
    Flatten[%]    (* A208904 *)

Formula

u(n,x)=u(n-1,x)+2x*v(n-1,x),
v(n,x)=u(n-1,x)+(x+1)*v(n-1,x)+1,
where u(1,x)=1, v(1,x)=1.
From Vladimir Kruchinin, Mar 11 2013: (Start)
T(n,k) = sum(i=0..n, binomial(i+k-1,2*k-1)*binomial(k,n-i))
((x+x^2)/(1-x)^2)^k = sum(n>=k, T(n,k)*x^n).
T(n,2)=A005900(n).
T(2*n-1,n) / n = A003169(n).
T(2*n,n) = A156894(n), n>1.
sum(k=1..n, T(n,k)) = A003946(n).
sum(k=1..n, T(n,k)*(-1)^(n+k)) = A078050(n).
n*sum(k=1..n, T(n,k)/k) = A058481(n). (End)
Recurrence: T(n+1,k+1) = sum {i = 0..n-k} (2*i + 1)*T(n-i,k). - Peter Bala, Jul 21 2014
Showing 1-10 of 27 results. Next