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

A001787 a(n) = n*2^(n-1).

Original entry on oeis.org

0, 1, 4, 12, 32, 80, 192, 448, 1024, 2304, 5120, 11264, 24576, 53248, 114688, 245760, 524288, 1114112, 2359296, 4980736, 10485760, 22020096, 46137344, 96468992, 201326592, 419430400, 872415232, 1811939328, 3758096384, 7784628224, 16106127360, 33285996544
Offset: 0

Views

Author

Keywords

Comments

Number of edges in an n-dimensional hypercube.
Number of 132-avoiding permutations of [n+2] containing exactly one 123 pattern. - Emeric Deutsch, Jul 13 2001
Number of ways to place n-1 nonattacking kings on a 2 X 2(n-1) chessboard for n >= 2. - Antonio G. Astudillo (afg_astudillo(AT)hotmail.com), May 22 2001
Arithmetic derivative of 2^n: a(n) = A003415(A000079(n)). - Reinhard Zumkeller, Feb 26 2002
(-1) times the determinant of matrix A_{i,j} = -|i-j|, 0 <= i,j <= n.
a(n) is the number of ones in binary numbers 1 to 111...1 (n bits). a(n) = A000337(n) - A000337(n-1) for n = 2,3,... . - Emeric Deutsch, May 24 2003
The number of 2 X n 0-1 matrices containing n+1 1's and having no zero row or column. The number of spanning trees of the complete bipartite graph K(2,n). This is the case m = 2 of K(m,n). See A072590. - W. Edwin Clark, May 27 2003
Binomial transform of 0,1,2,3,4,5,... (A001477). Without the initial 0, binomial transform of odd numbers.
With an additional leading zero, [0,0,1,4,...] this is the binomial transform of the integers repeated A004526. Its formula is then (2^n*(n-1) + 0^n)/4. - Paul Barry, May 20 2003
Number of zeros in all different (n+1)-bit integers. - Ralf Stephan, Aug 02 2003
From Lekraj Beedassy, Jun 03 2004: (Start)
Final element of a summation table (as opposed to a difference table) whose first row consists of integers 0 through n (or first n+1 nonnegative integers A001477); illustrating the case n=5:
0 1 2 3 4 5
1 3 5 7 9
4 8 12 16
12 20 28
32 48
80
and the final element is a(5)=80. (End)
This sequence and A001871 arise in counting ordered trees of height at most k where only the rightmost branch at the root actually achieves this height and the count is by the number of edges, with k = 3 for this sequence and k = 4 for A001871.
Let R be a binary relation on the power set P(A) of a set A having n = |A| elements such that for all elements x,y of P(A), xRy if x is a proper subset of y and there are no z in P(A) such that x is a proper subset of z and z is a proper subset of y. Then a(n) = |R|. - Ross La Haye, Sep 21 2004
Number of 2 X n binary matrices avoiding simultaneously the right-angled numbered polyomino patterns (ranpp) (00;1) and (10;1). An occurrence of a ranpp (xy;z) in a matrix A=(a(i,j)) is a triple (a(i1,j1), a(i1,j2), a(i2,j1)) where i1 < i2, j1 < j2 and these elements are in same relative order as those in the triple (x,y,z). - Sergey Kitaev, Nov 11 2004
Number of subsequences 00 in all binary words of length n+1. Example: a(2)=4 because in 000,001,010,011,100,101,110,111 the sequence 00 occurs 4 times. - Emeric Deutsch, Apr 04 2005
If you expand the n-factor expression (a+1)*(b+1)*(c+1)*...*(z+1), there are a(n) variables in the result. For example, the 3-factor expression (a+1)*(b+1)*(c+1) expands to abc+ab+ac+bc+a+b+c+1 with a(3) = 12 variables. - David W. Wilson, May 08 2005
An inverse Chebyshev transform of n^2, where g(x)->(1/sqrt(1-4*x^2))*g(x*c(x^2)), c(x) the g.f. of A000108. - Paul Barry, May 13 2005
Sequences A018215 and A058962 interleaved. - Graeme McRae, Jul 12 2006
The number of never-decreasing positive integer sequences of length n with a maximum value of 2*n. - Ben Paul Thurston, Nov 13 2006
Total size of all the subsets of an n-element set. For example, a 2-element set has 1 subset of size 0, 2 subsets of size 1 and 1 of size 2. - Ross La Haye, Dec 30 2006
Convolution of the natural numbers [A000027] and A045623 beginning [0,1,2,5,...]. - Ross La Haye, Feb 03 2007
If M is the matrix (given by rows) [2,1;0,2] then the sequence gives the (1,2) entry in M^n. - Antonio M. Oller-Marcén, May 21 2007
If X_1,X_2,...,X_n is a partition of a 2n-set X into 2-blocks then, for n > 0, a(n) is equal to the number of (n+1)-subsets of X intersecting each X_i (i=1,2,...,n). - Milan Janjic, Jul 21 2007
Number of n-permutations of 3 objects u,v,w, with repetition allowed, containing exactly one u. Example: a(2)=4 because we have uv, vu, uw and wu. - Zerinvary Lajos, Dec 27 2007
A member of the family of sequences defined by a(n) = n*[c(1)*...*c(r)]^(n-1); c(i) integer. This sequence has c(1)=2, A027471 has c(1)=3. - Ctibor O. Zizka, Feb 23 2008
a(n) is the number of ways to split {1,2,...,n-1} into two (possibly empty) complementary intervals {1,2,...,i} and {i+1,i+2,...,n-1} and then select a subset from each interval. - Geoffrey Critzer, Jan 31 2009
Equals the Jacobsthal sequence A001045 convolved with A003945: (1, 3, 6, 12, ...). - Gary W. Adamson, May 23 2009
Starting with offset 1 = A059570: (1, 2, 6, 14, 34, ...) convolved with (1, 2, 2, 2, ...). - Gary W. Adamson, May 23 2009
Equals the first left hand column of A167591. - Johannes W. Meijer, Nov 12 2009
The number of tatami tilings of an n X n square with n monomers is n*2^(n-1). - Frank Ruskey, Sep 25 2010
Under T. D. Noe's variant of the hypersigma function, this sequence gives hypersigma(2^n): a(n) = A191161(A000079(n)). - Alonso del Arte, Nov 04 2011
Number of Dyck (n+2)-paths with exactly one valley at height 1 and no higher valley. - David Scambler, Nov 07 2011
Equals triangle A059260 * A016777 as a vector, where A016777 = (3n + 1): [1, 4, 7, 10, 13, ...]. - Gary W. Adamson, Mar 06 2012
Main transitions in systems of n particles with spin 1/2 (see A212697 with b=2). - Stanislav Sykora, May 25 2012
Let T(n,k) be the triangle with (first column) T(n,1) = 2*n-1 for n >= 1, otherwise T(n,k) = T(n,k-1) + T(n-1,k-1), then a(n) = T(n,n). - J. M. Bergot, Jan 17 2013
Sum of all parts of all compositions (ordered partitions) of n. The equivalent sequence for partitions is A066186. - Omar E. Pol, Aug 28 2013
Starting with a(1)=1: powers of 2 (A000079) self-convolved. - Bob Selcoe, Aug 05 2015
Coefficients of the series expansion of the normalized Schwarzian derivative -S{p(x)}/6 of the polynomial p(x) = -(x-x1)*(x-x2) with x1 + x2 = 1 (cf. A263646). - Tom Copeland, Nov 02 2015
a(n) is the number of North-East lattice paths from (0,0) to (n+1,n+1) that have exactly one east step below y = x-1 and no east steps above y = x+1. Details can be found in Pan and Remmel's link. - Ran Pan, Feb 03 2016
Also the number of maximal and maximum cliques in the n-hypercube graph for n > 0. - Eric W. Weisstein, Dec 01 2017
Let [n]={1,2,...,n}; then a(n-1) is the total number of elements missing in proper subsets of [n] that contain n to form [n]. For example, for n = 3, a(2) = 4 since the proper subsets of [3] that contain 3 are {3}, {1,3}, {2,3} and the total number of elements missing in these subsets to form [3] is 4: 2 in the first subset, 1 in the second, and 1 in the third. - Enrique Navarrete, Aug 08 2020
Number of 3-permutations of n elements avoiding the patterns 132, 231. See Bonichon and Sun. - Michel Marcus, Aug 19 2022

Examples

			a(2)=4 since 2314, 2341,3124 and 4123 are the only 132-avoiding permutations of 1234 containing exactly one increasing subsequence of length 3.
x + 4*x^2 + 12*x^3 + 32*x^4 + 80*x^5 + 192*x^6 + 448*x^7 + ...
a(5) = 1*0 + 5*1 + 10*2 + 10*3 + 5*4 + 1*5 = 80, with 1,5,10,10,5,1 the 5th row of Pascal's triangle. - _J. M. Bergot_, Apr 29 2014
		

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. 796.
  • A. T. Benjamin and J. J. Quinn, Proofs that really count: the art of combinatorial proof, M.A.A. 2003, id. 131.
  • Clifford A. Pickover, The Math Book, From Pythagoras to the 57th Dimension, 250 Milestones in the History of Mathematics, Sterling Publ., NY, 2009, page 282.
  • 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

Three other versions, essentially identical, are A085750, A097067, A118442.
Partial sums of A001792.
A058922(n+1) = 4*A001787(n).
Equals A090802(n, 1).
Column k=1 of A038207.
Row sums of A003506, A322427, A322428.

Programs

  • Haskell
    a001787 n = n * 2 ^ (n - 1)
    a001787_list = zipWith (*) [0..] $ 0 : a000079_list
    -- Reinhard Zumkeller, Jul 11 2014
    
  • Magma
    [n*2^(n-1): n in [0..40]]; // Vincenzo Librandi, Feb 04 2016
    
  • Maple
    spec := [S, {B=Set(Z, 0 <= card), S=Prod(Z, B, B)}, labeled]: seq(combstruct[count](spec, size=n), n=0..29); # Zerinvary Lajos, Oct 09 2006
    A001787:=1/(2*z-1)^2; # Simon Plouffe in his 1992 dissertation, dropping the initial zero
  • Mathematica
    Table[Sum[Binomial[n, i] i, {i, 0, n}], {n, 0, 30}] (* Geoffrey Critzer, Mar 18 2009 *)
    f[n_] := n 2^(n - 1); f[Range[0, 40]] (* Vladimir Joseph Stephan Orlovsky, Feb 09 2011 *)
    Array[# 2^(# - 1) &, 40, 0] (* Harvey P. Dale, Jul 26 2011 *)
    Join[{0}, Table[n 2^(n - 1), {n, 20}]] (* Eric W. Weisstein, Dec 01 2017 *)
    Join[{0}, LinearRecurrence[{4, -4}, {1, 4}, 20]] (* Eric W. Weisstein, Dec 01 2017 *)
    CoefficientList[Series[x/(-1 + 2 x)^2, {x, 0, 20}], x] (* Eric W. Weisstein, Dec 01 2017 *)
  • PARI
    {a(n) = if( n<0, 0, n * 2^(n-1))}
    
  • PARI
    concat(0, Vec(x/(1-2*x)^2 + O(x^50))) \\ Altug Alkan, Nov 03 2015
    
  • Python
    def A001787(n): return n*(1<Chai Wah Wu, Nov 14 2022

Formula

a(n) = Sum_{k=1..n} k*binomial(n, k). - Benoit Cloitre, Dec 06 2002
E.g.f.: x*exp(2x). - Paul Barry, Apr 10 2003
G.f.: x/(1-2*x)^2.
G.f.: x / (1 - 4*x / (1 + x / (1 - x))). - Michael Somos, Apr 07 2012
A108666(n) = Sum_{k=0..n} binomial(n, k)^2 * a(n). - Michael Somos, Apr 07 2012
PSumSIGN transform of A053220. PSumSIGN transform is A045883. Binomial transform is A027471(n+1). - Michael Somos, Jul 10 2003
Starting at a(1)=1, INVERT transform is A002450, INVERT transform of A049072, MOBIUS transform of A083413, PSUM transform is A000337, BINOMIAL transform is A081038, BINOMIAL transform of A005408. - Michael Somos, Apr 07 2012
a(n) = 2*a(n-1)+2^(n-1).
a(2*n) = n*4^n, a(2*n+1) = (2*n+1)4^n.
G.f.: x/det(I-x*M) where M=[1,i;i,1], i=sqrt(-1). - Paul Barry, Apr 27 2005
Starting 1, 1, 4, 12, ... this is 0^n + n2^(n-1), the binomial transform of the 'pair-reversed' natural numbers A004442. - Paul Barry, Jul 24 2003
Convolution of [1, 2, 4, 8, ...] with itself. - Jon Perry, Aug 07 2003
The signed version of this sequence, n(-2)^(n-1), is the inverse binomial transform of n(-1)^(n-1) (alternating sign natural numbers). - Paul Barry, Aug 20 2003
a(n-1) = (Sum_{k=0..n} 2^(n-k-1)*C(n-k, k)*C(1,(k+1)/2)*(1-(-1)^k)/2) - 0^n/4. - Paul Barry, Oct 15 2004
a(n) = Sum_{k=0..floor(n/2)} binomial(n, k)(n-2k)^2. - Paul Barry, May 13 2005
a(n+2) = A049611(n+2) - A001788(n).
a(n) = n! * Sum_{k=0..n} 1/((k - 1)!(n - k)!). - Paul Barry, Mar 26 2003
a(n+1) = Sum_{k=0..n} 4^k * A109466(n,k). - Philippe Deléham, Nov 13 2006
Row sums of A130300 starting (1, 4, 12, 32, ...). - Gary W. Adamson, May 20 2007
Equals row sums of triangle A134083. Equals A002064(n) + (2^n - 1). - Gary W. Adamson, Oct 07 2007
a(n) = 4*a(n-1) - 4*a(n-2), a(0)=0, a(1)=1. - Philippe Deléham, Nov 16 2008
Sum_{n>0} 1/a(n) = 2*log(2). - Jaume Oliver Lafont, Feb 10 2009
a(n) = A000788(A000225(n)) = A173921(A000225(n)). - Reinhard Zumkeller, Mar 04 2010
a(n) = n * A011782(n). - Omar E. Pol, Aug 28 2013
a(n-1) = Sum_{t_1+2*t_2+...+n*t_n=n} (t_1+t_2+...+t_n-1)*multinomial(t_1+t_2 +...+t_n,t_1,t_2,...,t_n). - Mircea Merca, Dec 06 2013
a(n+1) = Sum_{r=0..n} (2*r+1)*C(n,r). - J. M. Bergot, Apr 07 2014
a(n) = A007283(n)*n/6. - Enxhell Luzhnica, Apr 16 2016
a(n) = (A000225(n) + A000337(n))/2. - Anton Zakharov, Sep 17 2016
Sum_{n>0} (-1)^(n+1)/a(n) = 2*log(3/2) = 2*A016578. - Ilya Gutkovskiy, Sep 17 2016
a(n) = Sum_{k=0..n-1} Sum_{i=0..n-1} (i+1) * C(k,i). - Wesley Ivan Hurt, Sep 21 2017
a(n) = Sum_{i=1..n} Sum_{j=1..n} phi(i)*binomial(n, i*j). - Ridouane Oudra, Feb 17 2024

A032766 Numbers that are congruent to 0 or 1 (mod 3).

Original entry on oeis.org

0, 1, 3, 4, 6, 7, 9, 10, 12, 13, 15, 16, 18, 19, 21, 22, 24, 25, 27, 28, 30, 31, 33, 34, 36, 37, 39, 40, 42, 43, 45, 46, 48, 49, 51, 52, 54, 55, 57, 58, 60, 61, 63, 64, 66, 67, 69, 70, 72, 73, 75, 76, 78, 79, 81, 82, 84, 85, 87, 88, 90, 91, 93, 94, 96, 97, 99, 100, 102, 103
Offset: 0

Views

Author

Patrick De Geest, May 15 1998

Keywords

Comments

Omitting the initial 0, a(n) is the number of 1's in the n-th row of the triangle in A118111. - Hans Havermann, May 26 2002
Binomial transform is A053220. - Michael Somos, Jul 10 2003
Smallest number of different people in a set of n-1 photographs that satisfies the following conditions: In each photograph there are 3 women, the woman in the middle is the mother of the person on her left and is a sister of the person on her right and the women in the middle of the photographs are all different. - Fung Cheok Yin (cheokyin_restart(AT)yahoo.com.hk), Sep 22 2006
Partial sums of A000034. - Richard Choulet, Jan 28 2010
Starting with 1 = row sums of triangle A171370. - Gary W. Adamson, Feb 15 2010
a(n) is the set of values for m in which 6k + m can be a perfect square (quadratic residues of 6 including trivial case of 0). - Gary Detlefs, Mar 19 2010
For n >= 2, a(n) is the smallest number with n as an anti-divisor. - Franklin T. Adams-Watters, Oct 28 2011
Sequence is also the maximum number of floors with 3 elevators and n stops in a "Convenient Building". See A196592 and Erich Friedman link below. - Robert Price, May 30 2013
a(n) is also the total number of coins left after packing 4-curves patterns (4c2) into a fountain of coins base n. The total number of 4c2 is A002620 and voids left is A000982. See illustration in links. - Kival Ngaokrajang, Oct 26 2013
Number of partitions of 6n into two even parts. - Wesley Ivan Hurt, Nov 15 2014
Number of partitions of 3n into exactly 2 parts. - Colin Barker, Mar 23 2015
Nonnegative m such that floor(2*m/3) = 2*floor(m/3). - Bruno Berselli, Dec 09 2015
For n >= 3, also the independence number of the n-web graph. - Eric W. Weisstein, Dec 31 2015
Equivalently, nonnegative numbers m for which m*(m+2)/3 and m*(m+5)/6 are integers. - Bruno Berselli, Jul 18 2016
Also the clique covering number of the n-Andrásfai graph for n > 0. - Eric W. Weisstein, Mar 26 2018
Maximum sum of degeneracies over all decompositions of the complete graph of order n+1 into three factors. The extremal decompositions are characterized in the Bickle link below. - Allan Bickle, Dec 21 2021
Also the Hadwiger number of the n-cocktail party graph. - Eric W. Weisstein, Apr 30 2022
The number of integer rectangles with a side of length n+1 and the property: the bisectors of the angles form a square within its limits. - Alexander M. Domashenko, Oct 17 2024
The maximum possible number of 5-cycles in an outerplanar graph on n+4 vertices. - Stephen Bartell, Jul 10 2025

Crossrefs

Cf. A006578 (partial sums), A000034 (first differences), A016789 (complement).
Essentially the same: A049624.
Column 1 (the second leftmost) of triangular table A026374.
Column 1 (the leftmost) of square array A191450.
Row 1 of A254051.
Row sums of A171370.
Cf. A066272 for anti-divisors.
Cf. A253888 and A254049 (permutations of this sequence without the initial zero).
Cf. A254103 and A254104 (pair of permutations based on this sequence and its complement).

Programs

  • Haskell
    a032766 n = div n 2 + n  -- Reinhard Zumkeller, Dec 13 2014
    (MIT/GNU Scheme) (define (A032766 n) (+ n (floor->exact (/ n 2)))) ;; Antti Karttunen, Jan 24 2015
    
  • Magma
    &cat[ [n, n+1]: n in [0..100 by 3] ]; // Vincenzo Librandi, Nov 16 2014
    
  • Maple
    a[0]:=0:a[1]:=1:for n from 2 to 100 do a[n]:=a[n-2]+3 od: seq(a[n], n=0..69); # Zerinvary Lajos, Mar 16 2008
    seq(floor(n/2)+n, n=0..69); # Gary Detlefs, Mar 19 2010
    select(n->member(n mod 3,{0,1}), [$0..103]); # Peter Luschny, Apr 06 2014
  • Mathematica
    a[n_] := a[n] = 2a[n - 1] - 2a[n - 3] + a[n - 4]; a[0] = 0; a[1] = 1; a[2] = 3; a[3] = 4; Array[a, 60, 0] (* Robert G. Wilson v, Mar 28 2011 *)
    Select[Range[0, 200], MemberQ[{0, 1}, Mod[#, 3]] &] (* Vladimir Joseph Stephan Orlovsky, Feb 11 2012 *)
    Flatten[{#,#+1}&/@(3Range[0,40])] (* or *) LinearRecurrence[{1,1,-1}, {0,1,3}, 100] (* or *) With[{nn=110}, Complement[Range[0,nn], Range[2,nn,3]]] (* Harvey P. Dale, Mar 10 2013 *)
    CoefficientList[Series[x (1 + 2 x) / ((1 - x) (1 - x^2)), {x, 0, 100}], x] (* Vincenzo Librandi, Nov 16 2014 *)
    Floor[3 Range[0, 69]/2] (* L. Edson Jeffery, Jan 14 2017 *)
    Drop[Range[0,110],{3,-1,3}] (* Harvey P. Dale, Sep 02 2023 *)
  • PARI
    {a(n) = n + n\2}
    
  • PARI
    concat(0, Vec(x*(1+2*x)/((1-x)*(1-x^2)) + O(x^100))) \\ Altug Alkan, Dec 09 2015
    
  • SageMath
    [int(3*n//2) for n in range(101)] # G. C. Greubel, Jun 23 2024

Formula

G.f.: x*(1+2*x)/((1-x)*(1-x^2)).
a(-n) = -A007494(n).
a(n) = A049615(n, 2), for n > 2.
From Paul Barry, Sep 04 2003: (Start)
a(n) = (6n - 1 + (-1)^n)/4.
a(n) = floor((3n + 2)/2) - 1 = A001651(n) - 1.
a(n) = sqrt(2) * sqrt( (6n-1) (-1)^n + 18n^2 - 6n + 1 )/4.
a(n) = Sum_{k=0..n} 3/2 - 2*0^k + (-1)^k/2. (End)
a(n) = 3*floor(n/2) + (n mod 2) = A007494(n) - A000035(n). - Reinhard Zumkeller, Apr 04 2005
a(n) = 2 * A004526(n) + A004526(n+1). - Philippe Deléham, Aug 07 2006
a(n) = 1 + ceiling(3*(n-1)/2). - Fung Cheok Yin (cheokyin_restart(AT)yahoo.com.hk), Sep 22 2006
Row sums of triangle A133083. - Gary W. Adamson, Sep 08 2007
a(n) = (cos(Pi*n) - 1)/4 + 3*n/2. - Bart Snapp (snapp(AT)coastal.edu), Sep 18 2008
A004396(a(n)) = n. - Reinhard Zumkeller, Oct 30 2009
a(n) = floor(n/2) + n. - Gary Detlefs, Mar 19 2010
a(n) = 3n - a(n-1) - 2, for n>0, a(0)=0. - Vincenzo Librandi, Nov 19 2010
a(n) = n + (n-1) - (n-2) + (n-3) - ... 1 = A052928(n) + A008619(n-1). - Jaroslav Krizek, Mar 22 2011
a(n) = a(n-1) + a(n-2) - a(n-3). - Robert G. Wilson v, Mar 28 2011
a(n) = Sum_{k>=0} A030308(n,k) * A003945(k). - Philippe Deléham, Oct 17 2011
a(n) = 2n - ceiling(n/2). - Wesley Ivan Hurt, Oct 25 2013
a(n) = A000217(n) - 2 * A002620(n-1). - Kival Ngaokrajang, Oct 26 2013
a(n) = Sum_{i=1..n} gcd(i, 2). - Wesley Ivan Hurt, Jan 23 2014
a(n) = 2n + floor((-n - (n mod 2))/2). - Wesley Ivan Hurt, Mar 31 2014
A092942(a(n)) = n for n > 0. - Reinhard Zumkeller, Dec 13 2014
a(n) = floor(3*n/2). - L. Edson Jeffery, Jan 18 2015
a(n) = A254049(A249745(n)) = (1+A007310(n)) / 2 for n >= 1. - Antti Karttunen, Jan 24 2015
E.g.f.: (3*x*exp(x) - sinh(x))/2. - Ilya Gutkovskiy, Jul 18 2016
Sum_{n>=1} (-1)^(n+1)/a(n) = Pi/(6*sqrt(3)) + log(3)/2. - Amiram Eldar, Dec 04 2021

Extensions

Better description from N. J. A. Sloane, Aug 01 1998

A027471 a(n) = (n-1)*3^(n-2), n > 0.

Original entry on oeis.org

0, 1, 6, 27, 108, 405, 1458, 5103, 17496, 59049, 196830, 649539, 2125764, 6908733, 22320522, 71744535, 229582512, 731794257, 2324522934, 7360989291, 23245229340, 73222472421, 230127770466, 721764371007, 2259436291848
Offset: 1

Views

Author

Keywords

Comments

Arithmetic derivative of 3^(n-1): a(n) = A003415(A000244(n-1)). - Reinhard Zumkeller, Feb 26 2002 [Offset corrected by Jianing Song, May 28 2024]
Binomial transform of A053220(n+1) is a(n+2). Binomial transform of A001787 is a(n+1). Binomial transform of A045883(n-1). - Michael Somos, Jul 10 2003
If X_1,X_2,...,X_n are 3-blocks of a (3n+1)-set X then, for n >= 1, a(n+2) is the number of (n+1)-subsets of X intersecting each X_i, (i=1,2,...,n). > - Milan Janjic, Nov 18 2007
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+1) = the sum of the differences in size (i.e., |y|-|x|) for all (x, y) of S. - Ross La Haye, Nov 19 2007
Number of substrings 00 (or 11, or 22) in all ternary words of length n: a(3) = 6 because we have 000, 001, 002, 100, 200 (with 000 contributing two substrings). - Darrell Minor, Jul 17 2025

Crossrefs

Second column of A027465.
Partial sums of A081038.
Cf. A006234.

Programs

  • GAP
    List([1..40], n-> (n-1)*3^(n-2)); # Muniru A Asiru, Jul 15 2018
    
  • Magma
    [(n-1)*3^(n-2): n in [1..30]]; // Vincenzo Librandi, Jun 09 2011
    
  • Maple
    seq((n-1)*3^(n-2), n=1..40); # Muniru A Asiru, Jul 15 2018
  • Mathematica
    Table[(n-1)3^(n-2),{n,30}] (* or *)
    LinearRecurrence[{6,-9},{0,1},30] (* Harvey P. Dale, Apr 14 2016 *)
    Range[0, 24]! CoefficientList[ Series[x*Exp[3 x], {x, 0, 24}], x] (* Robert G. Wilson v, Aug 03 2018 *)
  • PARI
    a(n)=if(n<1, 0, (n-1)*3^(n-2));
    
  • Sage
    [3^(n-2)*(n-1) for n in (1..30)] # G. C. Greubel, May 20 2021

Formula

From Wolfdieter Lang: (Start)
G.f.: (x/(1-3*x))^2.
E.g.f.: (1 + (3*x-1)*exp(3*x))/9.
a(n) = 3^(n-2)*(n-1) (convolution of A000244, powers of 3, with itself). (End)
a(n) = 6*a(n-1) - 9*a(n-2), n > 2, a(1)=0, a(2)=1. - Barry E. Williams, Jan 13 2000
a(n) = A036290(n-1)/3, for n>0. - Paul Barry, Feb 06 2004 [corrected by Jerzy R Borysowicz, Apr 03 2025]
a(n) = Sum_{k=0..n} 3^(n-k)*binomial(n-k+1, k)*binomial(1, (k+1)/2)*(1-(-1)^k)/2.
From Paul Barry, Feb 15 2005: (Start)
a(n) = (1/3)*Sum_{k=0..2n} T(n, k)*k, where T(n, k) is given by A027907.
a(n) = (1/3)*Sum_{k=0..n} Sum_{j=0..n} C(n, j)*C(j, k)*(j+k).
a(n) = Sum_{k=0..n} Sum_{j=0..n} C(n, j)*C(j, k)*(j-k).
a(n+1) = Sum_{k=0..n} Sum_{j=0..n} C(n, j)*C(j, k)*(j+k+1). (End)
Sum_{n>=2} 1/a(n) = 3*log(3/2). - Jaume Oliver Lafont, Sep 19 2009
a(n) = 3*a(n-1) + 3^(n-2) (with a(1)=0). - Vincenzo Librandi, Dec 30 2010
Sum_{n>=2} (-1)^n/a(n) = 3*log(4/3). - Amiram Eldar, Oct 28 2020

Extensions

Edited by Michael Somos, Jul 10 2003

A126473 Number of strings over a 5 symbol alphabet with adjacent symbols differing by three or less.

Original entry on oeis.org

1, 5, 23, 107, 497, 2309, 10727, 49835, 231521, 1075589, 4996919, 23214443, 107848529, 501037445, 2327695367, 10813893803, 50238661313, 233396326661, 1084301290583, 5037394142315, 23402480441009, 108722104190981, 505095858086951, 2346549744920747
Offset: 0

Views

Author

R. H. Hardin, Dec 27 2006

Keywords

Comments

[Empirical] a(base,n) = a(base-1,n) + 7^(n-1) for base >= 3n-2; a(base,n) = a(base-1,n) + 7^(n-1)-2 when base = 3n-3.
From Johannes W. Meijer, Aug 01 2010: (Start)
The a(n) represent the number of n-move routes of a fairy chess piece starting in a given side square (m = 2, 4, 6 or 8) on a 3 X 3 chessboard. This fairy chess piece behaves like a king on the eight side and corner squares but on the central square the king goes crazy and turns into a red king, see A179596.
For the side squares the 512 red kings lead to 47 different red king sequences, see the cross-references for some examples.
The sequence above corresponds to four A[5] vectors with the decimal [binary] values 367 [1,0,1,1,0,1,1,1,1], 463 [1,1,1,0,0,1,1,1,1], 487 [1,1,1,1,0,0,1,1,1] and 493 [1,1,1,1,0,1,1,0,1]. These vectors lead for the corner squares to A179596 and for the central square to A179597.
This sequence belongs to a family of sequences with g.f. (1+x)/(1-4*x-k*x^2). Red king sequences that are members of this family are A003947 (k=0), A015448 (k=1), A123347 (k=2), A126473 (k=3; this sequence) and A086347 (k=4). Other members of this family are A000351 (k=5), A001834 (k=-1), A111567 (k=-2), A048473 (k=-3) and A053220 (k=-4)
Inverse binomial transform of A154244. (End)
Equals the INVERT transform of A055099: (1, 4, 14, 50, 178, ...). - Gary W. Adamson, Aug 14 2010
Number of one-sided n-step walks taking steps from {E, W, N, NE, NW}. - Shanzhen Gao, May 10 2011
For n>=1, a(n) equals the numbers of words of length n-1 on alphabet {0,1,2,3,4} containing no subwords 00 and 11. - Milan Janjic, Jan 31 2015

Crossrefs

Cf. 5 symbol differing by two or less A126392, one or less A057960.
Cf. Red king sequences side squares [numerical value A[5]]: A086347 [495], A179598 [239], A126473 [367], A123347 [335], A179602 [95], A154964 [31], A015448 [327], A152187 [27], A003947 [325], A108981 [11], A007483 [2]. - Johannes W. Meijer, Aug 01 2010
Cf. A055099.

Programs

  • Maple
    with(LinearAlgebra): nmax:=19; m:=2; A[5]:= [1,0,1,1,0,1,1,1,1]: A:=Matrix([[0,1,0,1,1,0,0,0,0],[1,0,1,1,1,1,0,0,0],[0,1,0,0,1,1,0,0,0],[1,1,0,0,1,0,1,1,0],A[5],[0,1,1,0,1,0,0,1,1],[0,0,0,1,1,0,0,1,0],[0,0,0,1,1,1,1,0,1],[0,0,0,0,1,1,0,1,0]]): for n from 0 to nmax do B(n):=A^n: a(n):= add(B(n)[m,k],k=1..9): od: seq(a(n), n=0..nmax); # Johannes W. Meijer, Aug 01 2010
    # second Maple program:
    a:= n-> (M-> M[1,2]+M[2,2])(<<0|1>, <3|4>>^n):
    seq(a(n), n=0..24);  # Alois P. Heinz, Jun 28 2021
  • Mathematica
    LinearRecurrence[{4, 3}, {1, 5}, 24] (* Jean-François Alcover, Dec 10 2024 *)
  • PARI
    a(n)=([0,1; 3,4]^n*[1;5])[1,1] \\ Charles R Greathouse IV, May 10 2016

Formula

From Johannes W. Meijer, Aug 01 2010: (Start)
G.f.: (1+x)/(1-4*x-3*x^2).
a(n) = 4*a(n-1) + 3*a(n-2) with a(0) = 1 and a(1) = 5.
a(n) = ((1+3/sqrt(7))/2)*(A)^(-n) + ((1-3/sqrt(7))/2)*(B)^(-n) with A = (-2 + sqrt(7))/3 and B = (-2-sqrt(7))/3.
Lim_{k->oo} a(n+k)/a(k) = (-1)^(n+1)*A000244(n)/(A015530(n)*sqrt(7)-A108851(n))
(End)
a(n) = A015330(n)+A015330(n+1). - R. J. Mathar, May 09 2023

Extensions

Edited by Johannes W. Meijer, Aug 10 2010

A056242 Triangle read by rows: T(n,k) = number of k-part order-consecutive partition of {1,2,...,n} (1 <= k <= n).

Original entry on oeis.org

1, 1, 2, 1, 5, 4, 1, 9, 16, 8, 1, 14, 41, 44, 16, 1, 20, 85, 146, 112, 32, 1, 27, 155, 377, 456, 272, 64, 1, 35, 259, 833, 1408, 1312, 640, 128, 1, 44, 406, 1652, 3649, 4712, 3568, 1472, 256, 1, 54, 606, 3024, 8361, 14002, 14608, 9312, 3328, 512, 1, 65, 870, 5202
Offset: 1

Views

Author

Colin Mallows, Aug 23 2000

Keywords

Comments

Generalized Riordan array (1/(1-x), x/(1-x) + x*dif(x/1-x),x)). - Paul Barry, Dec 26 2007
Reversal of A117317. - Philippe Deléham, Feb 11 2012
Essentially given by (1, 0, 1/2, 1/2, 0, 0, 0, 0, 0, 0, 0, ...) DELTA (0, 2, 0, 0, 0, 0, 0, 0, 0, ...) where DELTA is the operator defined in A084938. - Philippe Deléham, Feb 11 2012
This sequence is given in the Strehl presentation with the o.g.f. (1-z)/[1-2(1+t)z+(1+t)z^2], with offset 0, along with a recursion relation, a combinatorial interpretation, and relations to Hermite and Laguerre polynomials. Note that the o.g.f. is related to that of A049310. - Tom Copeland, Jan 08 2017
From Gus Wiseman, Mar 06 2020: (Start)
T(n,k) is also the number of unimodal length-n sequences covering an initial interval of positive integers with maximum part k, where a sequence of integers is unimodal if it is the concatenation of a weakly increasing and a weakly decreasing sequence. For example, the sequences counted by row n = 4 are:
(1111) (1112) (1123) (1234)
(1121) (1132) (1243)
(1122) (1223) (1342)
(1211) (1231) (1432)
(1221) (1232) (2341)
(1222) (1233) (2431)
(2111) (1321) (3421)
(2211) (1322) (4321)
(2221) (1332)
(2231)
(2311)
(2321)
(2331)
(3211)
(3221)
(3321)
(End)
T(n,k) is the number of hexagonal directed-column convex polyominoes of area n with k columns (see Baril et al. at page 9). - Stefano Spezia, Oct 14 2023

Examples

			Triangle begins:
  1;
  1,    2;
  1,    5,    4;
  1,    9,   16,    8;
  1,   14,   41,   44,   16;
  1,   20,   85,  146,  112,   32;
  1,   27,  155,  377,  456,  272,   64;
  1,   35,  259,  833, 1408, 1312,  640,  128;
  1,   44,  406, 1652, 3649, 4712, 3568, 1472,  256;
T(3,2)=5 because we have {1}{23}, {23}{1}, {12}{3}, {3}{12} and {2}{13}.
Triangle (1, 0, 1/2, 1/2, 0, 0, 0, ...) DELTA (0, 2, 0, 0, 0, ...) begins:
  1;
  1,   0;
  1,   2,   0;
  1,   5,   4,   0;
  1,   9,  16,   8,   0;
  1,  14,  41,  44,  16,   0;
  1,  20,  85, 146, 112,  32,   0;
  1,  27, 155, 377, 456, 272,  64,   0;
		

Crossrefs

Row sums are A007052.
Column k = n - 1 is A053220.
Ordered set-partitions are A000670.

Programs

  • Haskell
    a056242 n k = a056242_tabl !! (n-1)!! (k-1)
    a056242_row n = a056242_tabl !! (n-1)
    a056242_tabl = [1] : [1,2] : f [1] [1,2] where
       f us vs = ws : f vs ws where
         ws = zipWith (-) (map (* 2) $ zipWith (+) ([0] ++ vs) (vs ++ [0]))
                          (zipWith (+) ([0] ++ us ++ [0]) (us ++ [0,0]))
    -- Reinhard Zumkeller, May 08 2014
  • Maple
    T:=proc(n,k) if k=1 then 1 elif k<=n then sum((-1)^(k-1-j)*binomial(k-1,j)*binomial(n+2*j-1,2*j),j=0..k-1) else 0 fi end: seq(seq(T(n,k),k=1..n),n=1..12);
  • Mathematica
    rows = 11; t[n_, k_] := (-1)^(k+1)*HypergeometricPFQ[{1-k, (n+1)/2, n/2}, {1/2, 1}, 1]; Flatten[ Table[ t[n, k], {n, 1, rows}, {k, 1, n}]](* Jean-François Alcover, Nov 17 2011 *)

Formula

The Hwang and Mallows reference gives explicit formulas.
T(n,k) = Sum_{j=0..k-1} (-1)^(k-1-j)*binomial(k-1, j)*binomial(n+2j-1, 2j) (1<=k<=n); this is formula (11) in the Huang and Mallows reference.
T(n,k) = 2*T(n-1,k) + 2*T(n-1,k-1) - T(n-2,k) - T(n-2,k-1), T(1,1) = 1, T(2,1) = 1, T(2,2) = 2. - Philippe Deléham, Feb 11 2012
G.f.: -(-1+x)*x*y/(1-2*x-2*x*y+x^2*y+x^2). - R. J. Mathar, Aug 11 2015

A152920 Triangle read by rows: triangle A062111 reversed.

Original entry on oeis.org

0, 1, 1, 2, 3, 4, 3, 5, 8, 12, 4, 7, 12, 20, 32, 5, 9, 16, 28, 48, 80, 6, 11, 20, 36, 64, 112, 192, 7, 13, 24, 44, 80, 144, 256, 448, 8, 15, 28, 52, 96, 176, 320, 576, 1024, 9, 17, 32, 60, 112, 208, 384, 704, 1280, 2304, 10, 19, 36, 68, 128, 240, 448, 832, 1536, 2816, 5120
Offset: 0

Views

Author

Paul Curtz, Dec 15 2008

Keywords

Examples

			Triangle starts:
  0;
  1,  1;
  2,  3,  4;
  3,  5,  8, 12;
  4,  7, 12, 20, 32;
  ...
		

Crossrefs

Programs

  • Magma
    [2^k*(n-k/2): k in [0..n], n in [0..12]]; // G. C. Greubel, Sep 27 2022
    
  • Maple
    A062111 := proc(n,k) (k+n)*2^(k-n-1) ; end: A152920 := proc(n,k) A062111(n-k,n) ; end: for n from 0 to 15 do for k from 0 to n do printf("%d,",A152920(n,k)) ; od: od: # R. J. Mathar, Jan 22 2009
    # second Maple program:
    T:= proc(n, k) option remember;
         `if`(k=0, n, T(n, k-1)+T(n-1, k-1))
        end:
    seq(seq(T(n, k), k=0..n), n=0..12);  # Alois P. Heinz, Sep 12 2022
  • Mathematica
    t[0, k_]:= k; t[n_, k_]:= t[n, k]= t[n-1, k] + t[n-1, k+1];
    Table[t[n-k, k], {n,0,10}, {k,n,0,-1}]//Flatten (* Jean-François Alcover, Sep 11 2016 *)
  • SageMath
    flatten([[2^(k-1)*(2*n-k) for k in range(n+1)] for n in range(12)]) # G. C. Greubel, Sep 27 2022

Formula

Row sums: (2^n-1)(n+1) = A058877(n). - R. J. Mathar, Jan 22 2009
T(2n, n) = 3*n*2^(n-1) = 3*A001787(n). - Philippe Deléham, Apr 20 2009
From Werner Schulte, Jul 31 2020: (Start)
T(n, k) = (2*n-k) * 2^(k-1) for 0 <= k <= n.
G.f.: Sum_{n>=0, k=0..n} T(n,k) * x^k * t^n = t*(1+x-3*x*t) / ((1-t)^2 * (1-2*x*t)^2).
Sum_{k=0..n} (-1)^k * binomial(n,k) * T(n,k) = 0 for n >= 0.
Sum_{k=0..n} binomial(n,k) * T(n,k) = 2*n * 3^(n-1) for n >= 0.
Define the array B(n,p) = (Sum_{k=0..n} binomial(p+k,p) * T(n,k))/(n+p+1) for n >= 0 and p >= 0. Then see the comment of Robert Coquereaux (2014) at A193844. Conjecture: B(n+1,p) = A(n,p). (End)
T(n, k) = T(n, k-1) + T(n-1, k-1) for k>=1, T(n,0) = n. - Alois P. Heinz, Sep 12 2022
From G. C. Greubel, Sep 27 2022: (Start)
T(n, n-1) = A001792(n).
T(2*n-1, n-1) = A053220(n).
T(2*n+1, n-1) = 3*A001792(n).
T(m*n, n) = (2*m-1)*A001787(n), for m >= 1. (End)

Extensions

Edited by N. J. A. Sloane, Dec 19 2008
More terms from R. J. Mathar, Jan 22 2009

A053218 Triangle read by rows: T(n,k) = T(n,k-1) + T(n-1,k-1) for k >= 2 with T(n,1) = n.

Original entry on oeis.org

1, 2, 3, 3, 5, 8, 4, 7, 12, 20, 5, 9, 16, 28, 48, 6, 11, 20, 36, 64, 112, 7, 13, 24, 44, 80, 144, 256, 8, 15, 28, 52, 96, 176, 320, 576, 9, 17, 32, 60, 112, 208, 384, 704, 1280, 10, 19, 36, 68, 128, 240, 448, 832, 1536, 2816, 11, 21, 40, 76, 144, 272, 512, 960, 1792, 3328
Offset: 1

Views

Author

Asher Auel, Jan 01 2000

Keywords

Comments

Last term in each row gives A001792. Difference between center term of row 2n-1 and row sum of row n, (A053220(n+4) - A053221(n+4)) gives A045618(n).
For all integers k >= 2, if a sequence k,k-1,k+2,k-3,k+4,...,2,2k-2,1,2k-1, b0(n) with offset 1, is written, the sequence b0(2)-b0(1), b0(3)-b0(2), b0(4)-b0(3), ..., b0(2k-1)-b0(2k-2), b1(n) with offset 1, is written under it, the sequence b1(2)-b1(1), b1(3)-b1(2), b1(4)-b1(3), ..., b1(2k-2)-b1(2k-3), b2(n) with offset 1, is written under this, and so on until the sequence b(2k-3)(2)-b(2k-3)(1), b(2k-2)(n) with offset 1 (which will contain only one term), is written, and then the sequence b1(1); b1(2),b2(1); b1(3),b2(2),b3(1); ...; b1(2k-2), b2(2k-3), b3(2k-4), ..., b(2k-2)(1) is obtained, then this sequence will be identical to the first 2k^2-3k+1 terms of a(n), except that the first term of this sequence will be negative, the next two terms will be positive, the next three will be negative, the next four positive, and so on.
Subtriangle of triangle in A152920. - Philippe Deléham, Nov 21 2011

Examples

			Triangle T(n,k) begins:
  1;
  2,  3;
  3,  5,  8;
  4,  7, 12, 20;
  5,  9, 16, 28, 48;
  6, 11, 20, 36, 64, 112;
  7, 13, 24, 44, 80, 144, 256;
  ...
		

Crossrefs

Cf. A053219 (reverse of this triangle), A053220 (center elements), A053221 (row sums), A001792, A045618, A152920.

Programs

  • Mathematica
    NestList[FoldList[Plus, #[[1]] + 1, #] &, {1}, 10] // Grid (* Geoffrey Critzer, Jun 27 2013 *)

Formula

T(n, k) = n*2^(k-1) - (k-1)*2^(k-2). - Ya-Ping Lu, Mar 24 2023

A117317 Triangle related to partitions of n.

Original entry on oeis.org

1, 2, 1, 4, 5, 1, 8, 16, 9, 1, 16, 44, 41, 14, 1, 32, 112, 146, 85, 20, 1, 64, 272, 456, 377, 155, 27, 1, 128, 640, 1312, 1408, 833, 259, 35, 1, 256, 1472, 3568, 4712, 3649, 1652, 406, 44, 1, 512, 3328, 9312, 14608, 14002, 8361, 3024, 606, 54, 1, 1024, 7424, 23552
Offset: 0

Views

Author

Paul Barry, Mar 07 2006

Keywords

Comments

Row sums are A007052. Diagonal sums are A052988. Reversal of A056242.
Essentially given by (0, 2, 0, 0, 0, 0, 0, 0, 0, ...) DELTA (1, 0, 1/2, 1/2, 0, 0, 0, 0, 0, 0, 0, ...) where DELTA is the operator defined in A084938. - Philippe Deléham, Jan 28 2012

Examples

			Triangle begins
1,
2, 1,
4, 5, 1,
8, 16, 9, 1,
16, 44, 41, 14, 1,
32, 112, 146, 85, 20, 1,
64, 272, 456, 377, 155, 27, 1
Triangle (0, 2, 0, 0, 0, 0, ...) DELTA (1, 0, 1/2, 1/2, 0, 0, ...) begins :
1
0, 1
0, 2, 1
0, 4, 5, 1
0, 8, 16, 9, 1
0, 16, 44, 41, 14, 1
0, 32, 112, 146, 85, 20, 1
0, 64, 272, 456, 377, 155, 27, 1
		

Crossrefs

Cf. Columns : A000079, A053220, A056243 ; Diagonals : A000012, A000096

Programs

  • Haskell
    a117317 n k = a117317_tabl !! n !! k
    a117317_row n = a117317_tabl !! n
    a117317_tabl = map reverse a056242_tabl
    -- Reinhard Zumkeller, May 08 2014

Formula

Number triangle T(n,k)=sum{j=0..n-k, C(n+j,k)C(n-k,j)}
T(n,k) = 2*T(n-1,k) + 2*T(n-1,k-1) - T(n-2,k-1) - T(n-2,k-2) for n>1. - Philippe Deléham, Jan 28 2012
G.f.: (1-y*x)/(1-2*(y+1)*x+y*(y+1)*x^2). - Philippe Deléham, Jan 28 2012

A204201 Triangle based on (0,1/3,1) averaging array.

Original entry on oeis.org

1, 1, 4, 1, 5, 10, 1, 6, 15, 22, 1, 7, 21, 37, 46, 1, 8, 28, 58, 83, 94, 1, 9, 36, 86, 141, 177, 190, 1, 10, 45, 122, 227, 318, 367, 382, 1, 11, 55, 167, 349, 545, 685, 749, 766, 1, 12, 66, 222, 516, 894, 1230, 1434, 1515, 1534, 1, 13, 78, 288, 738, 1410
Offset: 1

Views

Author

Clark Kimberling, Jan 12 2012

Keywords

Comments

For a1, let
t(n,1)=[a+t(n-1,1)]/2,
t(n,n)=[b+t(n-1,n-1)]/2,
t(n,k)=[t(n-1,k-1)+t(n-1,k)]/2 for 2<=k<=n-1.
We call (t(n,k)) the (a,r,b) averaging array. If a and b
are integers and r is a rational number, then multiplying
row n of (t(n,k)) by the LCM of its denominators yields a
triangle of integers; A204201 arises in this manner from
(a,r,b)=(0,1/3,1).
...
Guide to related arrays:
(a,r,b).........triangle
(0,1/2,1).......A054143
(0,1/3,1).......A204201
(0,2/3,1).......A204202
(0,1/4,1).......A204203
(0,3/4,1).......A204204
(0,1/5,1).......A204205
(1,3/2,2).......A204206
(1,2,3).........A204207

Examples

			The (0,1/3,1) averaging array has these first four rows:
1/3
1/6....2/3
1/12...5/12...5/6
1/24...1/4....5/8...11/12.
Multiplying those rows by 3,6,12,24, respectively:
1
1...4
1...5...10
1...6...15...22
The first nine rows:
1
1...4
1...5...10
1...6...15...22
1...7...21...37...46
1...8...28...58...83...94
1...9...36...86...141..177..190
1...10..45...122..227..318..367..382
1...11..55...167..349..545..685..749..766
		

Crossrefs

Cf. A204202.

Programs

  • Mathematica
    a = 0; r = 1/3; b = 1;
    t[1, 1] = r;
    t[n_, 1] := (a + t[n - 1, 1])/2;
    t[n_, n_] := (b + t[n - 1, n - 1])/2;
    t[n_, k_] := (t[n - 1, k - 1] + t[n - 1, k])/2;
    u[n_] := Table[t[n, k], {k, 1, n}]
    Table[u[n], {n, 1, 5}]   (* averaging array *)
    u = Table[(1/2) (1/r) 2^n*u[n], {n, 1, 12}];
    TableForm[u]             (* A204102 triangle *)
    Flatten[u]               (* A204201 sequence *)

Formula

From Philippe Deléham, Dec 24 2013: (Start)
T(n,n) = A033484(n-1).
Sum{k=1..n} T(n,k) = A053220(n).
T(n,k) = T(n-1,k)+3*T(n-1,k-1)-2*T(n-2,k-1)-2*T(n-2,k-2), T(1,1)=1, T(2,1)=1, T(2,2)=4, T(n,k)=0 if k<1 or if k>n. (End)

A053221 Row sums of triangle A053218.

Original entry on oeis.org

1, 5, 16, 43, 106, 249, 568, 1271, 2806, 6133, 13300, 28659, 61426, 131057, 278512, 589807, 1245166, 2621421, 5505004, 11534315, 24117226, 50331625, 104857576, 218103783, 452984806, 939524069, 1946157028, 4026531811, 8321499106
Offset: 1

Views

Author

Asher Auel, Jan 01 2000

Keywords

Comments

Considered as a vector, the sequence = A074909 * [1, 2, 3, ...], where A074909 is the beheaded Pascal's triangle as a matrix. - Gary W. Adamson, Mar 06 2012
a(n) is the sum of the upper left n X n subarray of A052509 (viewed as an infinite square array). For example (1+1+1) + (1+2+2) + (1+3+4) = 16. - J. M. Bergot, Nov 06 2012
Number of ternary strings of length n that contain at least one 2 and at most one 0. For example, a(3) = 16 since the strings are the 6 permutations of 201, the 3 permutations of 211, the 3 permutations of 220, the 3 permutations of 221, and 222. - Enrique Navarrete, Jul 25 2021

Examples

			a(4) = 4 + 7 + 12 + 20 = 43.
		

Crossrefs

Programs

  • Magma
    [(n+2)*2^(n-1)-n-1: n in [1..50]]; // G. C. Greubel, Sep 03 2018
  • Maple
    A053221 := proc(n) (n+2)*2^(n-1)-n-1 ; end proc: # R. J. Mathar, Sep 02 2011
  • Mathematica
    Table[(n + 2)*2^(n - 1) - n - 1, {n, 29}] (* or *)
    Rest@ CoefficientList[Series[-x (-1 + x + x^2)/((2 x - 1)^2*(x - 1)^2), {x, 0, 29}], x] (* Michael De Vlieger, Sep 22 2017 *)
    LinearRecurrence[{6,-13,12,-4},{1,5,16,43},30] (* Harvey P. Dale, Jun 28 2021 *)
  • PARI
    vector(50,n, (n+2)*2^(n-1)-n-1) \\ G. C. Greubel, Sep 03 2018
    

Formula

a(n) = (n+2)*2^(n-1)-n-1. - Vladeta Jovovic, Feb 28 2003
G.f.: -x*(-1+x+x^2) / ( (2*x-1)^2*(x-1)^2 ). - R. J. Mathar, Sep 02 2011
a(n) = (1/2) * Sum_{k=1..n} Sum_{i=1..n} C(k,i) + C(n,k). - Wesley Ivan Hurt, Sep 22 2017
E.g.f.: exp(x)*(exp(x)-1)*(1+x). - Enrique Navarrete, Jul 25 2021
a(n+1) = 2*a(n) + A006127(n). - Ya-Ping Lu, Jan 01 2024
Showing 1-10 of 25 results. Next