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 23 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

A130595 Triangle read by rows: lower triangular matrix which is inverse to Pascal's triangle (A007318) regarded as a lower triangular matrix.

Original entry on oeis.org

1, -1, 1, 1, -2, 1, -1, 3, -3, 1, 1, -4, 6, -4, 1, -1, 5, -10, 10, -5, 1, 1, -6, 15, -20, 15, -6, 1, -1, 7, -21, 35, -35, 21, -7, 1, 1, -8, 28, -56, 70, -56, 28, -8, 1, -1, 9, -36, 84, -126, 126, -84, 36, -9, 1, 1, -10, 45, -120, 210, -252, 210, -120, 45, -10, 1, -1, 11, -55, 165, -330, 462, -462, 330, -165, 55, -11, 1
Offset: 0

Views

Author

Philippe Deléham, Jun 17 2007

Keywords

Comments

Triangle T(n,k), read by rows, given by [-1,0,0,0,0,0,0,0,...] DELTA [1,0,0,0,0,0,0,0,...] where DELTA is the operator defined in A084938.
Coefficients of the polynomials generated by the e.g.f. exp(x*t)*exp(-t). - Peter Luschny, Jul 13 2009
Riordan array (1/(1+x), x/(1+x)). - Philippe Deléham, Nov 29 2009
Multiplication of a sequence (written as column vector) by this matrix (to the left) yields the inverse Binomial transform of the sequence. - M. F. Hasler, Nov 01 2014
From Tom Copeland, Nov 16 2016: (Start)
This signed Pascal matrix IP and the Pascal matrix P contain the coefficients of a prototypical pair of Appell polynomial sequences that are inverse under umbral composition with e.g.f.s e^((x-1)*t) = e^(-t) e^(xt) = f(t) e^(xt) and e^((x+1)t) = e^t e^(xt) = g(t) e^(xt) and row polynomials q_n(x) = (x-1)^n and p_n(x) = (x+1)^n, respectively. The inverse property for an Appell pair is reflected in IP*P = identity matrix, f(t) = 1/g(t), the umbral relation p_n(q.(x)) = x^n = q_n(p.(x)), and their respective raising operators R_(Ip) = x - h(D) and R_P = x + h(D) differing only in the sign of the differential term (h(D) = 1, in this case). The lowering operator for an Appell sequence is L = D = d/dx with L p_n(x) = n*p_(n-1)(x), and the raising operator is defined by R p_n(x) = p_(n+1)(x).
The related signed Pascal matrix M with M(n,k) = (-1)^n IP(n,k) = (-1)^k P(n,k) has the e.g.f. e^((1-x)t) = e^t e^(-xt), and w_n(x) = (1-x)^n is not an Appell sequence, but it is a Sheffer sequence with lowering and raising operators L = -D and R = 1 - x, and M = M^(-1) since w_n(w.(x)) = (1-w.(x))^n = sum_{k = 0,..,n} binomial(n,k) (-1)^k w_k(x) = (1-(1-x))^n = x^n.
Umbral composition of a pair of Sheffer polynomial sequences, of which Appell sequences are a special class, is equivalent to the multiplication of their respective coefficient matrices.
(End)

Examples

			Triangle begins with T(0,0):
   1;
  -1,    1;
   1,   -2,    1;
  -1,    3,   -3,    1;
   1,   -4,    6,   -4,    1;
  -1,    5,  -10,   10,   -5,    1;
   1,   -6,   15,  -20,   15,   -6,    1;
  -1,    7,  -21,   35,  -35,   21,   -7,    1;
   1,   -8,   28,  -56,   70,  -56,   28,   -8,    1;
  -1,    9,  -36,   84, -126,  126,  -84,   36,   -9,    1;
  ...
As polynomials:
  + 1;
  - 1 + 1 x;
  + 1 - 2 x + 1 x^2;
  - 1 + 3 x - 3 x^2 + 1 x^3;
  + 1 - 4 x + 6 x^2 - 4 x^3 + 1 x^4;
		

Crossrefs

Sums include: A000007 (row sums), A019590, A039834 (diagonal sums), A049347 (alternating sign diagonal sums), A063524, A085750, A122803 (alternating sign sums).

Programs

  • Haskell
    a130595 n = a130595_list !! n
    a130595_list = concat $ iterate ([-1,1] *) [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
    a130595 n k = a130595_tabl !! n !! k
    a130595_row n = a130595_tabl !! n
    a130595_tabl = iterate (\row -> zipWith (-) ([0] ++ row) (row ++ [0])) [1]
    -- Reinhard Zumkeller, Apr 13 2013
    
  • Magma
    [(-1)^(n+k)*Binomial(n,k): k in [0..n], n in [0..15]]; // G. C. Greubel, Jun 22 2024
    
  • Maple
    A130595 := proc(n,k)
            (-1)^(n+k)*binomial(n,k) ;
    end proc: # R. J. Mathar, Feb 13 2013
  • Mathematica
    nmax = 11; t[n_, k_] := (-1)^(n-k)*Binomial[n, k]; Flatten[ Table[ t[n, k], {n, 0, nmax}, {k, 0, n}] ] (* Jean-François Alcover, Dec 01 2011 *)
    Table[Binomial[-1-k, n-k],{n,0,11},{k,0,n}]//Flatten (* Robert A. Russell, Jan 16 2020 *)
  • PARI
    A130595(n,k)=(-1)^(n+k)*binomial(n,k) \\ M. F. Hasler, Nov 01 2014
    
  • SageMath
    flatten([[(-1)^(n+k)*binomial(n,k) for k in range(n+1)] for n in range(16)]) # G. C. Greubel, Jun 22 2024

Formula

T(n,k) = (-1)^(n-k)*binomial(n,k) = (-1)^(n-k)*A007318(n,k).
T(n,k) = T(n-1,k-1) - T(n-1,k). - Philippe Deléham, Oct 10 2011
G.f.: 1/(1+x-x*y). - R. J. Mathar, Aug 11 2015 [corrected by Anders Claesson, Nov 28 2015]
Conjecture from Dale Gerdemann, Nov 28 2015:
T(n,k) = (n-k+1)*T(n-1,k-1) + (k-1)*T(n-1,k).
Proof from Anders Claesson, Nov 29 2015:
It follows from T(n,k) = T(n-1,k-1) - T(n-1,k) and n*T(n-1,k-1) = k*T(n,k) that: (n-k+1)*T(n-1,k-1) + (k-1)*T(n-1,k) = n*T(n-1,k-1) - (k-1)*T(n-1,k-1) + (k-1)*T(n-1,k) = n*T(n-1,k-1) - (k-1)*(T(n-1,k-1) - T(n-1,k)) = n*T(n-1,k-1) - (k-1)*T(n,k) = n*T(n-1,k-1) - k*T(n,k) + T(n,k) = T(n,k). QED
(-1)^(n+1) Sum_{k=1..n} T(n,k)/k = Sum_{k=1..n} 1/k = H(n) where H(n) is the n-th harmonic number. For a proof see link "Relation between binomial coefficients and harmonic numbers". - Wolfgang Hintze, Oct 22 2016
T(n,k) = binomial(-1-k,n-k). - Robert A. Russell, Jan 16 2020
From G. C. Greubel, Jun 22 2024: (Start)
T(n, n-k) = (-1)^n*T(n, k).
Sum_{k=0..n} T(n, k) = A000007(n).
Sum_{k=0..n} (-1)^k*T(n, k) = A122803(n).
Sum_{k=0..floor(n/2)} T(n-k, k) = A039834(n+1).
Sum_{k=0..floor(n/2)} (-1)^k*T(n-k, k) = A049347(n).
Sum_{k=0..n} k*T(n, k) = A063524(n).
Sum_{k=0..n} (-1)^k*k*T(n, k) = A085750(n+1).
Sum_{k=0..n} (k+1)*T(n, k) = A019590(n). (End)

Extensions

Edited by N. J. A. Sloane, Nov 27 2011

A100071 a(n) = n * binomial(n-1, floor((n-1)/2)) = n * max_{i=0..n} binomial(n-1, i).

Original entry on oeis.org

0, 1, 2, 6, 12, 30, 60, 140, 280, 630, 1260, 2772, 5544, 12012, 24024, 51480, 102960, 218790, 437580, 923780, 1847560, 3879876, 7759752, 16224936, 32449872, 67603900, 135207800, 280816200, 561632400, 1163381400, 2326762800
Offset: 0

Views

Author

Paul Barry, Nov 02 2004

Keywords

Comments

Old name: An inverse Chebyshev transform of n.
Hankel transform is (-1)^n*n*2^(n-1), A085750. This is the inverse binomial transform of -n. - Paul Barry, Jan 11 2007
Corollary 3 of the Farhi reference mentions this sequence. - Roger L. Bagula, Nov 08 2009
Number of UDUD's in all length n+3 left factors of Dyck paths (here U=(1,1) and D=(1,-1)). Example: a(2)=2 because in (UDUD)U, UDUUD, UDUUU, UUDDU, U(UDUD), UUDUU, UUUDD, UUUDU, UUUUD, and UUUUU we have a total of two UDUDs (shown between parentheses). Also number of UUDD's in all length n+3 left factors of Dyck paths (here U=(1,1) and D=(1,-1)). Example: a(2)=2 because in UDUDU, UDUUD, UDUUU, (UUDD)U, UUDUD, UUDUU, U(UUDD), UUUDU, UUUUD, and UUUUU we have a total of two UUDDs (shown between parentheses). - Emeric Deutsch, Jun 19 2011
Apparently the number of long ascents in all symmetric Dyck (n+1)-paths. - David Scambler, Aug 17 2012
Beginning with the least positive term multiple of an odd prime p (which is a(p)), we have exactly p+1 consecutive terms multiple of p. - Vladimir Shevelev, Aug 17 2012
Apparently also the count of 'unmatched symbols' in the binary strings of length n (see A008314). - Wouter Meeussen, May 26 2013

Crossrefs

Programs

  • Magma
    [n*Binomial(n-1, Floor((n-1)/2)): n in [0..35]]; // Vincenzo Librandi, Sep 14 2015
    
  • Maple
    swing := n -> n!/iquo(n,2)!^2:
    A100071 := n -> swing(n)*(n/2)^(n-1 mod 2):
    seq(A100071(i),i=0..30); # Peter Luschny, Aug 31 2011
  • Mathematica
    Table[(Floor[n/2] + Ceiling[n/2] + 1)!/(Floor[n/2]!*Ceiling[n/2]!), {n, 1, 40}] (* Stefan Steinerberger, Nov 04 2008 *)
    Table[If[n == 0, 0, n*Binomial[n - 1, Floor[(n - 1)/2]]], {n, 0, 30}] (* Roger L. Bagula, Nov 08 2009 *);
    Table[ Tr[ Table[Count[match[-1 + 2*IntegerDigits[n, 2, k]], 0], {n, 2^(k - 1), 2^k - 1}]], {k, 16}] (* function 'match' see A008314; Wouter Meeussen, May 26 2013 *)
  • PARI
    a(n) = n * binomial(n-1, (n-1)\2); \\ Michel Marcus, Sep 14 2015
  • Sage
    def A100071(n):
        f = factorial(n)/factorial(n//2)^2
        return f if is_odd(n) else f*(n/2)
    [A100071(n) for n in (0..50)]  # Peter Luschny, Aug 17 2012
    

Formula

G.f.: 2*x*(1 - sqrt(1 - 4*x^2))/(sqrt(1 - 4*x^2)*(sqrt(1 - 4*x^2) + 2*x - 1)^2).
G.f.: (1/sqrt(1 - 4*x^2))*x*c(x^2)/(1 - x*c(x^2))^2.
a(n) = Sum_{k = 0..floor(n/2)} binomial(n,k)*(n - 2*k).
Sum_{k = 0..floor(n/2)} binomial(n-k,k)*(-1)^k*a(n-2k) = 1.
From Paul Barry, Jan 11 2007: (Start)
a(n) = n*binomial(n-1, floor((n-1)/2));
a(n) = Sum_{k = 0..n} binomial(n,k)*2^(n-k)*binomial(2*k-2, k-1)*(-1)^(k-1). (End)
Starting (1, 2, 6, 12, ...), = inverse binomial transform of A134757: (1, 3, 11, 37, 123, 401, ...). - Gary W. Adamson, Nov 08 2007
a(n) = a(n-1)*n/floor(n/2) for n > 0. - Reinhard Zumkeller, Jan 20 2008
G.f.: x/((1 - 2*x)*sqrt(1 - 4*x^2)). - Paul Barry, Apr 25 2008
a(n) = (floor(n/2) + ceiling(n/2) + 1)!/(floor(n/2)! * ceiling(n/2)!). - Stefan Steinerberger, Nov 04 2008
a(n) = A056040(n)*(n/2)^((n-1) mod 2). - Peter Luschny, Aug 31 2011
Asymptotic: a(n) ~ b(n) where b(n) = ceiling(2^(n-1)*sqrt(2*n-(-1)^n)/sqrt(Pi)). b(n) is also a lower bound of a(n) and an upper bound of 2^(n-1). With corollary 3 from Bakir Farhi (see reference) lcm(1,2,...,n) >= a(n) >= b(n) >= 2^(n-1). - Peter Luschny, Aug 17 2012
a(n) = n for n < 3, a(n) = 4*a(n-2) + 2*a(n-1)/(n-1) for n >= 3. - Alexander R. Povolotsky, Aug 17 2012
E.g.f.: x*(BesselI(0,2*x) + BesselI(1,2*x)). - Peter Luschny, Aug 19 2012
a(n) = (-1)^(n*(n+1)/2) * Sum_{k = 0..n} (-1)^k*k*binomial(n,k)^2. - Peter Bala, Jul 25 2016
a(n) = n!/(floor((n-1)/2)!*ceiling((n-1)/2)!). See the Bandiera link. - Michel Marcus, Feb 28 2017
D-finite with recurrence (-n+1)*a(n) + 2*a(n-1) + 4*(n-1)*a(n-2) = 0. - R. J. Mathar, Aug 09 2017
From Amiram Eldar, Mar 10 2022: (Start)
Sum_{n>=1} 1/a(n) = Pi/sqrt(3).
Sum_{n>=1} (-1)^(n+1)/a(n) = Pi/(3*sqrt(3)). (End)

Extensions

Name changed, using part of a comment from Paul Barry, by Peter Luschny, Aug 17 2012

A049581 Table T(n,k) = |n-k| read by antidiagonals (n >= 0, k >= 0).

Original entry on oeis.org

0, 1, 1, 2, 0, 2, 3, 1, 1, 3, 4, 2, 0, 2, 4, 5, 3, 1, 1, 3, 5, 6, 4, 2, 0, 2, 4, 6, 7, 5, 3, 1, 1, 3, 5, 7, 8, 6, 4, 2, 0, 2, 4, 6, 8, 9, 7, 5, 3, 1, 1, 3, 5, 7, 9, 10, 8, 6, 4, 2, 0, 2, 4, 6, 8, 10, 11, 9, 7, 5, 3, 1, 1, 3, 5, 7, 9, 11, 12, 10, 8, 6, 4, 2, 0, 2, 4, 6, 8, 10, 12
Offset: 0

Views

Author

Keywords

Comments

Commutative non-associative operator with identity 0. T(nx,kx) = x T(n,k). A multiplicative analog is A089913. - Marc LeBrun, Nov 14 2003
For the characteristic polynomial of the n X n matrix M_n with entries M_n(i, j) = |i-j| see A203993. - Wolfdieter Lang, Feb 04 2018
For the determinant of the n X n matrix M_n with entries M_n(i, j) = |i-j| see A085750. - Bernard Schott, May 13 2020
a(n) = 0 iff n = 4 times triangular number (A046092). - Bernard Schott, May 13 2020

Examples

			Displayed as a triangle t(n, k):
  n\k   0 1 2 3 4 5 6 7 8 9 10 ...
  0:    0
  1:    1 1
  2:    2 0 2
  3:    3 1 1 3
  4:    4 2 0 2 4
  5:    5 3 1 1 3 5
  6:    6 4 2 0 2 4 6
  7:    7 5 3 1 1 3 5 7
  8:    8 6 4 2 0 2 4 6 8
  9:    9 7 5 3 1 1 3 5 7 9
  10:  10 8 6 4 2 0 2 4 6 8 10
... reformatted by _Wolfdieter Lang_, Feb 04 2018
Displayed as a table:
  0 1 2 3 4 5 6 ...
  1 0 1 2 3 4 5 ...
  2 1 0 1 2 3 4 ...
  3 2 1 0 1 2 3 ...
  4 3 2 1 0 1 2 ...
  5 4 3 2 1 0 1 ...
  6 5 4 3 2 1 0 ...
  ...
		

Crossrefs

Cf. A089913. Apart from signs, same as A114327. A203993.

Programs

  • GAP
    a := Flat(List([0..12],n->List([0..n],k->Maximum(k,n-k)-Minimum(k,n-k)))); # Muniru A Asiru, Jan 26 2018
    
  • Magma
    [[Abs(n-2*k): k in [0..n]]: n in [0..12]]; // G. C. Greubel, Jun 07 2019
    
  • Maple
    seq(seq(abs(n-2*k),k=0..n),n=0..12); # Robert Israel, Sep 30 2015
  • Mathematica
    Table[Abs[(n-k) -k], {n,0,12}, {k,0,n}]//Flatten (* Michael De Vlieger, Sep 29 2015 *)
    Table[Join[Range[n,0,-2],Range[If[EvenQ[n],2,1],n,2]],{n,0,12}]//Flatten (* Harvey P. Dale, Sep 18 2023 *)
  • PARI
    a(n) = abs(2*(n+1)-binomial((sqrtint(8*(n+1))+1)\2, 2)-(binomial(1+floor(1/2 + sqrt(2*(n+1))), 2))-1);
    vector(100, n , a(n-1)) \\ Altug Alkan, Sep 29 2015
    
  • PARI
    {t(n,k) = abs(n-2*k)}; \\ G. C. Greubel, Jun 07 2019
    
  • Python
    from math import isqrt
    def A049581(n): return abs((k:=n+1<<1)-((m:=isqrt(k))+(k>m*(m+1)))**2-1) # Chai Wah Wu, Nov 09 2024
  • Sage
    [[abs(n-2*k) for k in (0..n)] for n in (0..12)] # G. C. Greubel, Jun 07 2019
    

Formula

G.f.: (x + y - 4*x*y + x^2*y + x*y^2)/((1-x)^2*(1-y)^2*(1-x*y)) = (x/(1-x)^2 + y/(1-y)^2)/(1-x*y). T(n,0) = T(0,n) = n; T(n+1,k+1) = T(n,k). - Franklin T. Adams-Watters, Feb 06 2006
a(n) = |A002260(n+1)-A004736(n+1)| or a(n) = |((n+1)-t*(t+1)/2) - ((t*t+3*t+4)/2-(n+1))| where t = floor((-1+sqrt(8*(n+1)-7))/2). - Boris Putievskiy, Dec 24 2012; corrected by Altug Alkan, Sep 30 2015
From Robert Israel, Sep 30 2015: (Start)
If b(n) = a(n+1) - 2*a(n) + a(n-1), then for n >= 3 we have
b(n) = -1 if n = (j^2+5j+4)/2 for some integer j >= 1
b(n) = -3 if n = (j^2+5j+6)/2 for some integer j >= 0
b(n) = 4 if n = 2j^2 + 6j + 4 for some integer j >= 0
b(n) = 2 if n = 2j^2 + 8j + 7 or 2j^2 + 8j + 8 for some integer j >= 0
b(n) = 0 otherwise. (End)
Triangle t(n,k) = max(k, n-k) - min(k, n-k). - Peter Luschny, Jan 26 2018
Triangle t(n, k) = |n - 2*k| for n >= 0, k = 0..n. See the Maple and Mathematica programs. Hence t(n, k)= t(n, n-k). - Wolfdieter Lang, Feb 04 2018
a(n) = |t^2 - 2*n - 1|, where t = floor(sqrt(2*n+1) + 1/2). - Ridouane Oudra, Jun 07 2019; Dec 11 2020
As a rectangle, T(n,k) = |n-k| = max(n,k) - min(n,k). - Clark Kimberling, May 11 2020

A085807 Permanent of the symmetric n X n matrix A defined by A[i,j] = |i-j| for 1 <= i,j <= n.

Original entry on oeis.org

1, 0, 1, 4, 64, 1152, 34372, 1335008, 69599744, 4577345152, 374491314176, 37154032517376, 4402467119882240, 613680867638476800, 99443966100565999872, 18534733913629064343552, 3937496200758879526977536, 945776134421421651222708224, 255043190756805184245158084608
Offset: 0

Views

Author

Yuval Dekel (dekelyuval(AT)hotmail.com), Jul 24 2003

Keywords

Comments

Conjecture: For any odd prime p, we have a(p) == -1/2 (mod p). - Zhi-Wei Sun, Aug 30 2021
Conjecture: a(n) is the minimal permanent of an n X n symmetric Toeplitz matrix having 0 on the main diagonal and all the integers 1, 2, ..., n-1 off-diagonal. - Stefano Spezia, Jul 05 2024

Crossrefs

Programs

  • Maple
    with(LinearAlgebra):
    a:= n-> `if`(n=0, 1, Permanent(Matrix(n, (i, j)-> abs(i-j)))):
    seq(a(n), n=0..18);  # Alois P. Heinz, Nov 14 2016
  • Mathematica
    a[n_]:=Permanent[Table[Abs[i - j], {i, n}, {j, n}]]; Join[{1}, Array[a, 18]] (* Stefano Spezia, Jun 28 2024 *)
  • PARI
    permRWNb(a)= n=matsize(a)[1]; if(n==1,return(a[1,1])); sg=1; in=vectorv(n); x=in; x=a[,n]-sum(j=1,n,a[,j])/2; p=prod(i=1,n,x[i]); for(k=1,2^(n-1)-1,sg=-sg; j=valuation(k,2)+1; z=1-2*in[j]; in[j]+=z; x+=z*a[,j]; p+=prod(i=1,n,x[i],sg)); return(2*(2*(n%2)-1)*p)
    for(n=1,22,a=matrix(n,n,i,j,abs(i-j));print1(permRWNb(a)",")) \\  Herman Jamke (hermanjamke(AT)fastmail.fm), May 14 2007
    
  • PARI
    {a(n) = matpermanent(matrix(n, n, i, j, abs(i-j)))}
    for(n=0, 20, print1(a(n), ", ")) \\ Vaclav Kotesovec, Aug 12 2021
    
  • Python
    from sympy import Matrix
    def A085807(n): return Matrix(n,n,[abs(j-k) for j in range(n) for k in range(n)]).per() # Chai Wah Wu, Sep 14 2021

Extensions

More terms from Vladeta Jovovic, Jul 26 2003
a(0)=1 prepended by Alois P. Heinz, Nov 14 2016

A204249 Permanent of the n-th principal submatrix of A003057.

Original entry on oeis.org

1, 2, 17, 336, 12052, 685080, 56658660, 6428352000, 958532774976, 181800011433600, 42745508545320000, 12203347213269273600, 4158410247782904833280, 1667267950805177583582720, 776990110000329481864608000, 416483579190482716042690560000
Offset: 0

Views

Author

Clark Kimberling, Jan 14 2012

Keywords

Comments

I have proved that for any odd prime p we have a(p) == p (mod p^2). - Zhi-Wei Sun, Aug 30 2021

Crossrefs

Programs

  • Maple
    with(LinearAlgebra):
    a:= n-> `if`(n=0, 1, Permanent(Matrix(n, (i, j)-> i+j))):
    seq(a(n), n=0..16);  # Alois P. Heinz, Nov 14 2016
  • Mathematica
    f[i_, j_] := i + j;
    m[n_] := Table[f[i, j], {i, 1, n}, {j, 1, n}]
    TableForm[m[8]] (* 8x8 principal submatrix *)
    Flatten[Table[f[i, n + 1 - i],
      {n, 1, 12}, {i, 1, n}]]  (* A003057 *)
    Permanent[m_] :=
      With[{a = Array[x, Length[m]]},
       Coefficient[Times @@ (m.a), Times @@ a]];
    Table[Permanent[m[n]], {n, 1, 15}]  (* A204249 *)
  • PARI
    {a(n) = matpermanent(matrix(n, n, i, j, i+j))}
    for(n=0, 20, print1(a(n), ", ")) \\ Vaclav Kotesovec, Dec 21 2018

Formula

From Vaclav Kotesovec, Dec 01 2016: (Start)
a(n) ~ c * d^n * (n!)^2 / sqrt(n), where d = A278300 = 2.455407482284127949... and c = 1.41510164826...
a(n) ~ c * d^n * n^(2*n + 1/2), where d = A278300/exp(2) = 0.332303267076220516... and c = 8.89134588451...
(End)

Extensions

a(0)=1 prepended and one more term added by Alois P. Heinz, Nov 14 2016

A278847 a(n) = permanent M_n where M_n is the n X n matrix m(i,j) = i^2 + j^2.

Original entry on oeis.org

1, 2, 41, 3176, 620964, 246796680, 174252885732, 199381727959680, 345875291854507584, 864860593764292790400, 2996169331694350840741440, 13929521390709644084719495680, 84659009841182126038701730464000, 658043094413184868424932006273344000
Offset: 0

Views

Author

Vaclav Kotesovec, Nov 29 2016

Keywords

Comments

From Zhi-Wei Sun, Aug 19 2021: (Start)
I have proved that a(n) == (-1)^(n-1)*2*n! (mod 2n+1) whenever 2n+1 is prime.
Conjecture 1: If 2n+1 is composite, then a(n) == 0 (mod 2n+1).
Conjecture 2: If p = 4n+1 is prime, then the sum of those Product_{j=1..2n}(j^2-f(j)^2)^{-1} with f over all the derangements of {1,...,2n} is congruent to 1/(n!)^2 modulo p. (End)

Crossrefs

Programs

  • Maple
    with(LinearAlgebra):
    a:= n-> `if`(n=0, 1, Permanent(Matrix(n, (i, j)-> i^2+j^2))):
    seq(a(n), n=0..16);  # after Alois P. Heinz
  • Mathematica
    Flatten[{1, Table[Permanent[Table[i^2+j^2, {i, 1, n}, {j, 1, n}]], {n, 1, 15}]}]
  • PARI
    a(n)={matpermanent(matrix(n, n, i, j, i^2 + j^2))} \\ Andrew Howroyd, Aug 21 2018

Formula

a(n) ~ c * d^n * (n!)^3 / n, where d = 3.809076776112918119... and c = 1.07739642254738...

A278845 a(n) = permanent M_n where M_n is the n X n matrix m(i,j) = (i+j)^2.

Original entry on oeis.org

1, 4, 145, 19016, 6176676, 4038562000, 4664347807268, 8698721212922496, 24535712762777208384, 99585504924929052560640, 559305193643176161735904320, 4211594966980674975033969246720, 41428564066728305721531962537124096, 520897493876353116313789796095643304960
Offset: 0

Views

Author

Vaclav Kotesovec, Nov 29 2016

Keywords

Crossrefs

Programs

  • Maple
    with(LinearAlgebra):
    a:= n-> `if`(n=0, 1, Permanent(Matrix(n, (i, j)-> (i+j)^2))):
    seq(a(n), n=0..16);  # Vaclav Kotesovec, Nov 29 2016, after Alois P. Heinz
  • Mathematica
    Flatten[{1, Table[Permanent[Table[(i+j)^2, {i, 1, n}, {j, 1, n}]], {n, 1, 15}]}]
  • PARI
    {a(n) = matpermanent(matrix(n, n, i, j, (i+j)^2))}
    for(n=0, 20, print1(a(n), ", ")) \\ Vaclav Kotesovec, Aug 09 2021

Formula

a(n) ~ c * d^n * (n!)^3 / n, where d = 6.14071825... and c = 1.79385445... - Vaclav Kotesovec, Aug 12 2021

A374139 a(n) is the determinant of the symmetric Toeplitz matrix of order n whose element (i,j) equals abs(i-j) or 1 if i = j.

Original entry on oeis.org

1, 1, 0, -1, 1, 3, 0, -3, 1, 5, 0, -5, 1, 7, 0, -7, 1, 9, 0, -9, 1, 11, 0, -11, 1, 13, 0, -13, 1, 15, 0, -15, 1, 17, 0, -17, 1, 19, 0, -19, 1, 21, 0, -21, 1, 23, 0, -23, 1, 25, 0, -25, 1, 27, 0, -27, 1, 29, 0, -29, 1, 31, 0, -31, 1, 33, 0, -33, 1, 35, 0, -35, 1, 37, 0, -37
Offset: 0

Views

Author

Stefano Spezia, Jun 28 2024

Keywords

Comments

A minor variant of A166445. - R. J. Mathar, Jul 01 2024

Examples

			a(4) = 1:
  [1, 1, 2, 3]
  [1, 1, 1, 2]
  [2, 1, 1, 1]
  [3, 2, 1, 1]
		

Crossrefs

Cf. A056594, A071078, A085750, A374140 (permanent).

Programs

  • Mathematica
    a[n_]:=Det[Table[If[i == j, 1, Abs[i - j]], {i, n}, {j, n}]]; Join[{1}, Array[a, 75]]
  • PARI
    a(n) = matdet(matrix(n, n, i, j, if (i==j, 1, abs(i-j)))); \\ Michel Marcus, Jun 29 2024
    
  • Python
    from sympy import Matrix
    def A374139(n): return Matrix(n,n,[abs(j-k) if j!=k else 1 for j in range(n) for k in range(n)]).det() # Chai Wah Wu, Jul 01 2024

Formula

G.f.: (1 + x^2 - x^3 + x^4)/((1 - x)*(1 + x^2)^2).
a(n) = a(n-1) - 2*a(n-2) + 2*a(n-3) - a(n-4) + a(n-5) for n > 4.
a(n) = (1 + A056594(n) + n*A056594(n+1))/2.
E.g.f.: (exp(x) + (1 + x)*cos(x))/2.
For a proof of the generating function and the recursion formula, see MathOverflow link. - Sela Fried, Jul 09 2024

A139756 Binomial transform of A004526.

Original entry on oeis.org

0, 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

Paul Curtz, May 19 2008

Keywords

Comments

Essentially the same as A001787, A097067, A085750 and A118442.
Also: self-convolution of A131577. - R. J. Mathar, May 22 2008
Let S be a subset of {1,2,...,n}. A succession in S is a subset of the form {i,i+1}. a(n) is the total number of successions in all subsets of {1,2,...,n}. a(n) = Sum_{k>=1} A076791(n,k)*k. - Geoffrey Critzer, Mar 18 2012.

Examples

			a(4) = 12 because we have {1,2}, {2,3}, {3,4}, {1,2,4}, {1,3,4} with one succession; {1,2,3}, {2,3,4} with two successions; and {1,2,3,4} with three successions. - _Geoffrey Critzer_, Mar 18 2012.
		

References

  • I Goulden and D Jackson, Combinatorial Enumeration, John Wiley and Sons, 1983, page 55.

Crossrefs

Programs

  • Mathematica
    nn = 30; a = 1/(1 - y x); b = x/(1 - y x) + 1; c = 1/(1 - x); CoefficientList[ D[Series[c b/(1 - (a x^2 c)), {x, 0, nn}], y] /. y -> 1, x]  (* Geoffrey Critzer, Mar 18 2012 *)

Formula

O.g.f.: x^2/(1-2*x)^2. a(n) = (n-1)*2^n/4 if n>0. - R. J. Mathar, May 22 2008
a(n) = A097067(n), n>0. - R. J. Mathar, Nov 03 2008
a(n) = A168511(n+1,n). - Philippe Deléham, Mar 20 2013
a(n) = 2*a(n-1) + 2^(n-2), n>=2. - Philippe Deléham, Mar 20 2013

Extensions

More terms from R. J. Mathar, May 22 2008
Showing 1-10 of 23 results. Next