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

A167592 The second left hand column of triangle A167591.

Original entry on oeis.org

-2, -8, -16, 0, 160, 896, 3584, 12288, 38400, 112640, 315392, 851968, 2236416, 5734400, 14417920, 35651584, 86900736, 209190912, 498073600, 1174405120, 2745171968, 6366953472, 14663286784, 33554432000, 76336332800, 172738215936
Offset: 2

Views

Author

Johannes W. Meijer, Nov 10 2009

Keywords

Crossrefs

Equals the second left hand column of triangle A167591.
Other left hand columns are A001787, A167593, A168307 and A168308.

Programs

  • Mathematica
    LinearRecurrence[{8, -24, 32, -16}, {-2, -8, -16, 0}, 100] (* G. C. Greubel, Jun 17 2016 *)

Formula

a(n) = 2^n*(n^3 - 6*n^2 + 5*n)/12.
GF(z) = (8*z - 2)/(1-2*z)^4.
a(n) = 8*a(n-1) - 24*a(n-2) + 32*a(n-3) - 16*a(n-4).
a(n) - 7*a(n-1) + 18*a(n-2) - 20*a(n-3) + 8*a(n-4) = 1*2^(n-2).

Extensions

Formulae and links added by Johannes W. Meijer, Nov 23 2009

A167593 The third left hand column of triangle A167591.

Original entry on oeis.org

9, 120, 952, 5664, 27888, 120064, 467712, 1686528, 5719296, 18450432, 57108480, 170713088, 495366144, 1401028608, 3874881536, 10508304384, 28005433344, 73485778944, 190154539008, 485895438336, 1227495571456
Offset: 3

Views

Author

Johannes W. Meijer, Nov 10 2009

Keywords

Crossrefs

Equals the third left hand column of A167591.
Other left hand columns are A001787, A167592, A168307 and A168308.

Programs

  • Mathematica
    LinearRecurrence[{12,-60,160,-240,192,-64},{9, 120, 952, 5664, 27888, 120064},100] (* G. C. Greubel, Jun 17 2016 *)

Formula

a(n) = 2^n*(7*n^5 - 40*n^4 + 110*n^3 - 155*n^2 + 78*n)/240.
GF(z) = (52*z^2 + 12*z + 9)/(1-2*z)^6.
a(n) = 12*a(n-1) - 60*a(n-2) + 160*a(n-3) - 240*a(n-4) + 192*a(n-5) - 64*a(n-6).
a(n) - 11*a(n-1) + 50*a(n-2) - 120*a(n-3) + 160*a(n-4) - 112*a(n-5) + 32*a(n-6) = 7*2^(n-2).

Extensions

Formulae and links added by Johannes W. Meijer, Nov 23 2009

A168307 The fourth left hand column of triangle A167591.

Original entry on oeis.org

-60, -768, -5008, -20672, -46720, 76800, 1540608, 10610688, 55114752, 246005760, 992808960, 3720331264, 13156941824, 44395134976, 144054681600, 452151214080, 1379061202944, 4102054477824, 11934819680256, 34047283691520, 95430020956160, 263252302888960
Offset: 4

Views

Author

Johannes W. Meijer, Nov 23 2009, Nov 25 2009

Keywords

Crossrefs

Equals the fourth left hand column of triangle A167591.
Other left hand columns are A001787, A167592, A167593 and A168308.

Programs

  • Magma
    [2^n*(27*n^7-434*n^6+2289*n^5-5705*n^4+7938*n^3- 6461*n^2+2346*n)/10080: n in [4..30]]; // Vincenzo Librandi, Jul 18 2016
  • Mathematica
    LinearRecurrence[{16,-112,448,-1120,1792,-1792,1024,-256}, {-60, -768, -5008, -20672, -46720, 76800, 1540608, 10610688}, 50] (* G. C. Greubel, Jul 17 2016 *)

Formula

a(n) = 2^n*(27*n^7 - 434*n^6 + 2289*n^5 - 5705*n^4 + 7938*n^3 - 6461*n^2 + 2346*n)/10080.
G.f.: (320*z^3 + 560*z^2 + 192*z - 60)/(1-2*z)^8.
a(n) = 16*a(n-1) - 112*a(n-2) + 448*a(n-3) - 1120*a(n-4) + 1792*a(n-5) - 1792*a(n-6) + 1024*a(n-7) - 256*a(n-8).
a(n) - 15*a(n-1) + 98*a(n-2) - 364*a(n-3) + 840*a(n-4) - 1232*a(n-5) + 1120*a(n-6) - 576*a(n-7) + 128*a(n-8) = 27*2^(n-2).

A168308 The fifth left hand column of triangle A167591.

Original entry on oeis.org

525, 12396, 162740, 1537216, 11589216, 73898880, 413745024, 2087500800, 9672309504, 41745859584, 169680276480, 655126331392, 2419298385920, 8593269522432, 29494166618112, 98195558891520, 318148898783232, 1005877391523840, 3110695891894272
Offset: 5

Views

Author

Johannes W. Meijer, Nov 23 2009

Keywords

Crossrefs

Equals the fifth left hand column of triangle A167591.
Other left hand columns are A001787, A167592, A167593 and A168307.

Programs

  • Magma
    [2^n*(107*n^9-1824*n^8+14124*n^7-62538*n^6+ 165228*n^5-259476*n^4+241561*n^3-133542*n^2+ 36360*n)/241920: n in [5..30]]; // Vincenzo Librandi, Jul 18 2016
  • Mathematica
    LinearRecurrence[{20,-180,960,-3360,8064,-13440,15360,-11520,5120,-1024},{525, 12396, 162740, 1537216, 11589216, 73898880, 413745024, 2087500800, 9672309504, 41745859584}, 50] (* G. C. Greubel, Jul 17 2016 *)

Formula

a(n) = 2^n*(107*n^9 - 1824*n^8 + 14124*n^7 - 62538*n^6 + 165228*n^5 - 259476*n^4 + 241561*n^3 - 133542*n^2 + 36360*n)/241920.
G.f.: (1936*z^4 + 9696*z^3 + 9320*z^2 + 1896*z + 525)/(1-2*z)^10.
a(n) = 20*a(n-1) - 180*a(n-2) + 960*a(n-3) - 3360*a(n-4) + 8064*a(n-5) - 13440*a(n-6) + 15360*a(n-7) - 11520*a(n-8) + 5120*a(n-9) - 1024*a(n-10).
a(n) - 19*a(n-1) + 162*a(n-2) - 816*a(n-3) + 2688*a(n-4) - 6048*a(n-5) + 9408*a(n-6) -9984*a(n-7) + 6912*a(n-8) - 2816*a(n-9) + 512*a(n-10) = 321*2^(n-2).

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

A013609 Triangle of coefficients in expansion of (1+2*x)^n.

Original entry on oeis.org

1, 1, 2, 1, 4, 4, 1, 6, 12, 8, 1, 8, 24, 32, 16, 1, 10, 40, 80, 80, 32, 1, 12, 60, 160, 240, 192, 64, 1, 14, 84, 280, 560, 672, 448, 128, 1, 16, 112, 448, 1120, 1792, 1792, 1024, 256, 1, 18, 144, 672, 2016, 4032, 5376, 4608, 2304, 512, 1, 20, 180, 960, 3360, 8064, 13440, 15360, 11520, 5120, 1024
Offset: 0

Views

Author

Keywords

Comments

T(n,k) is the number of lattice paths from (0,0) to (n,k) with steps (1,0) and two kinds of steps (1,1). The number of paths with steps (1,0) and s kinds of steps (1,1) corresponds to the expansion of (1+s*x)^n. - Joerg Arndt, Jul 01 2011
Also sum of rows in A046816. - Lior Manor, Apr 24 2004
Also square array of unsigned coefficients of Chebyshev polynomials of second kind. - Philippe Deléham, Aug 12 2005
The rows give the number of k-simplices in the n-cube. For example, 1, 6, 12, 8 shows that the 3-cube has 1 volume, 6 faces, 12 edges and 8 vertices. - Joshua Zucker, Jun 05 2006
Triangle whose (i, j)-th entry is binomial(i, j)*2^j.
With offset [1,1] the triangle with doubled numbers, 2*a(n,m), enumerates sequences of length m with nonzero integer entries n_i satisfying sum(|n_i|) <= n. Example n=4, m=2: [1,3], [3,1], [2,2] each in 2^2=4 signed versions: 2*a(4,2) = 2*6 = 12. The Sum over m (row sums of 2*a(n,m)) gives 2*3^(n-1), n >= 1. See the W. Lang comment and a K. A. Meissner reference under A024023. - Wolfdieter Lang, Jan 21 2008
n-th row of the triangle = leftmost column of nonzero terms of X^n, where X = an infinite bidiagonal matrix with (1,1,1,...) in the main diagonal and (2,2,2,...) in the subdiagonal. - Gary W. Adamson, Jul 19 2008
Numerators of a matrix square-root of Pascal's triangle A007318, where the denominators for the n-th row are set to 2^n. - Gerald McGarvey, Aug 20 2009
From Johannes W. Meijer, Sep 22 2010: (Start)
The triangle sums (see A180662 for their definitions) link the Pell-Jacobsthal triangle, whose mirror image is A038207, with twenty-four different sequences; see the crossrefs.
This triangle may very well be called the Pell-Jacobsthal triangle in view of the fact that A000129 (Kn21) are the Pell numbers and A001045 (Kn11) the Jacobsthal numbers.
(End)
T(n,k) equals the number of n-length words on {0,1,2} having n-k zeros. - Milan Janjic, Jul 24 2015
T(n-1,k-1) is the number of 2-compositions of n with zeros having k positive parts; see Hopkins & Ouvry reference. - Brian Hopkins, Aug 16 2020
T(n,k) is the number of chains 0=x_0Geoffrey Critzer, Oct 01 2022
Excluding the initial 1, T(n,k) is the number of k-faces of a regular n-cross polytope. See A038207 for n-cube and A135278 for n-simplex. - Mohammed Yaseen, Jan 14 2023

Examples

			Triangle begins:
  1;
  1,  2;
  1,  4,   4;
  1,  6,  12,    8;
  1,  8,  24,   32,   16;
  1, 10,  40,   80,   80,    32;
  1, 12,  60,  160,  240,   192,    64;
  1, 14,  84,  280,  560,   672,   448,    128;
  1, 16, 112,  448, 1120,  1792,  1792,   1024,    256;
  1, 18, 144,  672, 2016,  4032,  5376,   4608,   2304,    512;
  1, 20, 180,  960, 3360,  8064, 13440,  15360,  11520,   5120,  1024;
  1, 22, 220, 1320, 5280, 14784, 29568,  42240,  42240,  28160, 11264,  2048;
  1, 24, 264, 1760, 7920, 25344, 59136, 101376, 126720, 112640, 67584, 24576, 4096;
From _Peter Bala_, Apr 20 2012: (Start)
The triangle can be written as the matrix product A038207*(signed version of A013609).
  |.1................||.1..................|
  |.2...1............||-1...2..............|
  |.4...4...1........||.1..-4...4..........|
  |.8..12...6...1....||-1...6...-12...8....|
  |16..32..24...8...1||.1..-8....24.-32..16|
  |..................||....................|
(End)
		

References

  • B. N. Cyvin et al., Isomer enumeration of unbranched catacondensed polygonal systems with pentagons and heptagons, Match, No. 34 (Oct 1996), pp. 109-121.
  • G. Hotz, Zur Reduktion von Schaltkreispolynomen im Hinblick auf eine Verwendung in Rechenautomaten, El. Datenverarbeitung, Folge 5 (1960), pp. 21-27.

Crossrefs

Cf. A007318, A013610, etc.
Appears in A167580 and A167591. - Johannes W. Meijer, Nov 23 2009
From Johannes W. Meijer, Sep 22 2010: (Start)
Triangle sums (see the comments): A000244 (Row1); A000012 (Row2); A001045 (Kn11); A026644 (Kn12); 4*A011377 (Kn13); A000129 (Kn21); A094706 (Kn22); A099625 (Kn23); A001653 (Kn3); A007583 (Kn4); A046717 (Fi1); A007051 (Fi2); A077949 (Ca1); A008998 (Ca2); A180675 (Ca3); A092467 (Ca4); A052942 (Gi1); A008999 (Gi2); A180676 (Gi3); A180677 (Gi4); A140413 (Ze1); A180678 (Ze2); A097117 (Ze3); A055588 (Ze4).
(End)
T(2n,n) gives A059304.

Programs

  • Haskell
    a013609 n = a013609_list !! n
    a013609_list = concat $ iterate ([1,2] *) [1]
    instance Num a => Num [a] where
       fromInteger k = [fromInteger k]
       (p:ps) + (q:qs) = p + q : ps + qs
       ps + qs         = ps ++ qs
       (p:ps) * qs'@(q:qs) = p * q : ps * qs' + [p] * qs
        *                = []
    -- Reinhard Zumkeller, Apr 02 2011
    
  • Haskell
    a013609 n k = a013609_tabl !! n !! k
    a013609_row n = a013609_tabl !! n
    a013609_tabl = iterate (\row -> zipWith (+) ([0] ++ row) $
                                    zipWith (+) ([0] ++ row) (row ++ [0])) [1]
    -- Reinhard Zumkeller, Jul 22 2013, Feb 27 2013
    
  • Magma
    [2^k*Binomial(n,k): k in [0..n], n in [0..15]]; // G. C. Greubel, Sep 17 2021
    
  • Maple
    bin2:=proc(n,k) option remember; if k<0 or k>n then 0 elif k=0 then 1 else 2*bin2(n-1,k-1)+bin2(n-1,k); fi; end; # N. J. A. Sloane, Jun 01 2009
  • Mathematica
    Flatten[Table[CoefficientList[(1 + 2*x)^n, x], {n, 0, 10}]][[1 ;; 59]] (* Jean-François Alcover, May 17 2011 *)
    BinomialROW[n_, k_, t_] := Sum[Binomial[n, k]*Binomial[k, j]*(-1)^(k - j)*t^j, {j, 0, k}]; Column[Table[BinomialROW[n, k, 3], {n, 0, 10}, {k, 0, n}], Center] (* Kolosov Petro, Jan 28 2019 *)
  • Maxima
    a(n,k):=coeff(expand((1+2*x)^n),x^k);
    create_list(a(n,k),n,0,6,k,0,n); /* Emanuele Munarini, Nov 21 2012 */
    
  • PARI
    /* same as in A092566 but use */
    steps=[[1,0], [1,1], [1,1]]; /* note double [1,1] */
    /* Joerg Arndt, Jul 01 2011 */
    
  • Sage
    flatten([[2^k*binomial(n,k) for k in (0..n)] for n in (0..15)]) # G. C. Greubel, Sep 17 2021

Formula

G.f.: 1 / (1 - x*(1+2*y)).
T(n,k) = 2^k*binomial(n,k).
T(n,k) = 2*T(n-1,k-1) + T(n-1,k). - Jon Perry, Nov 22 2005
Row sums are 3^n = A000244(n). - Joerg Arndt, Jul 01 2011
T(n,k) = Sum_{i=n-k..n} C(i,n-k)*C(n,i). - Mircea Merca, Apr 28 2012
E.g.f.: exp(2*y*x + x). - Geoffrey Critzer, Nov 12 2012
Riordan array (x/(1 - x), 2*x/(1 - x)). Exp(2*x) * e.g.f. for row n = e.g.f. for diagonal n. For example, for n = 3 we have exp(2*x)*(1 + 6*x + 12*x^2/2! + 8*x^3/3!) = 1 + 8*x + 40*x^2/2! + 160*x^3/3! + 560*x^4/4! + .... The same property holds more generally for Riordan arrays of the form (f(x), 2*x/(1 - x)). - Peter Bala, Dec 21 2014
T(n,k) = Sum_{j=0..k} (-1)^(k-j) * binomial(n,k) * binomial(k,j) * 3^j. - Kolosov Petro, Jan 28 2019
T(n,k) = 2*(n+1-k)*T(n,k-1)/k, T(n,0) = 1. - Alexander R. Povolotsky, Oct 08 2023
For n >= 1, GCD(T(n,1), ..., T(n,n)) = GCD(T(n,1),T(n,n)) = GCD(2*n,2^n) = A171977(n). - Pontus von Brömssen, Nov 01 2024

A024199 a(n) = (2n-1)!! * Sum_{k=0..n-1}(-1)^k/(2k+1).

Original entry on oeis.org

0, 1, 2, 13, 76, 789, 7734, 110937, 1528920, 28018665, 497895210, 11110528485, 241792844580, 6361055257725, 163842638377950, 4964894559637425, 147721447995130800, 5066706567801827025, 171002070002301095250, 6548719685561840296125, 247199273204273879989500
Offset: 0

Views

Author

Keywords

Comments

(2*n + 1)!!/a(n+1), n>=0, is the n-th approximant for William Brouncker's continued fraction for 4/Pi = 1 + 1^2/(2 + 3^2/(2 + 5^2/(2 + ... ))) See the C. Brezinski and J.-P. Delahaye references given under A142969 and A142970, respectively. The double factorials (2*n + 1)!! = A001147(n+1) enter. - Wolfdieter Lang, Oct 06 2008

Examples

			a(3) = (2*3 - 1)!! * Sum_{k=0..2} (-1)^k/(2k + 1) = 5!! * (1/(2*0 + 1) - 1/(2*1 + 1) + 1/(2*2 + 1)) = 5*3*1*(1/1 - 1/3 + 1/5) = 15 - 5 + 3 = 13. Notice that the first factor always cancels the common denominator of the sum. - _Michael B. Porter_, Jul 22 2016
		

References

  • A. E. Jolliffe, Continued Fractions, in Encyclopaedia Britannica, 11th ed., pp. 30-33; see p. 31.

Crossrefs

From Johannes W. Meijer, Nov 12 2009: (Start)
Cf. A007509 and A025547.
Equals first column of A167584.
Equals row sums of A167591.
Equals first right hand column of A167594.
(End)
Cf. A167576 and A135457.

Programs

  • Magma
    [0] cat [ n le 2 select (n) else 2*Self(n-1)+(2*n-3)^2*Self(n-2): n in [1..25] ]; // Vincenzo Librandi, Feb 17 2015
  • Maple
    a := proc(n) option remember; if n=0 then 0 elif n=1 then 1 else 2*a(n-1)+(2*n-3)^2* a(n-2) fi end: seq(a(n), n=0..20); # Peter Luschny, Nov 16 2016 after N. J. A. Sloane
  • Mathematica
    f[k_] := (2 k - 1) (-1)^(k + 1)
    t[n_] := Table[f[k], {k, 1, n}]
    a[n_] := SymmetricPolynomial[n - 1, t[n]]
    Table[a[n], {n, 1, 22}]    (* A024199 signed *)
    (* Clark Kimberling, Dec 30 2011 *)
    RecurrenceTable[{a[n+1] == 2*a[n] + (2*n-1)^2*a[n-1],a[0] == 0, a[1] == 1},a,{n,0,20}] (* Vaclav Kotesovec, Mar 18 2014 *)
    CoefficientList[Series[Pi/4/Sqrt[1-2*x] - 1/2*Log[2*x+Sqrt[4*x^2-1]]/Sqrt[2*x-1], {x, 0, 20}], x] * Range[0, 20]! (* Vaclav Kotesovec, Mar 18 2014 *)

Formula

a(n) = s(1)s(2)...s(n)(1/s(1) - 1/s(2) + ... + c/s(n)) where c=(-1)^(n+1) and s(k) = 2k-1 for k = 1, 2, 3, ... (was previous definition). - Clark Kimberling
D-finite with recurrence a(0) = 0, a(1) = 1, a(n+1) = 2*a(n) + (2*n-1)^2*a(n-1). - N. J. A. Sloane, Jul 19 2002
a(n) + A024200(n) = A001147(n) = (2n-1)!!. - Max Alekseyev, Sep 23 2007
a(n)/A024200(n) -> Pi/(4-Pi) as n -> oo. - Max Alekseyev, Sep 23 2007
From Wolfdieter Lang, Oct 06 2008: (Start)
E.g.f. for a(n+1), n>=0: (sqrt(1-2*x)+arcsin(2*x)*sqrt(1+2*x)/2)/((1-4*x^2)^(1/2)*(1-2*x)). From the recurrence, solving (1-4*x^2)y''(x)-2*(8*x+1)*y'(x)-9*y=0 with inputs y(0)=1, y'(0)=2.
a(n+1) = A003148(n) + A143165(n), n>=0 (from the two terms of the e.g.f.). (End)
From Johannes W. Meijer, Nov 12 2009: (Start)
a(n) = (-1)^(n-1)*(2*n-3)!! + (2*n-1)*a(n-1) with a(0) = 0.
a(n) = (2*n-1)!!*sum((-1)^(k)/(2*k+1), k=0..n-1)
(End)
E.g.f.: Pi/4/sqrt(1-2*x) - 1/2*log(2*x+sqrt(4*x^2-1))/sqrt(2*x-1). - Vaclav Kotesovec, Mar 18 2014
a(n) ~ Pi * 2^(n-3/2) * n^n / exp(n). - Vaclav Kotesovec, Mar 18 2014
a(n) = (2*H(n+1/2)-Gamma(n+1/2))*2^(n-2)*sqrt(Pi) with H(x) the Hadamard factorial (see the link section). - Cyril Damamme, Jul 19 2015
a(n) = A135457(n) - (-1)^n A001147(n-1). - Cyril Damamme, Jul 19 2015
a(n) = (Pi + (-1)^n*(Psi(n/2 + 1/4) - Psi(n/2 + 3/4)))*Gamma(n+1/2)*2^(n-2)/sqrt(Pi). - Robert Israel, Jul 20 2015
a(n) = A167576(n) - A135457(n). - Cyril Damamme, Jul 22 2015
a(n)/A001147(n) -> Pi/4 as n -> oo. - Daniel Suteu, Jul 21 2016
From Peter Bala, Nov 15 2016: (Start)
Conjecture: a(n) = 1/2*Sum_{k = 0..2*n-1} (-1)^(n-k+1)*k!*(2*n - 2*k - 3)!!, where the double factorial of an odd integer (positive or negative) may be defined in terms of the gamma function as (2*N - 1)!! = 2^((N+1)/2)*Gamma(N/2 + 1)/sqrt(Pi).
E.g.f. 1/2*arcsin(2*x)/sqrt(1 - 2*x) = x + 2*x^2/2! + 13*x^3/3! + 76*x^4/4! + .... (End)

Extensions

Edited by N. J. A. Sloane, Jul 19 2002
New name from Cyril Damamme, Jul 19 2015

A081277 Square array of unsigned coefficients of Chebyshev polynomials of the first kind.

Original entry on oeis.org

1, 1, 1, 1, 3, 2, 1, 5, 8, 4, 1, 7, 18, 20, 8, 1, 9, 32, 56, 48, 16, 1, 11, 50, 120, 160, 112, 32, 1, 13, 72, 220, 400, 432, 256, 64, 1, 15, 98, 364, 840, 1232, 1120, 576, 128, 1, 17, 128, 560, 1568, 2912, 3584, 2816, 1280, 256, 1, 19, 162, 816, 2688, 6048, 9408, 9984, 6912
Offset: 0

Views

Author

Paul Barry, Mar 16 2003

Keywords

Comments

Formatted as a triangular array, this is [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...] DELTA [1, 1, 0, 0, 0, 0, 0, 0, 0, 0, ...] (see construction in A084938 ). - Philippe Deléham, Aug 09 2005
Antidiagonal sums are in A025192. - Philippe Deléham, Dec 04 2006
Binomial transform of n-th row of the triangle (followed by zeros) = n-th row of the A142978 array and n-th column of triangle A104698. - Gary W. Adamson, Jul 17 2008
When formatted as a triangle, A038763=fusion of polynomial sequences (x+1)^n and (x+1)^n; see A193722 for the definition of fusion of two polynomial sequences or triangular arrays. Row n of A038763, as a triangle, consists of coefficients of the product (x+1)*(x+2)^n. - Clark Kimberling, Aug 04 2011

Examples

			Rows begin
  1, 1,  2,   4,   8, ...
  1, 3,  8,  20,  48, ...
  1, 5, 18,  56, 160, ...
  1, 7, 32, 120, 400, ...
  1, 9, 50, 220, 840, ...
  ...
As a triangle:
  1;
  1,  1;
  1,  3,  2;
  1,  5,  8,  4;
  1,  7, 18, 20,  8;
		

Crossrefs

Cf. A079628.
Cf. A167580 and A167591. - Johannes W. Meijer, Nov 23 2009
Cf. A053120 (antidiagonals give signed version) and A124182 (skewed version). - Mathias Zechmeister, Jul 26 2022

Programs

  • Mathematica
    (* Program generates triangle A081277 as the self-fusion of Pascal's triangle *)
    z = 8; a = 1; b = 1; c = 1; d = 1;
    p[n_, x_] := (a*x + b)^n ; q[n_, x_] := (c*x + d)^n
    t[n_, k_] := Coefficient[p[n, x], x^k]; t[n_, 0] := p[n, x] /. x -> 0;
    w[n_, x_] := Sum[t[n, k]*q[n + 1 - k, x], {k, 0, n}]; w[-1, x_] := 1
    g[n_] := CoefficientList[w[n, x], {x}]
    TableForm[Table[Reverse[g[n]], {n, -1, z}]]
    Flatten[Table[Reverse[g[n]], {n, -1, z}]] (* A081277 *)
    TableForm[Table[g[n], {n, -1, z}]]
    Flatten[Table[g[n], {n, -1, z}]] (* abs val of A118800 *)
    Factor[w[6, x]]
    (* Clark Kimberling, Aug 04 2011 *)

Formula

T(n, k) = (n+2k)*binomial(n+k-1, k-1)*2^(n-1)/k, k > 0.
T(n, 0) defined by g.f. (1-x)/(1-2x). Other rows are defined by (1-x)/(1-2x)^n.
T(n, 0) = 0 if n < 0, T(0, k) = 0 if k < 0, T(0, 0) = T(1, 0) = 1, T(n, k) = T(n, k-1) + 2*T(n-1, k); for example, 160 = 48 + 2*56 for n = 4 and k = 2. -Philippe Deléham, Aug 12 2005
G.f. of the triangular interpretation: (-1+x*y)/(-1+2*x*y+x). - R. J. Mathar, Aug 11 2015

A167584 The ED4 array read by antidiagonals.

Original entry on oeis.org

1, 2, 1, 13, 6, 1, 76, 41, 10, 1, 789, 372, 93, 14, 1, 7734, 4077, 1020, 169, 18, 1, 110937, 53106, 13269, 2212, 269, 22, 1, 1528920, 795645, 198990, 33165, 4140, 393, 26, 1, 28018665, 13536360, 3383145, 563850, 70485, 6996, 541, 30, 1
Offset: 1

Views

Author

Johannes W. Meijer, Nov 10 2009

Keywords

Comments

The coefficients in the upper right triangle of the ED4 array (m>n) were found with the a(n,m) formula while the coefficients in the lower left triangle of the ED4 array (m<=n) were found with the recurrence relation, see below. We use for the array rows the letter n (>=1) and for the array columns the letter m (>=1).
For the ED1, ED2 and ED3 arrays see A167546, A167560 and A167572.
The Madhava-Gregory-Leibniz series representation for Pi/4 is the case m = 0 of the following more general result: for m = 0,1,2,... there holds 1/(2*m)! * Pi/4 = Sum_{k >= 0} ( (-1)^(m+k) * 1/Product_{j = -m .. m} (2*k + 1 + 2*j) ). The entries of this table are given by truncating these series to n-1 terms and then scaling by certain double factorials -- see the formula below. - Peter Bala, Nov 06 2016

Examples

			The ED4 array begins with:
  1, 1, 1, 1, 1, 1, 1, 1, 1, 1
  2, 6, 10, 14, 18, 22, 26, 30, 34, 38
  13, 41, 93, 169, 269, 393, 541, 713, 909, 1129
  76, 372, 1020, 2212, 4140, 6996, 10972, 16260, 23052, 31540
  789, 4077, 13269, 33165, 70485, 133869, 233877, 382989, 595605, 888045
  7734, 53106, 198990, 563850, 1339110, 2812194, 5389566, 9619770, 16216470, 26081490
  ...
From _Peter Bala_, Nov 06 2016: (Start)
Table extended to nonpositive values of m:
  n\m|     -4     -3    -2    -1    0
  -----------------------------------
   0 |      0      0     0     0    0
   1 |      1      1     1     1    1
   2 |    -18    -14   -10    -6   -2
   3 |    233    141    73    29    9
   4 |  -2844  -1428  -620  -228  -60
   5 |  39309  17877  7149  2325  525
  ...
Column  0: (-1)^(n+1)*(2*n - 3)!!*n. See A001193;
Column -1: (-1)^n*(2*n - 5)!!/3!!*n*(7 - 4*n^2);
Column -2: (-1)^n*(2*n - 7)!!/5!!*n(-149 + 120*n^2 - 16*n^4);
Column -3: (-1)^n*(2*n - 9)!!/7!!*n*(6483 - 6076*n^2 + 1232*n^4 - 64*n^6);
Column -4: (-1)^n*(2*n - 11)!!/9!!*n*(-477801 + 489136*n^2 - 120288*n^4 + 9984*n^6 - 256*n^8). (End)
		

Crossrefs

A000012, A016825, A167585, A167586 and A167587 equal the first five rows of the array.
A024199, A167588 and A167589 equal the first three columns of the array.
A167590 equals the row sums of the ED4 array read by antidiagonals.
A167591 is a triangle related to the a(n) formulas of the rows of the ED4 array.
A167594 is a triangle related to the GF(z) formulas of the rows of the ED4 array.
Cf. A002866 (the 2^(n-1)*n! factor).
Cf. A167546 (ED1 array), A167560 (ED2 array), A167572 (ED3 array). Cf. A001193, A003881.

Programs

  • Maple
    T := proc (n, m) option remember;
          if n = 0 then 0
           elif n = 1 then 1
           else (4*m-2)*T(n-1,m)+(2*n+2*m-5)*(2*n-2*m-1)*T(n-2,m)
          end if;
         end proc:
    #square array read by antidiagonals
    seq(seq(T(n-m,m), m = 1..n-1), n = 1..10);
    # Peter Bala, Nov 06 2016
  • Mathematica
    T[0, k_] := 0; T[1, k_] := 1; T[n_, k_] := T[n, k] = (4*k - 2)*T[n - 1, k] + (2*n + 2*k - 5)*(2*n - 2*k - 1)*T[n - 2, k]; Table[T[n - k, k], {n, 2, 12}, {k, 1, n - 1}] (* G. C. Greubel, Jan 20 2017 *)

Formula

a(n,m) = ((2*m-3)!!/(2*(2*m-2*n-3)!!))*Integral_{y=0..oo} sinh(y*(2*n))/(cosh(y))^(2*m-1) dy for m>n.
The (n-1)-differences of the n-th array row lead to the recurrence relation
Sum_{k=0..n-1} (-1)^k*binomial(n-1,k)*a(n,m-k) = 2^(n-1)*n!
From Peter Bala, Nov 06 2016: (Start)
T(n,m) = ((2*m - 3)!!/(2*(2*m - 2*n - 3)!!)) * Sum_{k = 0..n-1} (-1)^(k+1)*binomial(2*n - k - 1, k)*2^(2*n - 2*k - 1)*1/(2*n - 2*m - 2*k + 1), for n and m >= 0.
Note the double factorial for a negative odd integer N is defined in terms of the gamma function as N!! = 2^((N+1)/2)*Gamma(N/2 + 1)/sqrt(Pi).
T(n, m) = (2*m - 3)!! * (2*n + 2*m - 3)!! * Sum_{k = 0..n-1} ( (-1)^(m + k + 1) / Product_{j = -(m-1) .. m-1} (2*k + 1 + 2*j) ).
Using this result we can extend the table to nonpositive values of m (the column index). Column 0 is a signed version of A001193. We have for m <= 0, T(n,m) = (2*n - 2*|m| - 3)!!/(2*|m| + 1)!! * Sum_{k = 0..n-1} (-1)^k*Product_{j = -|m|..|m|} (2*k + 1 + 2*j).
Recurrence: T(n, m) = (4*m - 2)*T(n-1, m) + (2*n + 2*m - 5)*(2*n - 2*m - 1)*T(n-2, m).
For a fixed value of n, the entries in row n are polynomial in the value of the column index m. The first few polynomials are [1, 4*m - 2, 12*m^2 - 8*m + 9, 32*m^3 - 16*m^2 + 120*m - 60, 80*m^4 + 952*m^2 - 768*m + 525, ...]. (End)

A003148 a(n+1) = a(n) + 2n*(2n+1)*a(n-1), with a(0) = a(1) = 1.

Original entry on oeis.org

1, 1, 7, 27, 321, 2265, 37575, 390915, 8281665, 114610545, 2946939975, 51083368875, 1542234996225, 32192256321225, 1114841223671175, 27254953356505875, 1064057291370698625, 29845288035840902625, 1296073464766972266375, 41049997128507054562875
Offset: 0

Views

Author

Keywords

Comments

Numerators of sequence of fractions with e.g.f. 1/((1-x)*(1+x)^(1/2)). The denominators are successive powers of 2.
a(n) is the coefficient of x^n in arctan(sqrt(2*x/(1-x)))/sqrt(2*x*(1-x)) multiplied by (2*n+1)!!.
This sequence is the linking pin between the a(n) formulas of the ED1, ED2, ED3 and ED4 array rows, see A167552, A167565, A167580 and A167591. - Johannes W. Meijer, Nov 23 2009

Examples

			arctan(sqrt(2*x/(1-x)))/sqrt(2*x*(1-x)) = 1 + 1/3*x + 7/15*x^2 + 9/35*x^3 + ...
		

References

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

Crossrefs

Programs

  • Haskell
    a003148 n = a003148_list !! n
    a003148_list = 1 : 1 : zipWith (+) (tail a003148_list)
                              (zipWith (*) (tail a002943_list) a003148_list)
    -- Reinhard Zumkeller, Nov 22 2011
    
  • Magma
    [n le 2 select 1 else Self(n-1) + 2*(n-2)*(2*n-3)*Self(n-2): n in [1..30]]; // G. C. Greubel, Nov 04 2022
    
  • Maple
    # double factorial of odd "l" df := proc(l) local n; n := iquo(l,2); RETURN( factorial(l)/2^n/factorial(n)); end: x := 1; for n from 1 to 15 do if n mod 2 = 0 then x := 2*n*x+df(2*n-1); else x := 2*n*x-df(2*n-1); fi; print(x); od; quit
  • Mathematica
    a[n_] := a[n] = (-1)^n*(2n - 1)!! + 2n*a[n - 1]; a[0] = 1; Table[ a[n], {n, 0, 14}] (* Jean-François Alcover, Dec 01 2011, after R. J. Mathar *)
    a[ n_] := If[ n < 0, 0, (2 n + 1)!! Hypergeometric2F1[ -n, 1/2, 3/2, 2]]; (* Michael Somos, Apr 20 2018 *)
    a[ n_] := If[ n < 0, 0, n! SeriesCoefficient[ 1 / ((1 - 2 x) Sqrt[1 + 2 x]), {x, 0, n}]]; (* Michael Somos, Apr 20 2018 *)
    RecurrenceTable[{a[0]==a[1]==1,a[n+1]==a[n]+2n(2n+1)a[n-1]},a,{n,20}] (* Harvey P. Dale, Jul 27 2019 *)
  • PARI
    Vec(serlaplace(1/(sqrt(1+2*x + O(x^20))*(1-2*x)))) \\ Andrew Howroyd, Feb 05 2018
    
  • SageMath
    @CachedFunction
    def a(n): return 1 if (n<2) else a(n-1) + 2*(n-1)*(2*n-1)*a(n-2) # a = A003148
    [a(n) for n in range(31)] # G. C. Greubel, Nov 04 2022

Formula

a(n) = (-1)^n*(2n-1)!! + 2*n*a(n-1) with (2n-1)!! = 1*3*5*..*(2n-1) the double factorial. - R. J. Mathar, Jun 12 2003
a(n) = ((2*n+1)!!/4) * Integral_{-Pi..Pi} cos(x)^n * cos(x/2) dx. - R. J. Mathar, Jun 30 2003
a(n) = (2n+1)!! 2F1(-n, 1/2;3/2;2). - R. J. Mathar, Jun 30 2003
In terms of the (terminating) Gauss hypergeometric function/series, 2F1(., .; .; 2), a(n) is a special case of the family of integer sequences defined by a(m, n) = ((2*n+2*m+1)!!/(2*m+1)) * 2F1(-n, m+1/2; m+3/2; 2), for m >= 0, n >= 0. An integral form can be seen as a(m, n) = ((2*n+2*m+1)!!/4) * Integral_{-Pi..Pi} (sin(x/2))^(2*m) * (cos(x))^n * cos(x/2) dx. A recurrence property is 4*(n+1)*a(m, n) = (2*m-1)*a(m-1, n+1) + (-1)^n*(2*n+2*m+1)!!. Sequences that have these properties are a(0, n) = this sequence, a(1, n) = A077568, a(2, n) = A084543. - R. J. Mathar, Jun 30 2003
E.g.f.: 1/(sqrt(1+2*x)*(1-2*x)). - Vladeta Jovovic, Oct 12 2003
a(n) = (2^n)*n!*A123746(n)/A046161(n) = (2^n)*n!*Sum_{k=0..n} binomial(2*k,k)*(-1/4)^k. From the e.g.f. - Wolfdieter Lang, Oct 06 2008
a(n) = A049606(n)*A123746(n). - Johannes W. Meijer, Nov 23 2009
a(n) = A091520(n) * n! / 2^n. - Michael Somos, Mar 17 2011

Extensions

a(16)-a(20) from Andrew Howroyd, Feb 05 2018
Showing 1-10 of 12 results. Next