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.

Previous Showing 11-20 of 59 results. Next

A159797 Triangle read by rows in which row n lists n+1 terms, starting with n, such that the difference between successive terms is equal to n-1.

Original entry on oeis.org

0, 1, 1, 2, 3, 4, 3, 5, 7, 9, 4, 7, 10, 13, 16, 5, 9, 13, 17, 21, 25, 6, 11, 16, 21, 26, 31, 36, 7, 13, 19, 25, 31, 37, 43, 49, 8, 15, 22, 29, 36, 43, 50, 57, 64, 9, 17, 25, 33, 41, 49, 57, 65, 73, 81, 10, 19, 28, 37, 46, 55, 64, 73, 82, 91, 100, 11, 21, 31, 41, 51, 61, 71, 81, 91, 101
Offset: 0

Views

Author

Omar E. Pol, Jul 09 2009

Keywords

Comments

Note that the last term of the n-th row is the n-th square A000290(n).
See also A162611, A162614 and A162622.
The triangle sums, see A180662 for their definitions, link the triangle A159797 with eleven sequences, see the crossrefs. - Johannes W. Meijer, May 20 2011
T(n,k) is the number of distinct sums in the direct sum of {1, 2, ... n} with itself k times for 1 <= k <= n+1, e.g., T(5,3) = the number of distinct sums in the direct sum {1,2,3,4,5} + {1,2,3,4,5} + {1,2,3,4,5}. The sums range from 1+1+1=3 to 5+5+5=15. So there are 13 distinct sums. - Derek Orr, Nov 26 2014

Examples

			Triangle begins:
0;
1, 1;
2, 3, 4;
3, 5, 7, 9;
4, 7,10,13,16;
5, 9,13,17,21,25;
6,11,16,21,26,31,36;
		

Crossrefs

Cf.: A006002 (row sums). - R. J. Mathar, Jul 17 2009
Cf. A163282, A163283, A163284, A163285. - Omar E. Pol, Nov 18 2009
From Johannes W. Meijer, May 20 2011: (Start)
Triangle sums (see the comments): A006002 (Row1), A050187 (Row2), A058187 (Related to Kn11, Kn12, Kn13, Fi1 and Ze1), A006918 (Related to Kn21, Kn22, Kn23, Fi2 and Ze2), A000330 (Kn3), A016061 (Kn4), A190717 (Related to Ca1 and Ze3), A144677 (Related to Ca2 and Ze4), A000292 (Related to Ca3, Ca4, Gi3 and Gi4) A190718 (Related to Gi1) and A144678 (Related to Gi2). (End)

Programs

Formula

Given m = floor( (sqrt(8*n+1)-1)/2 ), then a(n) = m + (n - m*(m+1)/2)*(m-1). - Carl R. White, Jul 24 2010

Extensions

Edited by Omar E. Pol, Jul 18 2009
More terms from Omar E. Pol, Nov 18 2009
More terms from Carl R. White, Jul 24 2010

A029618 Numbers in (3,2)-Pascal triangle (by row).

Original entry on oeis.org

1, 3, 2, 3, 5, 2, 3, 8, 7, 2, 3, 11, 15, 9, 2, 3, 14, 26, 24, 11, 2, 3, 17, 40, 50, 35, 13, 2, 3, 20, 57, 90, 85, 48, 15, 2, 3, 23, 77, 147, 175, 133, 63, 17, 2, 3, 26, 100, 224, 322, 308, 196, 80, 19, 2, 3, 29, 126, 324, 546, 630, 504, 276, 99, 21, 2, 3, 32, 155, 450, 870
Offset: 0

Views

Author

Keywords

Comments

Reverse of A029600. - Philippe Deléham, Nov 21 2006
Triangle T(n,k), read by rows, given by (3,-2,0,0,0,0,0,0,0,...) DELTA (2,-1,0,0,0,0,0,0,0,...) where DELTA is the operator defined in A084938. - Philippe Deléham, Oct 10 2011
Row n: expansion of (3+2x)*(1+x)^(n-1), n>0. - Philippe Deléham, Oct 10 2011
For a closed-form formula for generalized Pascal's triangle see A228576. - Boris Putievskiy, Sep 04 2013

Examples

			Triangle begins as:
  1;
  3,  2;
  3,  5,  2;
  3,  8,  7,  2;
  3, 11, 15,  9,  2;
  ...
		

Crossrefs

Cf. A007318, A029600, A084938, A228196, A228576, A016789 (2nd column), A005449 (3rd column), A006002 (4th column).

Programs

  • GAP
    T:= function(n,k)
        if n=0 and k=0 then return 1;
        elif k=0 then return 3;
        elif k=n then return 2;
        else return T(n-1,k-1) + T(n-1,k);
        fi;
      end;
    Flat(List([0..12], n-> List([0..n], k-> T(n,k) ))); # G. C. Greubel, Nov 12 2019
  • Maple
    A029618 := proc(n,k)
        if k < 0 or k > n then
            0;
        elif  n = 0 then
            1;
        elif k=0 then
            3;
        elif k = n then
            2;
        else
            procname(n-1,k-1)+procname(n-1,k) ;
        end if;
    end proc: # R. J. Mathar, Jul 08 2015
  • Mathematica
    T[n_, k_]:= T[n, k]= If[n==0 && k==0, 1, If[k==0, 3, If[k==n, 2, T[n-1, k-1] + T[n-1, k] ]]]; Table[T[n, k], {n, 0, 12}, {k, 0, n}]//Flatten (* G. C. Greubel, Nov 13 2019 *)
  • PARI
    T(n,k) = if(n==0 && k==0, 1, if(k==0, 3, if(k==n, 2, T(n-1, k-1) + T(n-1, k) ))); \\ G. C. Greubel, Nov 12 2019
    
  • Sage
    @CachedFunction
    def T(n, k):
        if (n==0 and k==0): return 1
        elif (k==0): return 3
        elif (k==n): return 2
        else: return T(n-1,k-1) + T(n-1, k)
    [[T(n, k) for k in (0..n)] for n in (0..12)] # G. C. Greubel, Nov 12 2019
    

Formula

T(n,k) = T(n-1,k-1) + T(n-1,k) with T(0,0)=1, T(n,0)=3, T(n,n)=2; n, k > 0. - Boris Putievskiy, Sep 04 2013
G.f.: (-1-x*y-2*x)/(-1+x*y+x). - R. J. Mathar, Aug 11 2015

A064808 a(n) is the (n+1)st (n+2)-gonal number.

Original entry on oeis.org

1, 3, 9, 22, 45, 81, 133, 204, 297, 415, 561, 738, 949, 1197, 1485, 1816, 2193, 2619, 3097, 3630, 4221, 4873, 5589, 6372, 7225, 8151, 9153, 10234, 11397, 12645, 13981, 15408, 16929, 18547, 20265, 22086, 24013, 26049, 28197, 30460, 32841, 35343, 37969, 40722
Offset: 0

Views

Author

Floor van Lamoen, Oct 22 2001

Keywords

Comments

Sum of n terms of the arithmetic progression with first term 1 and common difference n-1. - Amarnath Murthy, Aug 04 2005
a(n) is the sum of (n+1)-th row terms of triangle A144693. - Gary W. Adamson, Sep 19 2008
See also A131685(k) = smallest positive number m such that c(i) = m*(i^1 + 1)*(i^2 + 2)* ... *(i^k+ k) / k! takes integral values for all i>=0: For k=2, A131685(k)=1, which implies that this is a well-defined integer sequence. - Alexander R. Povolotsky, Apr 24 2015

Crossrefs

Main diagonal of A057145.
Row sums of A076110.
Cf. A144693. - Gary W. Adamson, Sep 19 2008

Programs

Formula

a(n) = (n+1)*(n^2 + 2)/2.
From Paul Barry, Nov 18 2005: (Start)
a(n) = Sum_{k=0..n} Sum_{j=0..n} (k-(k-1)*C(0, j-k)).
a(n) = A006002(n) - A000096(n-2). (End)
G.f.: (1 - x + 3x^2)/(1 - x)^4. - R. J. Mathar, Jul 07 2009
a(n) = A006003(n+1) - A002378(n). - Rick L. Shepherd, Feb 21 2015
a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4). - Wesley Ivan Hurt, Feb 21 2015
a(n) = A057145(n+2,n+1). - R. J. Mathar, Jul 28 2016

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

Original entry on oeis.org

0, 2, 18, 72, 200, 450, 882, 1568, 2592, 4050, 6050, 8712, 12168, 16562, 22050, 28800, 36992, 46818, 58482, 72200, 88200, 106722, 128018, 152352, 180000, 211250, 246402, 285768, 329672, 378450, 432450, 492032, 557568, 629442, 708050, 793800, 887112, 988418
Offset: 0

Views

Author

Omar E. Pol, Jul 24 2009

Keywords

Comments

Row sums of triangle A163282.
Also, the number of nonattacking placements of 2 rooks on an (n+1) X (n+1) board. - Thomas Zaslavsky, Jun 26 2010
If P_{k}(n) is the n-th k-gonal number, then a(n) = P_{s}(n+1)*P_{t}(n+1) - P_{s+1}(n+1)*P_{t-1}(n+1) for s=t+1. - Bruno Berselli, Sep 05 2014
Subsequence of A000982, see formula. - David James Sycamore, Jul 31 2018
Number of edges in the (n+1) X (n+1) rook complement graph. - Freddy Barrera, May 02 2019
Number of paths from (0,0) to (n+2,n+2) consisting of exactly three forward horizontal steps and three upward vertical steps. - Greg Dresden and Snezhana Tuneska, Aug 24 2023

References

  • Seth Chaiken, Christopher R. H. Hanusa, and Thomas Zaslavsky, A q-queens problem, in preparation. - Thomas Zaslavsky, Jun 26 2010

Crossrefs

Programs

Formula

a(n) = 2*A000537(n) = A035287(n+1)/2. - Omar E. Pol, Nov 29 2011
G.f.: 2*x*(1+4*x+x^2)/(1-x)^5. - R. J. Mathar, Nov 30 2011
Let t(n) = A000217(n). Then a(n) = (t(n-1)*(t(n)+t(n+1)) + t(n)*(t(n-1)+t(n+1)) + t(n+1)*(t(n-1)+t(n)))/3. - J. M. Bergot, Jun 21 2012
a(n) = A000982(n*(n+1)). - David James Sycamore, Jul 31 2018
From Amiram Eldar, Nov 02 2021: (Start)
Sum_{n>=1} 1/a(n) = 2*Pi^2/3 - 6.
Sum_{n>=1} (-1)^(n+1)/a(n) = 6 - 8*log(2). (End)
Another identity: ..., a(4) = 200 = 1*(2+4+6+8) + 3*(4+6+8) + 5*(6+8) + 7*(8), a(5) = 450 = 1*(2+4+6+8+10) + 3*(4+6+8+10) + 5*(6+8+10) + 7*(8+10) + 9*(10) = 30+84+120+126+90, and so on. - J. M. Bergot, Aug 25 2022
From Elmo R. Oliveira, Aug 14 2025: (Start)
E.g.f.: x*(2 + x)*(2 + 6*x + x^2)*exp(x)/2.
a(n) = 5*a(n-1) - 10*a(n-2) + 10*a(n-3) - 5*a(n-4) + a(n-5).
a(n) = A254371(n)/4 = A060300(n)/8. (End)

A035006 Number of possible rook moves on an n X n chessboard.

Original entry on oeis.org

0, 8, 36, 96, 200, 360, 588, 896, 1296, 1800, 2420, 3168, 4056, 5096, 6300, 7680, 9248, 11016, 12996, 15200, 17640, 20328, 23276, 26496, 30000, 33800, 37908, 42336, 47096, 52200, 57660, 63488, 69696, 76296, 83300, 90720, 98568, 106856
Offset: 1

Views

Author

Ulrich Schimke (ulrschimke(AT)aol.com)

Keywords

Comments

Obviously A035005(n) = A002492(n-1) + a(n) since Queen = Bishop + Rook. - Johannes W. Meijer, Feb 04 2010
X values of solutions of the equation: (X-Y)^3-2*X*Y=0. Y values are b(n)=2*n*(n-1)^2 (see A181617). - Mohamed Bouhamida, Jul 06 2023

Examples

			On a 3 X 3-board, rook has 9*4 moves, so a(3)=36.
		

References

  • E. Bonsdorff, K. Fabel and O. Riihimaa, Schach und Zahl (Chess and numbers), Walter Rau Verlag, Dusseldorf, 1966.

Crossrefs

Cf. A033586 (King), A035005 (Queen), A035008 (Knight), A002492 (Bishop) and A049450 (Pawn).

Programs

  • Magma
    [(n-1)*2*n^2: n in [1..40]]; // Vincenzo Librandi, Jun 16 2011
  • Mathematica
    Table[(n-1) 2 n^2,{n,40}] (* or *) LinearRecurrence[{4,-6,4,-1},{0,8,36,96},40] (* Harvey P. Dale, May 12 2012 *)

Formula

a(n) = (n-1)*2*n^2.
a(n) = Sum_{j=1..n} ((n+j-1)^2 - (n-j+1)^2). - Zerinvary Lajos, Sep 13 2006
1/a(n+1) = Integral_{x=1/(n+1)..1/n} x*h(x) = Integral_{x=1/(n+1)..1/n} x*(1/x - floor(1/x)) = 1/((2*(n^2+2*n+1))*n) and Sum_{n>=1} 1/((2*(n^2+2*n+1))*n) = 1-Zeta(2)/2 where h(x) is the Gauss (continued fraction) map h(x)={x^-1} and {x} is the fractional part of x. - Stephen Crowley, Jul 24 2009
a(n) = 4 * A006002(n-1). - Johannes W. Meijer, Feb 04 2010
G.f.: 4*x^2*(2+x)/(1-x)^4. - Colin Barker, Mar 11 2012
a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4); a(1)=0, a(2)=8, a(3)=36, a(4)=96. - Harvey P. Dale, May 12 2012
a(n) = A006566(n) - A006564(n). - Peter M. Chema, Feb 10 2016
E.g.f.: 2*exp(x)*x^2*(2 + x). - Stefano Spezia, May 10 2022
From Amiram Eldar, May 14 2022: (Start)
Sum_{n>=2} 1/a(n) = 1 - Pi^2/12.
Sum_{n>=2} (-1)^n/a(n) = Pi^2/24 + log(2) - 1. (End)

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)

A368517 Irregular triangular array T, read by rows: T(n,k) = number of sums |x-y|+|y-z| = k, where x,y,z are in {1,2,...,n} and x < y.

Original entry on oeis.org

1, 1, 2, 4, 2, 1, 3, 7, 7, 4, 2, 1, 4, 10, 12, 11, 6, 4, 2, 1, 5, 13, 17, 18, 15, 9, 6, 4, 2, 1, 6, 16, 22, 25, 24, 20, 12, 9, 6, 4, 2, 1, 7, 19, 27, 32, 33, 31, 25, 16, 12, 9, 6, 4, 2, 1, 8, 22, 32, 39, 42, 42, 38, 31, 20, 16, 12, 9, 6, 4, 2, 1, 9, 25, 37
Offset: 1

Views

Author

Clark Kimberling, Dec 31 2023

Keywords

Comments

Row n consists of 2n positive integers.

Examples

			First eight rows:
  1   1
  2   4   2   1
  3   7   7   4   2   1
  4  10  12  11   6   4   2   1
  5  13  17  18  15   9   6   4   2   1
  6  16  22  25  24  20  12   9   6   4   2  1
  7  19  27  32  33  31  25  16  12   9   6  4  2  1
  8  22  32  39  42  42  38  31  20  16  12  9  6  4  2  1
For n=3, there are 9 triples (x,y,z) having x < y:
  121:  |x-y| + |y-z| = 2
  122:  |x-y| + |y-z| = 1
  123:  |x-y| + |y-z| = 2
  131:  |x-y| + |y-z| = 4
  132:  |x-y| + |y-z| = 3
  133:  |x-y| + |y-z| = 2
  231:  |x-y| + |y-z| = 3
  232:  |x-y| + |y-z| = 2
  233:  |x-y| + |y-z| = 1,
so that row 2 of the array is (2,4,2,1), representing two 1s, four 2s, two 3s, and one 4.
		

Crossrefs

Cf. A006002 (row sums), A002620 (limiting reverse row), A368434, A368437, A368515, A368516, A368518, A368519, A368520, A368521, A368522.

Programs

  • Mathematica
    t1[n_] := t1[n] = Tuples[Range[n], 3];
    t[n_] := t[n] = Select[t1[n], #[[1]] < #[[2]] &];
    a[n_, k_] := Select[t[n], Abs[#[[1]] - #[[2]]] + Abs[#[[2]] - #[[3]]] == k &];
    u = Table[Length[a[n, k]], {n, 2, 15}, {k, 1, 2 n - 2}];
    v = Flatten[u]  (* sequence *)
    Column[Table[Length[a[n, k]], {n, 2, 15}, {k, 1, 2 n - 2}]]  (* array *)

A368519 Irregular triangular array T, read by rows: T(n,k) = number of sums |x-y|+|y-z| = k, where x,y,z are in {1,2,...,n} and x < z.

Original entry on oeis.org

2, 4, 3, 2, 6, 6, 8, 2, 2, 8, 9, 14, 9, 6, 2, 2, 10, 12, 20, 16, 16, 6, 6, 2, 2, 12, 15, 26, 23, 26, 17, 12, 6, 6, 2, 2, 14, 18, 32, 30, 36, 28, 26, 12, 12, 6, 6, 2, 2, 16, 21, 38, 37, 46, 39, 40, 27, 20, 12, 12, 6, 6, 2, 2, 18, 24, 44, 44, 56, 50, 54, 42
Offset: 1

Views

Author

Clark Kimberling, Jan 22 2024

Keywords

Comments

Row n consists of 2n-1 positive integers.

Examples

			First six rows:
   2
   4   3    2
   6   6    8   2   2
   8   9   14   9   6   2   2
   10  12  20  16  16   6   6  2  2
   12  15  26  23  26  17  12  6  6  2  2
For n=3, there are 9 triples (x,y,z) having x < z:
112:  |x-y| + |y-z| = 1
113:  |x-y| + |y-z| = 2
122:  |x-y| + |y-z| = 1
123:  |x-y| + |y-z| = 2
132:  |x-y| + |y-z| = 3
133:  |x-y| + |y-z| = 2
213:  |x-y| + |y-z| = 3
223:  |x-y| + |y-z| = 1
233:  |x-y| + |y-z| = 1,
so that row 1 of the array is (4,3,2), representing four 1s, three 2s, and two 3s.
		

Crossrefs

Cf. A006002 (row sums), A110660 (limiting reverse row), A368434, A368437, A368515, A368516, A368517, A368518, A368520, A368521, A368522.

Programs

  • Mathematica
    t1[n_] := t1[n] = Tuples[Range[n], 3];
    t[n_] := t[n] = Select[t1[n], #[[1]] < #[[3]] &];
    a[n_, k_] := Select[t[n], Abs[#[[1]] - #[[2]]] + Abs[#[[2]] - #[[3]]] == k &];
    u = Table[Length[a[n, k]], {n, 2, 15}, {k, 1, 2 n - 3}];
    v = Flatten[u];  (* sequence *)
    Column[Table[Length[a[n, k]], {n, 2, 15}, {k, 1, 2 n - 3}]]  (* array *)

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

Original entry on oeis.org

1, 7, 21, 46, 85, 141, 217, 316, 441, 595, 781, 1002, 1261, 1561, 1905, 2296, 2737, 3231, 3781, 4390, 5061, 5797, 6601, 7476, 8425, 9451, 10557, 11746, 13021, 14385, 15841, 17392, 19041, 20791, 22645, 24606, 26677, 28861, 31161, 33580, 36121, 38787, 41581
Offset: 1

Views

Author

Gary W. Adamson, Jan 26 2007

Keywords

Comments

Row sums of A127735.
Row sums of A162610. - Reinhard Zumkeller, Jan 19 2013
For n > 0, a(n) is the number of compositions of n+10 into n parts avoiding parts 2 and 3. - Milan Janjic, Jan 07 2016
Sum of the numbers in the top row and last column of an n X n square array whose elements are the numbers from 1..n^2, listed in increasing order by rows (see example). - Wesley Ivan Hurt, May 18 2021

Examples

			From _Wesley Ivan Hurt_, May 18 2021: (Start)
Add all the numbers in the top row and last column.
                                                      [1   2  3  4  5]
                                      [1   2  3  4]   [6   7  8  9 10]
                            [1 2 3]   [5   6  7  8]   [11 12 13 14 15]
                   [1 2]    [4 5 6]   [9  10 11 12]   [16 17 18 19 20]
           [1]     [3 4]    [7 8 9]   [13 14 15 16]   [21 22 23 24 25]
------------------------------------------------------------------------
  n         1        2         3            4                 5
------------------------------------------------------------------------
  a(n)      1        7        21           46                85
------------------------------------------------------------------------
(End)
		

Crossrefs

Programs

Formula

Row sums of triangle A131416. Also, binomial transform of [1, 6, 8, 3, 0, 0, 0, ...). - Gary W. Adamson, Oct 23 2007
a(n) = (n+1)*A000217(n) - n = A006002(n) - n. - R. J. Mathar, Jul 21 2009
From Colin Barker, Mar 12 2014: (Start)
a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4).
G.f.: -x*(x^2-3*x-1) / (x-1)^4. (End)
a(n) = A057145(n+5,n). - R. J. Mathar, Jul 28 2016

Extensions

More terms and new name from R. J. Mathar, Jul 21 2009

A090447 Triangle of partial products of binomials.

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 1, 3, 9, 9, 1, 4, 24, 96, 96, 1, 5, 50, 500, 2500, 2500, 1, 6, 90, 1800, 27000, 162000, 162000, 1, 7, 147, 5145, 180075, 3781575, 26471025, 26471025, 1, 8, 224, 12544, 878080, 49172480, 1376829440, 11014635520, 11014635520, 1, 9, 324
Offset: 0

Views

Author

Wolfdieter Lang, Dec 23 2003

Keywords

Examples

			[1]; [1,1]; [1,2,2]; [1,3,9,9]; ...
		

Crossrefs

Column sequences: A000027 (natural numbers), A006002, A090448-9.
Cf. A090450 (row sums), A090451 (alternating row sums).
Cf. A008949 (partial row sums in Pascal's triangle).

Programs

  • Mathematica
    a[n_, m_] := Product[Binomial[n, p], {p, 0, m}]; Table[a[n, m], {n, 0, 10}, {m, 0, n}] // Flatten (* Jean-François Alcover, Sep 01 2016 *)

Formula

a(n, m) = Product_{p=0..m} binomial(n, p), n>=m>=0, else 0. Partial row products in Pascal's triangle A007318.
a(n, m) = (Product_{p=0..m} fallfac(n, m-p))/superfac(m), n>=m>=0, else 0; with fallfac(n, m) := A008279(n, m) (falling factorials) and superfac(m) = A000178(m) (superfactorials).
a(n, m) = (Product_{p=0..m} (n-p)^(m-p))/superfac(m), n>=m>=0, with 0^0:=0, else 0.
Previous Showing 11-20 of 59 results. Next