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

A002415 4-dimensional pyramidal numbers: a(n) = n^2*(n^2-1)/12.

Original entry on oeis.org

0, 0, 1, 6, 20, 50, 105, 196, 336, 540, 825, 1210, 1716, 2366, 3185, 4200, 5440, 6936, 8721, 10830, 13300, 16170, 19481, 23276, 27600, 32500, 38025, 44226, 51156, 58870, 67425, 76880, 87296, 98736, 111265, 124950, 139860, 156066, 173641, 192660, 213200, 235340
Offset: 0

Views

Author

Keywords

Comments

Also number of ways to legally insert two pairs of parentheses into a string of m := n-1 letters. (There are initially 2C(m+4,4) (A034827) ways to insert the parentheses, but we must subtract 2(m+1) for illegal clumps of 4 parentheses, 2m(m+1) for clumps of 3 parentheses, C(m+1,2) for 2 clumps of 2 parentheses and (m-1)C(m+1,2) for 1 clump of 2 parentheses, giving m(m+1)^2(m+2)/12 = n^2*(n^2-1)/12.) See also A000217.
E.g., for n=2 there are 6 ways: ((a))b, ((a)b), ((ab)), (a)(b), (a(b)), a((b)).
Let M_n denote the n X n matrix M_n(i,j)=(i+j); then the characteristic polynomial of M_n is x^(n-2) * (x^2-A002378(n)*x - a(n)). - Benoit Cloitre, Nov 09 2002
Let M_n denote the n X n matrix M_n(i,j)=(i-j); then the characteristic polynomial of M_n is x^n + a(n)x^(n-2). - Michael Somos, Nov 14 2002 [See A114327 for the infinite matrix M in triangular form. - Wolfdieter Lang, Feb 05 2018]
Number of permutations of [n] which avoid the pattern 132 and have exactly 2 descents. - Mike Zabrocki, Aug 26 2004
Number of tilings of a <2,n,2> hexagon.
a(n) is the number of squares of side length at least 1 having vertices at the points of an n X n unit grid of points (the vertices of an n-1 X n-1 chessboard). [For a proof, see Comments in A051602. - N. J. A. Sloane, Sep 29 2021] For example, on the 3 X 3 grid (the vertices of a 2 X 2 chessboard) there are four 1 X 1 squares, one (skew) sqrt(2) X sqrt(2) square, and one 3 X 3 square, so a(3)=6. On the 4 X 4 grid (the vertices of a 3 X 3 chessboard) there are 9 1 X 1 squares, 4 2 X 2 squares, 1 3 X 3 square, 4 sqrt(2) X sqrt(2) squares, and 2 sqrt(5) X sqrt(5) squares, so a(4) = 20. See also A024206, A108279. [Comment revised by N. J. A. Sloane, Feb 11 2015]
Kekulé numbers for certain benzenoids. - Emeric Deutsch, Jun 12 2005
Number of distinct components of the Riemann curvature tensor. - Gene Ward Smith, Apr 24 2006
a(n) is the number of 4 X 4 matrices (symmetrical about each diagonal) M = [a,b,c,d;b,e,f,c;c,f,e,b;d,c,b,a] with a+b+c+d=b+e+f+c=n+2; (a,b,c,d,e,f natural numbers). - Philippe Deléham, Apr 11 2007
If a 2-set Y and an (n-2)-set Z are disjoint subsets of an n-set X then a(n-3) is the number of 5-subsets of X intersecting both Y and Z. - Milan Janjic, Sep 19 2007
a(n) is the number of Dyck (n+1)-paths with exactly n-1 peaks. - David Callan, Sep 20 2007
Starting (1,6,20,50,...) = third partial sums of binomial transform of [1,2,0,0,0,...]. a(n) = Sum_{i=0..n} C(n+3,i+3)*b(i), where b(i)=[1,2,0,0,0,...]. - Borislav St. Borisov (b.st.borisov(AT)abv.bg), Mar 05 2009
4-dimensional square numbers. - Borislav St. Borisov (b.st.borisov(AT)abv.bg), Mar 05 2009
Equals row sums of triangle A177877; a(n), n > 1 = (n-1) terms in (1,2,3,...) dot (...,3,2,1) with additive carryovers. Example: a(4) = 20 = (1,2,3) dot (3,2,1) with carryovers = (1*3) + (2*2 + 3) + (3*1 + 7) = (3 + 7 + 10).
Convolution of the triangular numbers A000217 with the odd numbers A004273.
a(n+2) is the number of 4-tuples (w,x,y,z) with all terms in {0,...,n} and w-x=max{w,x,y,z}-min{w,x,y,z}. - Clark Kimberling, May 28 2012
The second level of finite differences is a(n+2) - 2*a(n+1) + a(n) = (n+1)^2, the squares. - J. M. Bergot, May 29 2012
Because the differences of this sequence give A000330, this is also the number of squares in an n+1 X n+1 grid whose sides are not parallel to the axes.
a(n+2) gives the number of 2*2 arrays that can be populated with 0..n such that rows and columns are nondecreasing. - Jon Perry, Mar 30 2013
For n consecutive numbers 1,2,3,...,n, the sum of all ways of adding the k-tuples of consecutive numbers for n=a(n+1). As an example, let n=4: (1)+(2)+(3)+(4)=10; (1+2)+(2+3)+(3+4)=15; (1+2+3)+(2+3+4)=15; (1+2+3+4)=10 and the sum of these is 50=a(4+1)=a(5). - J. M. Bergot, Apr 19 2013
If P(n,k) = n*(n+1)*(k*n-k+3)/6 is the n-th (k+2)-gonal pyramidal number, then a(n) = P(n,k)*P(n-1,k-1) - P(n-1,k)*P(n,k-1). - Bruno Berselli, Feb 18 2014
For n > 1, a(n) = 1/6 of the area of the trapezoid created by the points (n,n+1), (n+1,n), (1,n^2+n), (n^2+n,1). - J. M. Bergot, May 14 2014
For n > 3, a(n) is twice the area of a triangle with vertices at points (C(n,4),C(n+1,4)), (C(n+1,4),C(n+2,4)), and (C(n+2,4),C(n+3,4)). - J. M. Bergot, Jun 03 2014
a(n) is the dimension of the space of metric curvature tensors (those having the symmetries of the Riemann curvature tensor of a metric) on an n-dimensional real vector space. - Daniel J. F. Fox, Dec 15 2018
Coefficients in the terminating series identity 1 - 6*n/(n + 5) + 20*n*(n - 1)/((n + 5)*(n + 6)) - 50*n*(n - 1)*(n - 2)/((n + 5)*(n + 6)*(n + 7)) + ... = 0 for n = 1,2,3,.... Cf. A000330 and A005585. - Peter Bala, Feb 18 2019

Examples

			a(7) = 6*21 - (6*0 + 4*1 + 2*3 + 0*6 - 2*10 - 4*15) = 196. - _Bruno Berselli_, Jun 22 2013
G.f. = x^2 + 6*x^3 + 20*x^4 + 50*x^5 + 105*x^6 + 196*x^7 + 336*x^8 + ...
		

References

  • O. D. Anderson, Find the next sequence, J. Rec. Math., 8 (No. 4, 1975-1976), 241.
  • A. H. Beiler, Recreations in the Theory of Numbers, Dover, NY, 1964, p. 195.
  • S. J. Cyvin and I. Gutman, Kekulé structures in benzenoid hydrocarbons, Lecture Notes in Chemistry, No. 46, Springer, New York, 1988 (p.165).
  • R. Euler and J. Sadek, "The Number of Squares on a Geoboard", Journal of Recreational Mathematics, 251-5 30(4) 1999-2000 Baywood Pub. NY
  • S. Mukai, An Introduction to Invariants and Moduli, Cambridge, 2003; see p. 238.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

a(n) = ((-1)^n)*A053120(2*n, 4)/8 (one-eighth of fifth unsigned column of Chebyshev T-triangle, zeros omitted). Cf. A001296.
Second row of array A103905.
Third column of Narayana numbers A001263.
Partial sums of A000330.
The expression binomial(m+n-1,n)^2-binomial(m+n,n+1)*binomial(m+n-2,n-1) for the values m = 2 through 14 produces sequences A000012, A000217, A002415, A006542, A006857, A108679, A134288, A134289, A134290, A134291, A140925, A140935, A169937.
Cf. A220212 for a list of sequences produced by the convolution of the natural numbers (A000027) with the k-gonal numbers.

Programs

  • GAP
    List([0..45],n->Binomial(n^2,2)/6); # Muniru A Asiru, Dec 15 2018
  • Magma
    [n^2*(n^2-1)/12: n in [0..50]]; // Wesley Ivan Hurt, May 14 2014
    
  • Maple
    A002415 := proc(n) binomial(n^2,2)/6 ; end proc: # Zerinvary Lajos, Jan 07 2008
  • Mathematica
    Table[(n^4 - n^2)/12, {n, 0, 40}] (* Zerinvary Lajos, Mar 21 2007 *)
    LinearRecurrence[{5,-10,10,-5,1},{0,0,1,6,20},40] (* Harvey P. Dale, Nov 29 2011 *)
  • PARI
    a(n) = n^2 * (n^2 - 1) / 12;
    
  • PARI
    x='x+O('x^200); concat([0, 0], Vec(x^2*(1+x)/(1-x)^5)) \\ Altug Alkan, Mar 23 2016
    

Formula

G.f.: x^2*(1+x)/(1-x)^5. - Simon Plouffe in his 1992 dissertation
a(n) = Sum_{i=0..n} (n-i)*i^2 = a(n-1) + A000330(n-1) = A000217(n)*A000292(n-2)/n = A000217(n)*A000217(n-1)/3 = A006011(n-1)/3, convolution of the natural numbers with the squares. - Henry Bottomley, Oct 19 2000
a(n)+1 = A079034(n). - Mario Catalani (mario.catalani(AT)unito.it), Feb 12 2003
a(n) = 2*C(n+2, 4) - C(n+1, 3). - Paul Barry, Mar 04 2003
a(n) = C(n+2, 4) + C(n+1, 4). - Paul Barry, Mar 13 2003
a(n) = Sum_{k=1..n} A000330(n-1). - Benoit Cloitre, Jun 15 2003
a(n) = n*C(n+1,3)/2 = C(n+1,3)*C(n+1,2)/(n+1). - Mitch Harris, Jul 06 2006
a(n) = A006011(n)/3 = A008911(n)/2 = A047928(n-1)/12 = A083374(n)/6. - Zerinvary Lajos, May 09 2007
a(n) = (1/2)*Sum_{1 <= x_1, x_2 <= n} (det V(x_1,x_2))^2 = (1/2)*Sum_{1 <= i,j <= n} (i-j)^2, where V(x_1,x_2) is the Vandermonde matrix of order 2. - Peter Bala, Sep 21 2007
a(n) = C(n+1,3) + 2*C(n+1,4). - Borislav St. Borisov (b.st.borisov(AT)abv.bg), Mar 05 2009
a(n) = (1/48)*sinh(2*arccosh(n))^2. - Artur Jasinski, Feb 10 2010
a(n) = n*A000292(n-1)/2. - Tom Copeland, Sep 13 2011
a(n) = 5*a(n-1) - 10*a(n-2) + 10*a(n-3) - 5*a(n-4) + a(n-5), n > 4. - Harvey P. Dale, Nov 29 2011
a(n) = (n-1)*A000217(n-1) - Sum_{i=0..n-2} (n-1-2*i)*A000217(i) for n > 1. - Bruno Berselli, Jun 22 2013
a(n) = C(n,2)*C(n+1,3) - C(n,3)*C(n+1,2). - J. M. Bergot, Sep 17 2013
a(n) = Sum_{k=1..n} ( (2k-n)* k(k+1)/2 ). - Wesley Ivan Hurt, Sep 26 2013
a(n) = floor(n^2/3) + 3*Sum_{k=1..n} k^2*floor((n-k+1)/3). - Mircea Merca, Feb 06 2014
Euler transform of length 2 sequence [6, -1]. - Michael Somos, May 28 2014
G.f. x^2*2F1(3,4;2;x). - R. J. Mathar, Aug 09 2015
Sum_{n>=2} 1/a(n) = 21 - 2*Pi^2 = 1.260791197821282762331... . - Vaclav Kotesovec, Apr 27 2016
a(n) = A080852(2,n-2). - R. J. Mathar, Jul 28 2016
a(n) = A046092(n) * A046092(n-1)/48 = A000217(n) * A000217(n-1)/3. - Bruce J. Nicholson, Jun 06 2017
E.g.f.: (1/12)*exp(x)*x^2*(6 + 6*x + x^2). - Stefano Spezia, Dec 07 2018
Sum_{n>=2} (-1)^n/a(n) = Pi^2 - 9 (See A002388). - Amiram Eldar, Jun 28 2020

Extensions

Typo in link fixed by Matthew Vandermast, Nov 22 2010
Redundant comment deleted and more detail on relationship with A000330 added by Joshua Zucker, Jan 01 2013

A037270 a(n) = n^2*(n^2 + 1)/2.

Original entry on oeis.org

0, 1, 10, 45, 136, 325, 666, 1225, 2080, 3321, 5050, 7381, 10440, 14365, 19306, 25425, 32896, 41905, 52650, 65341, 80200, 97461, 117370, 140185, 166176, 195625, 228826, 266085, 307720, 354061, 405450, 462241, 524800, 593505, 668746, 750925, 840456, 937765
Offset: 0

Views

Author

Aaron Gulliver (gulliver(AT)elec.canterbury.ac.nz)

Keywords

Comments

Sum of first n^2 positive integers.
Start from xanthene and attach amino acids according to the reaction scheme that describes the reaction between the active sites. See the hyperlink below on chemistry. - Robert G. Wilson v, Aug 02 2002; Amarnath Murthy, Aug 01 2002
Sum of the next n multiples of n. - Amarnath Murthy, Aug 01 2002
The sum of the terms in an n X n spiral. These are also triangular numbers. - William A. Tedeschi, Feb 27 2008
Hypotenuse of Pythagorean triangles with smallest side a cube: A000578(n)^2 + A083374(n)^2 = a(n)^2. - Martin Renner, Nov 12 2011
For n>1, triangular numbers that can be represented as a sum of a square and a triangular number. For example, a(2)=10=4+6=9+1. - Ivan N. Ianakiev, Apr 24 2012
A037270 can be constructed in the following manner: Take A000217 and for every n not in A000290 delete the corresponding A000217(n). - Ivan N. Ianakiev, Apr 26 2012
Starting at a(1)=1 simply take 1*1=1, a(2)= 2*(2+3)=10, a(3)= 3*(4+5+6)=45, a(4)=4*(7+8+9+10) and so on. - J. M. Bergot, May 01 2015
Observation: The digital roots of the terms repeat in the sequence 1, 1, 9; e.g., the digital roots of 1, 10, 45, 136, 325, and 666 are 1, 1, 9, 1, 1, and 9. Verified for the first 10000 terms. - Rob Barton, Mar 28 2018
The above observation is easily explained and proved given that the digital root of a positive number equals the number modulo 9, and a(n + 9k) == a(n) (mod 9). - M. F. Hasler, Apr 05 2018
Number of unoriented rows of length 4 using up to n colors. For a(0)=0, there are no rows using no colors. For a(1)=1, there is one row using that one color for all positions. For a(2)=10, there are 4 achiral (AAAA, ABBA, BAAB, BBBB) and 6 chiral pairs (AAAB-BAAA, AABA-ABAA, AABB-BBAA, ABAB-BABA, ABBB-BBBA, BABB-BBAB). - Robert A. Russell, Nov 14 2018
For n > 0, a(2n+1) is the number of non-isomorphic 6C_m-snakes, where m = 2n+1 or m = 2n (for n>=2). A kC_n-snake is a connected graph in which the k>=2 blocks are isomorphic to the cycle C_n and the block-cutpoint graph is a path. - Christian Barrientos, May 15 2019
Number of achiral colorings of the edges of a tetrahedron with n available colors. - Robert A. Russell, Sep 07 2019

References

  • C. Alsina and R. B. Nelson, Charming Proofs: A Journey into Elegant Mathematics, MAA, 2010. See p. 5.
  • C. Barrientos, Graceful labelings of cyclic snakes, Ars Combin., 60(2001), 85-96.
  • Albert H. Beiler, Recreations in the theory of numbers, New York: Dover, (2nd ed.) 1966, p. 106, table 55.
  • T. A. Gulliver, Sequences from Arrays of Integers, Int. Math. Journal, Vol. 1, No. 4, pp. 323-332, 2002.
  • T. A. Gulliver, Sequences from Cubes of Integers, Int. Math. Journal, 4 (2003), 439-445.
  • R. A. Wilson, Cosmic Trigger, epilogue of S.-P. Sirag.

Crossrefs

Cf. A000217, A236770 (see crossrefs).
Row 4 of A277504.
Cf. A000583 (oriented), A083374 (chiral), A000290 (achiral).
Cf. A317617.
Row 3 of A327086 (achiral simplex edge colorings).

Programs

  • GAP
    a:=List([0..30],n->n^2*(n^2+1)/2); # Muniru A Asiru, Mar 28 2018
    
  • Magma
    [n^2*(n^2 + 1)/2: n in [0..30]] // Stefano Spezia, Jan 15 2019
  • Maple
    seq(n^2*(n^2+1)/2,n=0..30); # Muniru A Asiru, Mar 28 2018
  • Mathematica
    Table[ n^2*((n^2 + 1)/2), {n, 0, 30} ]
    Table[(1/8) Round[N[Sinh[2 ArcSinh[n]]^2, 100]], {n, 0, 30}] (* Artur Jasinski, Feb 10 2010 *)
    LinearRecurrence[{5,-10,10,-5,1},{0,1,10,45,136},30] (* Harvey P. Dale, Aug 03 2014 *)
  • PARI
    a(n)=binomial(n^2+1,2) \\ Charles R Greathouse IV, Apr 25 2012
    
  • Python
    for n in range(0,30): print(n**2*(n**2+1)/2, end=', ') # Stefano Spezia, Jan 10 2019
    

Formula

a(n) = a(n-1) + n^3 + (n-1)^3.
a(n) = A000537(n)+A000537(n-1), i.e., square of sum of first n integers plus square of sum of first n-1 integers. - Henry Bottomley, Oct 15 2001
a(n) = Sum_{k=0..n^2} k. - William A. Tedeschi, Feb 27 2008
a(n) = (1/8)*sinh(2*arcsinh(n)). - Artur Jasinski, Feb 10 2010
G.f.: x*(1+x)*(1+4*x+x^2)/(1-x)^5. - Colin Barker, Mar 22 2012
a(n) = a(n-1) + A005898(n-1). - Ivan N. Ianakiev, May 13 2012
a(n) = 2 * A000217(n-1) * A000217(n) + A000290(n). - Ivan N. Ianakiev, May 26 2012
a(n) = A000217(n^2). - J. M. Bergot, Jun 07 2012
a(n) = 5*a(n-1) -10*a(n-2) +10*a(n-3) -5*a(n-4) +a(n-5) n>4, a(0)=0, a(1)=1, a(2)=10, a(3)=45, a(4)=136. - Yosu Yurramendi, Sep 02 2013
For n>0, a(n) = A000217(n)^2 + A000217(n-1)^2. - Richard R. Forberg, Dec 25 2013
a(n) = T(T(n)) + T(T(n-1)) + T(T(n)-1) + T(T(n-1)-1), where T(n) = A000217(n). - Charlie Marion, Sep 10 2016
a(n) = t(n-3)*t(n)+t(n-1)*t(n+2), with t(n)=A000217(n). - J. M. Bergot, Apr 07 2018
From Robert A. Russell, Nov 14 2018: (Start)
a(n) = (A000583(n) + A000290(n)) / 2 = (n^4 + n^2) / 2.
a(n) = A000583(n) - A083374(n) = A083374(n) + A000290(n).
G.f.: (Sum_{j=1..4} S2(4,j)*j!*x^j/(1-x)^(j+1) + Sum_{j=1..2} S2(2,j)*j!*x^j/(1-x)^(j+1)) / 2, where S2 is the Stirling subset number A008277.
G.f.: Sum_{k=1..4} A145882(4,k) * x^k / (1-x)^5.
E.g.f.: (Sum_{k=1..4} S2(4,k)*x^k + Sum_{k=1..2} S2(2,k)*x^k) * exp(x) / 2, where S2 is the Stirling subset number A008277.
For n>4, a(n) = Sum_{j=1..5} -binomial(j-6,j) * a(n-j). (End)
a(n) = n*A006003(n). - Kritsada Moomuang, Dec 16 2018
For n > 0, a(n) = Sum_{k=1..n} A317617(n,k). - Stefano Spezia, Jan 10 2019
Sum_{n>=1} 1/a(n) = 1 + Pi^2/3 - Pi*coth(Pi) = 1.13652003875929052467672874379... - Vaclav Kotesovec, Jan 21 2019
Sum_{n>=1} (-1)^(n+1)/a(n) = Pi*csch(Pi) + Pi^2/6 - 1. - Amiram Eldar, Nov 02 2021

A271703 Triangle read by rows: the unsigned Lah numbers T(n, k) = binomial(n-1, k-1)*n!/k! if n > 0 and k > 0, T(n, 0) = 0^n and otherwise 0, for n >= 0 and 0 <= k <= n.

Original entry on oeis.org

1, 0, 1, 0, 2, 1, 0, 6, 6, 1, 0, 24, 36, 12, 1, 0, 120, 240, 120, 20, 1, 0, 720, 1800, 1200, 300, 30, 1, 0, 5040, 15120, 12600, 4200, 630, 42, 1, 0, 40320, 141120, 141120, 58800, 11760, 1176, 56, 1, 0, 362880, 1451520, 1693440, 846720, 211680, 28224, 2016, 72, 1
Offset: 0

Views

Author

Peter Luschny, Apr 14 2016

Keywords

Comments

The Lah numbers can be seen as the case m=1 of the family of triangles T_{m}(n,k) = T_{m}(n-1,k-1)+(k^m+(n-1)^m)*T_{m}(n-1,k) (see the link 'Partition transform').
This is the Sheffer triangle (lower triangular infinite matrix) (1, x/(1-x)), an element of the Jabotinsky subgroup of the Sheffer group. - Wolfdieter Lang, Jun 12 2017

Examples

			As a rectangular array (diagonals of the triangle):
  1,      1,       1,       1,       1,       1,       ... A000012
  0,      2,       6,       12,      20,      30,      ... A002378
  0,      6,       36,      120,     300,     630,     ... A083374
  0,      24,      240,     1200,    4200,    11760,   ... A253285
  0,      120,     1800,    12600,   58800,   211680,  ...
  0,      720,     15120,   141120,  846720,  3810240, ...
A000007, A000142, A001286, A001754, A001755,  A001777.
The triangle T(n,k) begins:
n\k 0       1        2        3        4       5      6     7    8  9 10 ...
0:  1
1:  0       1
2:  0       2        1
3:  0       6        6        1
4:  0      24       36       12        1
5:  0     120      240      120       20       1
6:  0     720     1800     1200      300      30      1
7:  0    5040    15120    12600     4200     630     42     1
8:  0   40320   141120   141120    58800   11760   1176    56    1
9:  0  362880  1451520  1693440   846720  211680  28224  2016   72  1
10: 0 3628800 16329600 21772800 12700800 3810240 635040 60480 3240 90  1
...  - _Wolfdieter Lang_, Jun 12 2017
		

References

  • R. L. Graham, D. E. Knuth and O. Patashnik, Concrete Mathematics, Addison-Wesley, 2nd ed., pp. 312, 552.
  • I. Lah, Eine neue Art von Zahlen, ihre Eigenschaften und Anwendung in der mathematischen Statistik, Mitt.-Bl. Math. Statistik, 7:203-213, 1955.
  • T. Mansour, M. Schork, Commutation Relations, Normal Ordering, and Stirling Numbers, CRC Press, 2016

Crossrefs

Variants: A008297 the main entry for these numbers, A105278, A111596 (signed).
A000262 (row sums). Largest number of the n-th row in A002868.

Programs

  • Maple
    T := (n, k) -> `if`(n=k, 1, binomial(n-1,k-1)*n!/k!):
    seq(seq(T(n, k), k=0..n), n=0..9);
  • Mathematica
    T[n_, k_] := Binomial[n, k]*FactorialPower[n-1, n-k];
    Table[T[n, k], {n, 0, 9}, {k, 0, n}] // Flatten (* Jean-François Alcover, Jun 20 2017 *)
  • Sage
    @cached_function
    def T(n,k):
        if k<0 : return 0
        if k==n: return 1
        return T(n-1,k-1) + (k+n-1)*T(n-1,k)
    for n in (0..8): print([T(n,k) for k in (0..n)])

Formula

For a collection of formulas see the 'Lah numbers' link.
T(n, k) = A097805(n, k)*n!/k! = (-1)^k*P_{n, k}(1,1,1,...) where P_{n, k}(s) is the partition transform of s.
T(n, k) = coeff(n! * P(n), x, k) with P(n) = (1/n)*(Sum_{k=0..n-1}(x(n-k)*P(k))), for n >= 1 and P(n=0) = 1, with x(n) = n*x. See A036039. - Johannes W. Meijer, Jul 08 2016
From Wolfdieter Lang, Jun 12 2017: (Start)
E.g.f. of row polynomials R(n, x) = Sum_{k=0..n} T(n, k)*x^k (that is egf of the triangle) is exp(x*t/(1-t)) (a Sheffer triangle of the Jabotinsky type).
E.g.f. column k: (t/(1-t))^k/k!.
Three term recurrence: T(n, k) = T(n-1, k-1) + (n-1+k)*T(n, k-1), n >= 1, k = 0..n, with T(0, 0) =1, T(n, -1) = 0, T(n, k) = 0 if n < k.
T(n, k) = binomial(n, k)*fallfac(x=n-1, n-k), with fallfac(x, n) = Product_{j=0..(n-1)} (x - j), for n >= 1, and 0 for n = 0.
risefac(x, n) = Sum_{k=0..n} T(n, k)*fallfac(k), with risefac(x, n) = Product_{j=0..(n-1)} (x + j), for n >= 1, and 0 for n = 0.
See Graham et al., exercise 31, p. 312, solution p. 552. (End)
Formally, let f_n(x) = Sum_{k>n} (k-1)!*x^k; then f_n(x) = Sum_{k=0..n} T(n, k)* x^(n+k)*f_0^((k))(x), where ^((k)) stands for the k-th derivative. - Luc Rousseau, Dec 27 2020
T(n, k) = Sum_{j=k..n} A354795(n, j)*A360177(j, k). - Mélika Tebni, Feb 02 2023
T(n, k) = binomial(n, k)*(n-1)!/(k-1)! for n, k > 0. - Chai Wah Wu, Nov 30 2023

A006011 a(n) = n^2*(n^2 - 1)/4.

Original entry on oeis.org

0, 0, 3, 18, 60, 150, 315, 588, 1008, 1620, 2475, 3630, 5148, 7098, 9555, 12600, 16320, 20808, 26163, 32490, 39900, 48510, 58443, 69828, 82800, 97500, 114075, 132678, 153468, 176610, 202275, 230640, 261888, 296208, 333795, 374850, 419580, 468198
Offset: 0

Views

Author

Keywords

Comments

Products of two consecutive triangular numbers (A000217).
a(n) is the number of Lyndon words of length 4 on an n-letter alphabet. A Lyndon word is a primitive word that is lexicographically earliest in its cyclic rotation class. For example, a(2)=3 counts 1112, 1122, 1222. - David Callan, Nov 29 2007
For n >= 2 this is the second rightmost column of A163932. - Johannes W. Meijer, Oct 16 2009
Partial sums of A059270. - J. M. Bergot, Jun 27 2013
Using the integers, triangular numbers, and squares plot the points (A001477(n),A001477(n+1)), (A000217(n), A000217(n+1)), and (A000290(n),A000290(n+1)) to create the vertices of a triangle. One-half the area of this triangle = a(n). - J. M. Bergot, Aug 01 2013
a(n) is the Wiener index of the triangular graph T(n+1). - Emeric Deutsch, Aug 26 2013

Examples

			From _Bruno Berselli_, Aug 29 2014: (Start)
After the zeros, the sequence is provided by the row sums of the triangle:
   3;
   4, 14;
   5, 16, 39;
   6, 18, 42,  84;
   7, 20, 45,  88, 155;
   8, 22, 48,  92, 160, 258;
   9, 24, 51,  96, 165, 264, 399;
  10, 26, 54, 100, 170, 270, 406, 584;
  11, 28, 57, 104, 175, 276, 413, 592, 819;
  12, 30, 60, 108, 180, 282, 420, 600, 828, 1110; etc.,
where T(r,c) = c*(c^2+r+1), with r = row index, c = column index, r >= c > 0. (End)
		

References

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

Crossrefs

Programs

  • Magma
    [n^2*(n^2-1)/4: n in [0..40]]; // Vincenzo Librandi, Sep 14 2011
    
  • Maple
    A006011 := proc(n)
        n^2*(n^2-1)/4 ;
    end proc: # R. J. Mathar, Nov 29 2015
  • Mathematica
    Table[n^2 (n^2 - 1)/4, {n, 0, 38}]
    Binomial[Range[20]^2, 2]/2 (* Eric W. Weisstein, Sep 08 2017 *)
    LinearRecurrence[{5, -10, 10, -5, 1}, {0, 3, 18, 60, 150}, 20] (* Eric W. Weisstein, Sep 08 2017 *)
    CoefficientList[Series[-3 x (1 + x)/(-1 + x)^5, {x, 0, 20}], x] (* Eric W. Weisstein, Sep 08 2017 *)
    Join[{0},Times@@@Partition[Accumulate[Range[0,40]],2,1]] (* Harvey P. Dale, Aug 08 2025 *)
  • PARI
    a(n)=binomial(n^2,2)/2 \\ Charles R Greathouse IV, Jun 27 2013

Formula

G.f.: 3*(1 + x) / (1 - x)^5.
a(n) = (n-1)*n/2 * n*(n+1)/2 = A000217(n-1)*A000217(n) = 1/2*(n^2-1)*n^2/2 = 1/2*A000217(n^2-1). - Alexander Adamchuk, Apr 13 2006
a(n) = 3*A002415(n) = A047928(n-1)/4 = A083374(n-1)/2 = A008911(n)*3/2. - Zerinvary Lajos, May 09 2007
a(n) = (A126274(n) - A000537(n+1))/2. - Enrique Pérez Herrero, Mar 11 2013
Ceiling(sqrt(a(n)) + sqrt(a(n-1)))/2 = A000217(n). - Richard R. Forberg, Aug 14 2013
a(n) = Sum_{i=1..n-1} i*(i^2+n) for n > 1 (see Example section). - Bruno Berselli, Aug 29 2014
Sum_{n>=2} 1/a(n) = 7 - 2*Pi^2/3 = 0.42026373260709425411... . - Vaclav Kotesovec, Apr 27 2016
a(n) = A000217(n^2+n) - A000217(n)*A000217(n+1). - Charlie Marion, Feb 15 2020
Sum_{n>=2} (-1)^n/a(n) = Pi^2/3 - 3. - Amiram Eldar, Nov 02 2021
E.g.f.: exp(x)*x^2*(6 + 6*x + x^2)/4. - Stefano Spezia, Mar 12 2024

A055112 a(n) = n*(n+1)*(2*n+1).

Original entry on oeis.org

0, 6, 30, 84, 180, 330, 546, 840, 1224, 1710, 2310, 3036, 3900, 4914, 6090, 7440, 8976, 10710, 12654, 14820, 17220, 19866, 22770, 25944, 29400, 33150, 37206, 41580, 46284, 51330, 56730, 62496, 68640, 75174, 82110, 89460, 97236, 105450
Offset: 0

Views

Author

Henry Bottomley, Jun 15 2000

Keywords

Comments

Original name: Areas of Pythagorean triangles (X, Y, Z = Y + 1) with X^2 + Y^2 = Z^2.
a(n) is the set of possible y values for 4*x^3 + x^2 = y^2 with the x values being A002378(n). - Gary Detlefs, Feb 22 2010
This sequence is related to A028896 by a(n) = n*A028896(n) - Sum_{i = 0..n-1} A028896(i) and this is the case d = 3 in the identity n*(d*(d+1)*n*(n+1)/4) - Sum_{i = 0..n-1} d*(d+1)*i*(i+1)/4 = d*(d+1)*n*(n+1)*(2*n+1)/12. - Bruno Berselli, Mar 31 2012
Also sums of rows of natural numbers (cf. A001477) seen as triangle with an odd numbers of terms per row, see example. - Reinhard Zumkeller, Jan 24 2013
Without mentioning the connection to Pythagorean triangles, Bolker (1967) gives it as an exercise to prove that these numbers are always divisible by 6. This is easy to prove from the formula that he gives, n(n - 1)(2n - 1): obviously either n or (n - 1) must be even; then, if n is congruent to 2 mod 3 it means that (2n - 1) is a multiple of 3, otherwise either n or (n - 1) is a multiple of 3; thus both prime divisors of 6 are accounted for in a(n). - Alonso del Arte, Oct 13 2013
a(n) = n*(n+1)*(n+(n+1)) is the product of two consecutive integers multiplied by the sum of those two consecutive integers. - Charles Kusniec, Sep 04 2022

Examples

			.  n   A001477(n) as triangle with row lengths = 2*n+1   Row sums = a(n)
.  0                         0                                  0
.  1                      1  2  3                               6
.  2                   4  5  6  7  8                           30
.  3                9 10 11 12 13 14 15                        84
.  4            16 17 18 19 20 21 22 23 24                    180
.  5         25 26 27 28 29 30 31 32 33 34 35                 330
.  6      36 37 38 39 40 41 42 43 44 45 46 47 48              546
.  7   49 50 51 52 53 54 55 56 57 58 59 60 61 62 63           840 .
- _Reinhard Zumkeller_, Jan 24 2013
		

References

  • Ethan D. Bolker, Elementary Number Theory: An Algebraic Approach. Mineola, New York: Dover Publications (1969, reprinted 2007): p. 7, Problem 6.5.

Crossrefs

Cf. A005408 (X values), A046092 (Y values), A001844 (Z values), A002939 (perimeter), A033581.
Similar sequences are listed in A316224.

Programs

Formula

a(n) = n*(n+1)*(2*n+1).
G.f.: 6*x*(1+x)/(1-x)^4. - Bruno Berselli, Mar 31 2012
From Benoit Cloitre, Apr 30 2002: (Start)
a(n) = 6*A000330(n) = A007531(2*n)/4 = 3*A000292(2*n-1)/2 = A005408(n)*A046092(n)/2 = A005408(n)*(A001844(n)-1)/2.
Sum_{n > 0} 1/a(n) = 3 - 4*log(2). (End)
a(n) = Sum_{i = 1..n} A033581(i). - Jonathan Vos Post, Mar 15 2006
a(n) = A000217(2*n)*A000217(2*n+1)/(2*n+1). - Charlie Marion, Feb 17 2012
a(n) = Sum_{i = 1..2*n + 1} (n^2 + (i-1)). - Charlie Marion, Sep 14 2012
Sum_{n >= 1} (-1)^(n+1)/a(n) = Pi - 3, due to Nilakantha, circa 1500. See Roy p. 304. - Peter Bala, Feb 19 2015
a(n) = A002378(n) * (2n+1). - Bruce J. Nicholson, Aug 31 2017
a(n) = Sum_{k=n^2..(n+1)^2-1} k. - Darío Clavijo, Jan 31 2025
E.g.f.: exp(x)*x*(6 + 9*x + 2*x^2). - Stefano Spezia, Feb 02 2025
a(n) = A005898(n) - A005408(n) = A083374(n+1) - A083374(n). - J.S. Seneschal, Jul 08 2025

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

Original entry on oeis.org

0, 12, 72, 240, 600, 1260, 2352, 4032, 6480, 9900, 14520, 20592, 28392, 38220, 50400, 65280, 83232, 104652, 129960, 159600, 194040, 233772, 279312, 331200, 390000, 456300, 530712, 613872, 706440, 809100, 922560, 1047552, 1184832
Offset: 2

Views

Author

Keywords

Crossrefs

Programs

Formula

a(n) = A002378(n)*A002378(n+1). - Zerinvary Lajos, Apr 11 2006
a(n) = 12*A002415(n+1) = 2*A083374(n) = 4*A006011(n+1) = 6*A008911(n+1). - Zerinvary Lajos, May 09 2007
a(n) = floor((n-1)^6/((n-1)^2+1)). - Gary Detlefs, Feb 11 2010
From Amiram Eldar, Nov 05 2020: (Start)
Sum_{n>=3} 1/a(n) = 7/4 - Pi^2/6.
Sum_{n>=3} (-1)^(n+1)/a(n) = Pi^2/12 - 3/4. (End)
G.f.: -12*x*(1+x)/(-1+x)^5. - Harvey P. Dale, Jul 31 2021
a(n) = (n-1)^4 - (n-1)^2. - Katherine E. Stange, Mar 31 2022

A227327 Number of non-equivalent ways to choose two points in an equilateral triangle grid of side n.

Original entry on oeis.org

0, 1, 4, 10, 22, 41, 72, 116, 180, 265, 380, 526, 714, 945, 1232, 1576, 1992, 2481, 3060, 3730, 4510, 5401, 6424, 7580, 8892, 10361, 12012, 13846, 15890, 18145, 20640, 23376, 26384, 29665, 33252, 37146, 41382, 45961, 50920, 56260, 62020, 68201, 74844
Offset: 1

Views

Author

Heinrich Ludwig, Jul 07 2013

Keywords

Comments

The sequence is an alternating composition of A178073 and A071244: a(n) = 2*A071244((n+1)/2) if n is odd, otherwise a(n) = A178073(n/2).

Examples

			for n = 3 there are the following 4 choices of 2 points (X) (rotations and reflections being ignored):
     X         X         X         .
    X .       . .       . .       X X
   . . .     X . .     . X .     . . .
		

Crossrefs

Corresponding questions about the number of ways in a square grid are treated by A083374 (2 points) and A178208 (3 points).

Programs

  • Mathematica
    Table[b = n^4 + 2*n^3 + 8*n^2; If[EvenQ[n], c = b - 8*n, c = b - 2*n - 9]; c/48, {n, 43}] (* T. D. Noe, Jul 09 2013 *)
    CoefficientList[Series[-x (x^3 - x^2 + x + 1) / ((x - 1)^5  (x + 1)^2), {x, 0, 50}], x] (* Vincenzo Librandi, Aug 02 2013 *)
    LinearRecurrence[{3,-1,-5,5,1,-3,1},{0,1,4,10,22,41,72},50] (* Harvey P. Dale, May 11 2019 *)

Formula

a(n) = (n^4 + 2*n^3 + 8*n^2 - 8*n )/48; if n even.
a(n) = (n^4 + 2*n^3 + 8*n^2 - 2*n - 9)/48; if n odd.
G.f.: -x^2*(x^3-x^2+x+1) / ((x-1)^5*(x+1)^2). - Colin Barker, Jul 12 2013

A008911 a(n) = n^2*(n^2 - 1)/6.

Original entry on oeis.org

0, 0, 2, 12, 40, 100, 210, 392, 672, 1080, 1650, 2420, 3432, 4732, 6370, 8400, 10880, 13872, 17442, 21660, 26600, 32340, 38962, 46552, 55200, 65000, 76050, 88452, 102312, 117740, 134850, 153760, 174592, 197472, 222530, 249900, 279720, 312132
Offset: 0

Views

Author

Keywords

Comments

Number of equilateral triangles in rhombic portion of side n+1 in hexagonal lattice.
The hexagonal lattice is the familiar 2-dimensional lattice in which each point has 6 neighbors. This is sometimes called the triangular lattice.
Sum of squared distances on n X n board between n queens each on its own row and column. - Zak Seidov, Sep 04 2002
For queens "each on its column and row" the sum of squared distances does not depend on configuration - while sum of distances does.
Number of cycles of length 3 in the bishop's graph associated with an (n+1) X (n+1) chessboard. - Anton Voropaev (anton.n.voropaev(AT)gmail.com), Feb 01 2009
a(n) is number of ways to place 3 queens on an (n+1) X (n+1) chessboard so that they diagonally attack each other exactly 3 times. The maximal possible attack number, p=binomial(k,2)=3 for k=3 queens, is achievable only when all queens are on the same diagonal. In graph-theory representation they thus form the corresponding complete graph. - Antal Pinter, Dec 27 2015
From a(1), convolution of the oblong numbers (A002378) with the odd numbers (A005408). - Bruno Berselli, Oct 24 2016
Consider the partitions of 2n into two parts (p,q) where p <= q. Then a(n) is the total volume of the family of rectangular prisms with dimensions p, p and |q-p|. - Wesley Ivan Hurt, Apr 15 2018

Examples

			a(2)=2 because on 2 X 2 board queens "each on its column and row" may take only two angular cells, then squared distance is 1^2+1^2=2. a(3)=12 because on 3 X 3 board queens "each on its column and row" make only two essentially distinct configurations: {1,2,3}, {1,3,2} and in both cases the sum of three squared distances is 12.
G.f.: 2*x^2 + 12*x^3 + 40*x^4 + 100*x^5 + 210*x^6 + 392*x^7 + 672*x^8 + ...
		

References

  • James Propp, Enumeration of matchings: problems and progress, pp. 255-291 in L. J. Billera et al., eds, New Perspectives in Algebraic Combinatorics, Cambridge, 1999 (see Problem 6).

Crossrefs

Convolution of the oblong numbers with the even numbers: A033488.

Programs

  • GAP
    List([0..40], n-> n^2*(n^2-1)/6); # G. C. Greubel, Sep 13 2019
  • Magma
    [n^2*(n^2-1)/6: n in [0..40]]; // Vincenzo Librandi, Sep 14 2011
    
  • Maple
    A008911 := n->n^2*(n^2-1)/6; seq(A008911(n), n=0..40);
  • Mathematica
    a[m_]:= m^2(m^2-1)/6;
    Binomial[Range[0,40]^2, 2]/3 (* G. C. Greubel, Sep 13 2019 *)
  • PARI
    {a(n) = n^2*(n^2-1)/6};
    
  • Sage
    [n^2*(n^2-1)/6 for n in (0..40)] # G. C. Greubel, Sep 13 2019
    

Formula

G.f.: 2*x^2*(1+x)/(1-x)^5.
a(n) = 2*A002415(n) = A047928(n-1)/6 = A083374(n-1)/3 = A006011(n)*2/3. - Zerinvary Lajos, May 09 2007
a(n) = n*binomial(n+1,3). - Martin Renner, Apr 03 2011
a(n+1) = (n+1)*A000292(n). - Tom Copeland, Sep 13 2011
From G. C. Greubel, Sep 13 2019: (Start)
a(n) = binomial(n^2,2)/3.
E.g.f.: x^2*(6 + 6*x + x^2)*exp(x)/6. (End)
From Amiram Eldar, Nov 02 2021: (Start)
Sum_{n>=2} 1/a(n) = 21/2 - Pi^2.
Sum_{n>=2} (-1)^n/a(n) = (Pi^2 - 9)/2. (End)
a(n) = Sum_{j=0..n-1} binomial(n,2) + binomial(n,3). - Detlef Meya, Jan 20 2024

A293500 Number of orientable strings of length n using a maximum of k colors, array read by descending antidiagonals, T(n,k) for n >= 1 and k >= 1.

Original entry on oeis.org

0, 0, 0, 0, 1, 0, 0, 3, 2, 0, 0, 6, 9, 6, 0, 0, 10, 24, 36, 12, 0, 0, 15, 50, 120, 108, 28, 0, 0, 21, 90, 300, 480, 351, 56, 0, 0, 28, 147, 630, 1500, 2016, 1053, 120, 0, 0, 36, 224, 1176, 3780, 7750, 8064, 3240, 240, 0, 0, 45, 324, 2016, 8232, 23220, 38750, 32640, 9720, 496, 0
Offset: 1

Views

Author

Andrew Howroyd, Oct 10 2017

Keywords

Comments

Reversing the string does not leave it unchanged. Only one string from each pair is counted.
Equivalently, the number of nonequivalent strings up to reversal that are not palindromes.
Except for the first term, column k is the "BHK" (reversible, identity, unlabeled) transform of k,0,0,0,... [Corrected by Petros Hadjicostas, Jul 01 2018]
From Petros Hadjicostas, Jul 01 2018: (Start)
Consider the input sequence (c_k(n): n >= 1) with g.f. C_k(x) = Sum_{n>=1} c_k(n)*x^n. Let a_k(n) = BHK(c_k(n): n >= 1) be the output sequence under Bower's BHK transform. It can be proved that the g.f. of BHK(c_k(n): n >= 1) is A_k(x) = (C_k(x)^2 - C_k(x^2))/(2*(1-C_k(x))*(1-C_k(x^2))) + C_k(x). (See the comments for sequences A032096, A032097, and A032098.)
For column k of this two-dimensional array, the input sequence is defined by c_k(1) = k and c_k(n) = 0 for n >= 1. Thus, C_k(x) = k*x, and hence the g.f. of column k (with the term C_k(x) = k*x excluded) is (C_k(x)^2 - C_k(x^2))/(2*(1-C_k(x))*(1-C_k(x^2))) = (1/2)*(k - 1)*k*x^2/((k*x^2 - 1)*(k*x - 1)), from which we can easily prove Howroyd's formula.
(End)
Comment from Bahman Ahmadi, Aug 05 2019: (Start)
We give an alternative definition for the square array A(n,k) = T(n,k) with n >= 2 and k >= 0. A(n,k) is the number of inequivalent "distinguishing colorings" of the path on n vertices using at most k colors. The rows are indexed by n, the number of vertices of the path, and the columns are indexed by k, the number of permissible colors.
A vertex-coloring of a graph G is called "distinguishing" if it is only preserved by the identity automorphism of G. This notion is considered in the context of "symmetry breaking" of simple (finite or infinite) graphs. Two vertex-colorings of a graph are called "equivalent" if there is an automorphism of the graph which preserves the colors of the vertices. Given a graph G, we use the notation Phi_k(G) to denote the number of inequivalent distinguishing colorings of G with at most k colors. This sequence gives A(n,k) = Phi_k(P_n), i.e., the number of inequivalent distinguishing colorings of the path P_n on n vertices with at most k colors.
For n=3, we can color the vertices of P_3 with at most 2 colors in 3 ways such that all the colorings distinguish the graph (i.e., no non-identity automorphism of the path P_3 preserves the coloring) and that all the three colorings are inequivalent.
We have Phi_k(P_n) = binomial(k,2)*k^(n-2) + k*Phi_k(P_(n-2)) for n >= 4; Phi_k(P_2) = binomial(k,2); Phi_k(P_3) = k*binomial(k,2).
(End)

Examples

			Array begins:
======================================================
n\k| 1   2    3     4      5      6       7       8
---|--------------------------------------------------
1  | 0   0    0     0      0      0       0       0...
2  | 0   1    3     6     10     15      21      28...
3  | 0   2    9    24     50     90     147     224...
4  | 0   6   36   120    300    630    1176    2016...
5  | 0  12  108   480   1500   3780    8232   16128...
6  | 0  28  351  2016   7750  23220   58653  130816...
7  | 0  56 1053  8064  38750 139320  410571 1046528...
8  | 0 120 3240 32640 195000 839160 2881200 8386560...
...
For T(4,2)=6, the chiral pairs are AAAB-BAAA, AABA-ABAA, AABB-BBAA, ABAB-BABA, ABBB-BBBA, and BABB-BBAB.
		

Crossrefs

Columns 2-5 for n > 1 are A032085, A032086, A032087, A032088.
Column 6 is A320524.
Rows 2-6 are A161680, A006002(n-1), A083374, A321672, A085744.
Cf. A003992 (oriented), A277504 (unoriented), A321391 (achiral).

Programs

  • Mathematica
    Table[Function[n, (k^n - k^(Ceiling[n/2]))/2][m - k + 1], {m, 11}, {k, m, 1, -1}] // Flatten (* Michael De Vlieger, Oct 11 2017 *)
  • PARI
    T(n,k) = (k^n - k^(ceil(n/2)))/2;

Formula

T(n,k) = (k^n - k^(ceiling(n/2)))/2.
G.f. for column k: (1/2)*(k - 1)*k*x^2/((k*x^2 - 1)*(k*x - 1)). - Petros Hadjicostas, Jul 07 2018
From Robert A. Russell, Nov 16 2018: (Start)
T(n,k) = (A003992(k,n) - A321391(n,k)) / 2.
T(n,k) = = A003992(k,n) - A277504(n,k) = A277504(n,k) - A321391(n,k).
G.f. for row n: (Sum_{j=0..n} S2(n,j)*j!*x^j/(1-x)^(j+1) - Sum_{j=0..ceiling(n/2)} S2(ceiling(n/2),j)*j!*x^j/(1-x)^(j+1)) / 2, where S2 is the Stirling subset number A008277.
G.f. for row n>1: x * Sum_{k=1..n-1} A145883(n,k) * x^k / (1-x)^(n+1).
E.g.f. for row n: (Sum_{k=0..n} S2(n,k)*x^k - Sum_{k=0..ceiling(n/2)} S2(ceiling(n/2),k)*x^k) * exp(x) / 2, where S2 is the Stirling subset number A008277.
T(0,k) = T(1,k) = 0; T(2,k) = binomial(k,2); for n>2, T(n,k) = k*(T(n-3,k)+T(n-2,k)-k*T(n-1,k)).
For k>n, T(n,k) = Sum_{j=1..n+1} -binomial(j-n-2,j) * T(n,k-j). (End)

A279445 Triangle read by rows: T(n, k) is the number of ways to place k points on an n X n square grid so that no more than 2 points are on a vertical or horizontal straight line.

Original entry on oeis.org

1, 1, 1, 4, 6, 4, 1, 1, 9, 36, 78, 90, 45, 6, 1, 16, 120, 528, 1428, 2304, 2040, 816, 90, 1, 25, 300, 2200, 10600, 34020, 71400, 93000, 67950, 22650, 2040, 1, 36, 630, 6900, 51525, 270720, 1005720, 2602800, 4531950, 4987800, 3110940, 888840, 67950, 1, 49, 1176, 17934
Offset: 1

Views

Author

Heinrich Ludwig, Dec 17 2016

Keywords

Comments

Length of n-th row is A272651(n) + 1, where A272651(n) is the maximal number of points to be placed under the condition mentioned.
Rotations and reflections of placements are counted. If they are to be ignored, see A279453.
For condition "no more than 2 points on a straight line at any angle", see A194193 (but that one is read by antidiagonals).

Examples

			The table begins with T(1, 0):
1  1
1  4   6    4     1
1  9  36   78    90    45     6
1 16 120  528  1428  2304  2040   816    90
1 25 300 2200 10600 34020 71400 93000 67950 22650 2040
...
T(3, 2) = 36 because there are 36 ways to place 2 points on a 3 X 3 square grid so that no more than 2 points are on a vertical or horizontal straight line.
		

Crossrefs

Row sums give A197458.
Diagonal T(n, n) is A279444.
Showing 1-10 of 39 results. Next