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-9 of 9 results.

A154105 a(n) = 12*n^2 + 18*n + 7.

Original entry on oeis.org

7, 37, 91, 169, 271, 397, 547, 721, 919, 1141, 1387, 1657, 1951, 2269, 2611, 2977, 3367, 3781, 4219, 4681, 5167, 5677, 6211, 6769, 7351, 7957, 8587, 9241, 9919, 10621, 11347, 12097, 12871, 13669, 14491, 15337, 16207, 17101, 18019, 18961, 19927, 20917, 21931
Offset: 0

Views

Author

Klaus Brockhaus, Jan 04 2009

Keywords

Comments

a(n) is the number of partitions with three integral dissimilar components of the number 12(n+1), e.g for n=0, 12 may be partitioned in the 7 ways (1,2,9), (1,3,8), (1,4,7), (1,5,6), (2,3,7), (2,4,6) and (3,4,5). - Ian Duff, Jan 31 2010
Sequence found by reading the line from 7, in the direction 7, 37, ..., in the square spiral whose vertices are the generalized octagonal numbers A001082. - Omar E. Pol, May 08 2018

Examples

			a(2) = 12*2^2 + 18*2 + 7 = 91 = 6*14 + 7 = 6*A014106(2) + 7.
a(3) = a(2) + 24*3 + 6 = 91 + 72 + 6 = 169.
a(-4) = 12*4^2 - 18*4 + 7 = 127 = 2*64 - 1 = 2*A085473(3) - 1.
		

Crossrefs

Programs

Formula

G.f.: (7 + 16*x + x^2)/(1-x)^3.
a(n) = 6*A014106(n) + 7.
a(0) = 7; for n > 0, a(n) = a(n-1) + 24*n + 6.
a(-n-1) = 2*A085473(n) - 1. - Bruno Berselli, Sep 05 2011
E.g.f.: (7 + 30*x + 12*x^2)*exp(x). - G. C. Greubel, Sep 02 2016
a(n) = 1 + A152746(n+1). - Omar E. Pol, May 08 2018
a(n) = A003215(n) + 6*A000290(n+1) + 6*A000217(n). - Leo Tavares, Sep 12 2022

A213772 Principal diagonal of the convolution array A213771.

Original entry on oeis.org

1, 11, 42, 106, 215, 381, 616, 932, 1341, 1855, 2486, 3246, 4147, 5201, 6420, 7816, 9401, 11187, 13186, 15410, 17871, 20581, 23552, 26796, 30325, 34151, 38286, 42742, 47531, 52665, 58156, 64016, 70257, 76891, 83930, 91386, 99271, 107597, 116376, 125620, 135341
Offset: 1

Views

Author

Clark Kimberling, Jul 04 2012

Keywords

Comments

Zhu Shijie gives in his Magnus Opus "Jade Mirror of the Four Unknowns" the problem: "The total number of apples in a pile in the form of a cone is 932, and the number of layers is an odd number." Zhu Shijie assumed the rational sequence s(k) = (k*(k+1)*(2*k+1)+k+1)/8 for the total number of apples in k layers, with n = (k+1)/2 is the solution 932 = a((15+1)/2) with k = 15. Zhu Shijie gave the solution polynomial: "Let the element tian be the number of layers. From the statement we have 7455 for the negative shi, 2 for the positive fang, 3 for the positive first lian, and 2 for the positive yu." This translates into the polynomial equation: 2*x^3 + 3*x^2 + 2*x - 7455 = 0. - Thomas Scheuerle, Feb 10 2025

References

  • Zhu Shijie, Jade Mirror of the Four Unknowns (Siyuan yujian), Book III Guo Duo Die Gang (Piles of Fruit), Problem number 7, (1303).

Crossrefs

Cf. A000326, A002411, A085473, A213771, A220084 (for a list of numbers of the form n*P(k,n) - (n-1)*P(k,n-1), where P(k,n) is the n-th k-gonal pyramidal number).
Cf. A260260 (comment). [Bruno Berselli, Jul 22 2015]

Programs

  • Mathematica
    (See A213771.)
    LinearRecurrence[{4,-6,4,-1},{1,11,42,106},70] (* Harvey P. Dale, Mar 29 2025 *)
  • PARI
    a(n) = (4*n^3-3*n^2+n)/2; \\ Altug Alkan, Dec 16 2017

Formula

a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4).
G.f.: x*(1 + 7*x + 4*x^2)/(1 - x)^4.
a(n) = (4*n^2 - 3*n + 1)*n/2 = n*A002411(n) - (n-1)*A002411(n-1). - Bruno Berselli, Dec 11 2012
a(n) = n*A000326(n) + Sum_{i=0..n-1} A000326(i). - Bruno Berselli, Dec 18 2013
a(n) - a(n-1) = A085473(n-1). - R. J. Mathar, Mar 02 2025
E.g.f.: exp(x)*x*(1 + 4*x)*(2 + x)/2. - Elmo R. Oliveira, Aug 08 2025

A085474 C(2*n+4,4)-C(2*n,4).

Original entry on oeis.org

1, 15, 69, 195, 425, 791, 1325, 2059, 3025, 4255, 5781, 7635, 9849, 12455, 15485, 18971, 22945, 27439, 32485, 38115, 44361, 51255, 58829, 67115, 76145, 85951, 96565, 108019, 120345, 133575, 147741, 162875, 179009, 196175, 214405, 233731
Offset: 0

Views

Author

Paul Barry, Jul 01 2003

Keywords

Comments

T(n,4) of A085475.

Crossrefs

Programs

Formula

G.f.: (1 + 11*x + 15*x^2 + 5*x^3)/(1-x)^4.
a(n) = (16*n^3 + 12*n^2 + 14*n + 3)/3.

A085475 Square array of binomial related numbers, read by antidiagonals.

Original entry on oeis.org

0, 1, 0, 1, 1, 0, 1, 5, 1, 0, 1, 10, 9, 1, 0, 1, 15, 31, 13, 1, 0, 1, 21, 69, 64, 17, 1, 0, 1, 28, 126, 195, 109, 21, 1, 0, 1, 36, 210, 456, 425, 166, 25, 1, 0, 1, 45, 330, 923, 1231, 791, 235, 29, 1, 0, 1, 55, 495, 1716, 2975, 2751, 1325, 316, 33, 1, 0, 1, 66, 715, 3003, 6427
Offset: 0

Views

Author

Paul Barry, Jul 01 2003

Keywords

Comments

Rows include A016813, A085473, A085474.

Examples

			Rows begin
0 0 0 0 0 ...
1 1 1 1 1 ...
1 5 9 13 17 ...
1 10 31 64 109 ...
1 15 69 195 425 ...
		

Formula

T(n, k)=C(2n+k, k)-C(2n, k).

A303273 Array T(n,k) = binomial(n, 2) + k*n + 1 read by antidiagonals.

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 1, 3, 4, 4, 1, 4, 6, 7, 7, 1, 5, 8, 10, 11, 11, 1, 6, 10, 13, 15, 16, 16, 1, 7, 12, 16, 19, 21, 22, 22, 1, 8, 14, 19, 23, 26, 28, 29, 29, 1, 9, 16, 22, 27, 31, 34, 36, 37, 37, 1, 10, 18, 25, 31, 36, 40, 43, 45, 46, 46, 1, 11, 20, 28, 35, 41
Offset: 0

Views

Author

Keywords

Comments

Columns are linear recurrence sequences with signature (3,-3,1).
8*T(n,k) + A166147(k-1) are squares.
Columns k are binomial transforms of [1, k, 1, 0, 0, 0, ...].
Antidiagonals sums yield A116731.

Examples

			The array T(n,k) begins
1    1    1    1    1    1    1    1    1    1    1    1    1  ...  A000012
1    2    3    4    5    6    7    8    9   10   11   12   13  ...  A000027
2    4    6    8   10   12   14   16   18   20   22   24   26  ...  A005843
4    7   10   13   16   19   22   25   28   31   34   37   40  ...  A016777
7   11   15   19   23   27   31   35   39   43   47   51   55  ...  A004767
11  16   21   26   31   36   41   46   51   56   61   66   71  ...  A016861
16  22   28   34   40   46   52   58   64   70   76   82   88  ...  A016957
22  29   36   43   50   57   64   71   78   85   92   99  106  ...  A016993
29  37   45   53   61   69   77   85   93  101  109  117  125  ...  A004770
37  46   55   64   73   82   91  100  109  118  127  136  145  ...  A017173
46  56   66   76   86   96  106  116  126  136  146  156  166  ...  A017341
56  67   78   89  100  111  122  133  144  155  166  177  188  ...  A017401
67  79   91  103  115  127  139  151  163  175  187  199  211  ...  A017605
79  92  105  118  131  144  157  170  183  196  209  222  235  ...  A190991
...
The inverse binomial transforms of the columns are
1    1    1    1    1    1    1    1    1    1    1    1    1  ...
0    1    2    3    4    5    6    7    8    9   10   11   12  ...
1    1    1    1    1    1    1    1    1    1    1    1    1  ...
0    0    0    0    0    0    0    0    0    0    0    0    0  ...
0    0    0    0    0    0    0    0    0    0    0    0    0  ...
0    0    0    0    0    0    0    0    0    0    0    0    0  ...
...
T(k,n-k) = A087401(n,k) + 1 as triangle
1
1   1
1   2   2
1   3   4   4
1   4   6   7   7
1   5   8  10  11  11
1   6  10  13  15  16  16
1   7  12  16  19  21  22  22
1   8  14  19  23  26  28  29  29
1   9  16  22  27  31  34  36  37  37
1  10  18  25  31  36  40  43  45  46  46
...
		

References

  • R. L. Graham, D. E. Knuth and O. Patashnik, Concrete Mathematics: A Foundation for Computer Science, Addison-Wesley, 1994.

Crossrefs

Programs

  • Maple
    T := (n, k) -> binomial(n, 2) + k*n + 1;
    for n from 0 to 20 do seq(T(n, k), k = 0 .. 20) od;
  • Mathematica
    Table[With[{n = m - k}, Binomial[n, 2] + k n + 1], {m, 0, 11}, {k, m, 0, -1}] // Flatten (* Michael De Vlieger, Apr 21 2018 *)
  • Maxima
    T(n, k) := binomial(n, 2)+ k*n + 1$
    for n:0 thru 20 do
        print(makelist(T(n, k), k, 0, 20));
    
  • PARI
    T(n,k) = binomial(n, 2) + k*n + 1;
    tabl(nn) = for (n=0, nn, for (k=0, nn, print1(T(n, k), ", ")); print); \\ Michel Marcus, May 17 2018

Formula

G.f.: (3*x^2*y - 3*x*y + y - 2*x^2 + 2*x - 1)/((x - 1)^3*(y - 1)^2).
E.g.f.: (1/2)*(2*x*y + x^2 + 2)*exp(y + x).
T(n,k) = 3*T(n-1,k) - 3*T(n-2,k) + T(n-3,k), with T(0,k) = 1, T(1,k) = k + 1 and T(2,k) = 2*k + 2.
T(n,k) = T(n-1,k) + n + k - 1.
T(n,k) = T(n,k-1) + n, with T(n,0) = 1.
T(n,0) = A152947(n+1).
T(n,1) = A000124(n).
T(n,2) = A000217(n).
T(n,3) = A034856(n+1).
T(n,4) = A052905(n).
T(n,5) = A051936(n+4).
T(n,6) = A246172(n+1).
T(n,7) = A302537(n).
T(n,8) = A056121(n+1) + 1.
T(n,9) = A056126(n+1) + 1.
T(n,10) = A051942(n+10) + 1, n > 0.
T(n,11) = A101859(n) + 1.
T(n,12) = A132754(n+1) + 1.
T(n,13) = A132755(n+1) + 1.
T(n,14) = A132756(n+1) + 1.
T(n,15) = A132757(n+1) + 1.
T(n,16) = A132758(n+1) + 1.
T(n,17) = A212427(n+1) + 1.
T(n,18) = A212428(n+1) + 1.
T(n,n) = A143689(n) = A300192(n,2).
T(n,n+1) = A104249(n).
T(n,n+2) = T(n+1,n) = A005448(n+1).
T(n,n+3) = A000326(n+1).
T(n,n+4) = A095794(n+1).
T(n,n+5) = A133694(n+1).
T(n+2,n) = A005449(n+1).
T(n+3,n) = A115067(n+2).
T(n+4,n) = A133694(n+2).
T(2*n,n) = A054556(n+1).
T(2*n,n+1) = A054567(n+1).
T(2*n,n+2) = A033951(n).
T(2*n,n+3) = A001107(n+1).
T(2*n,n+4) = A186353(4*n+1) (conjectured).
T(2*n,n+5) = A184103(8*n+1) (conjectured).
T(2*n,n+6) = A250657(n-1) = A250656(3,n-1), n > 1.
T(n,2*n) = A140066(n+1).
T(n+1,2*n) = A005891(n).
T(n+2,2*n) = A249013(5*n+4) (conjectured).
T(n+3,2*n) = A186384(5*n+3) = A186386(5*n+3) (conjectured).
T(2*n,2*n) = A143689(2*n).
T(2*n+1,2*n+1) = A143689(2*n+1) (= A030503(3*n+3) (conjectured)).
T(2*n,2*n+1) = A104249(2*n) = A093918(2*n+2) = A131355(4*n+1) (= A030503(3*n+5) (conjectured)).
T(2*n+1,2*n) = A085473(n).
a(n+1,5*n+1)=A051865(n+1) + 1.
a(n,2*n+1) = A116668(n).
a(2*n+1,n) = A054569(n+1).
T(3*n,n) = A025742(3*n-1), n > 1 (conjectured).
T(n,3*n) = A140063(n+1).
T(n+1,3*n) = A069099(n+1).
T(n,4*n) = A276819(n).
T(4*n,n) = A154106(n-1), n > 0.
T(2^n,2) = A028401(n+2).
T(1,n)*T(n,1) = A006000(n).
T(n*(n+1),n) = A211905(n+1), n > 0 (conjectured).
T(n*(n+1)+1,n) = A294259(n+1).
T(n,n^2+1) = A081423(n).
T(n,A000217(n)) = A158842(n), n > 0.
T(n,A152947(n+1)) = A060354(n+1).
floor(T(n,n/2)) = A267682(n) (conjectured).
floor(T(n,n/3)) = A025742(n-1), n > 0 (conjectured).
floor(T(n,n/4)) = A263807(n-1), n > 0 (conjectured).
ceiling(T(n,2^n)/n) = A134522(n), n > 0 (conjectured).
ceiling(T(n,n/2+n)/n) = A051755(n+1) (conjectured).
floor(T(n,n)/n) = A133223(n), n > 0 (conjectured).
ceiling(T(n,n)/n) = A007494(n), n > 0.
ceiling(T(n,n^2)/n) = A171769(n), n > 0.
ceiling(T(2*n,n^2)/n) = A046092(n), n > 0.
ceiling(T(2*n,2^n)/n) = A131520(n+2), n > 0.

A347533 Array A(n,k) where A(n,0) = n and A(n,k) = (k*n + 1)^2 - A(n,k-1), n > 0, read by ascending antidiagonals.

Original entry on oeis.org

1, 2, 3, 3, 7, 6, 4, 13, 18, 10, 5, 21, 36, 31, 15, 6, 31, 60, 64, 50, 21, 7, 43, 90, 109, 105, 71, 28, 8, 57, 126, 166, 180, 151, 98, 36, 9, 73, 168, 235, 275, 261, 210, 127, 45, 10, 91, 216, 316, 390, 401, 364, 274, 162, 55, 11, 111, 270, 409, 525, 571, 560, 477, 351, 199, 66
Offset: 1

Views

Author

Lamine Ngom, Sep 05 2021

Keywords

Comments

A(n,k) is also the distance from A(n, k-1) to the earliest square greater than 3*A(n,k-1) - A(n,k-2).
In column k, every term is the arithmetic mean of its neighbors minus A000217(k).

Examples

			Array, A(n, k), begins:
  1  3   6  10  15   21   28   36   45 ... A000217;
  2  7  18  31  50   71   98  127  162 ... A195605;
  3 13  36  64 105  151  210  274  351 ...
  4 21  60 109 180  261  364  477  612 ...
  5 31  90 166 275  401  560  736  945 ...
  6 43 126 235 390  571  798 1051 1350 ...
  7 57 168 316 525  771 1078 1422 1827 ...
  8 73 216 409 680 1001 1400 1849 2376 ...
  9 91 270 514 855 1261 1764 2332 2997 ...
Antidiagonals, T(n, k), begin as:
   1;
   2,  3;
   3,  7,   6;
   4, 13,  18,  10;
   5, 21,  36,  31,  15;
   6, 31,  60,  64,  50,  21;
   7, 43,  90, 109, 105,  71,  28;
   8, 57, 126, 166, 180, 151,  98,  36;
   9, 73, 168, 235, 275, 261, 210, 127,  45;
  10, 91, 216, 316, 390, 401, 364, 274, 162,  55;
		

Crossrefs

Family of sequences (k*n + 1)^2: A016754 (k=2), A016778 (k=3), A016814 (k=4), A016862 (k=5), A016922 (k=6), A016994 (k=7), A017078 (k=8), A017174 (k=9), A017282 (k=10), A017402 (k=11), A017534 (k=12), A134934 (k=14).

Programs

  • Magma
    A347533:= func< n,k | (1/2)*((k*(n-k)+1)*((k+1)*(n-k)+1) +(-1)^k*(n-k- 1)) >;
    [A347533(n,k): k in [0..n-1], n in [1..13]]; // G. C. Greubel, Dec 25 2022
    
  • Mathematica
    A[n_, 0]:= n; A[n_, k_]:= (k*n+1)^2 -A[n,k-1]; Table[Function[n, A[n, k]][m-k+1], {m,0,10}, {k,0,m}]//Flatten (* Michael De Vlieger, Oct 27 2021 *)
  • SageMath
    def A347533(n,k): return (1/2)*((k*(n-k)+1)*((k+1)*(n-k)+1) +(-1)^k*(n-k- 1))
    flatten([[A347533(n,k) for k in range(n)] for n in range(1,14)]) # G. C. Greubel, Dec 25 2022

Formula

A(n,k) = A000217(k)*n^2 + k*n + 1, for k odd.
A(n,k) = A000217(k)*n^2 + (k+1)*n = (k+1)*x*(k*n/2 + 1), for k even.
A(n,k) = (A(n,k-1) + A(n,k+1) + k*(k+1))/2, for any k.
A(n, 0) = A000027(n).
A(n, 1) = A002061(n+1).
A(n, 2) = A028896(n).
A(n, 3) = A085473(n).
From G. C. Greubel, Dec 25 2022: (Start)
A(n, k) = (1/2)*( (k*n+1)*(k*n+n+1) + (-1)^k*(n-1) ).
T(n, k) = (1/2)*( (k*(n-k)+1)*((k+1)*(n-k)+1) + (-1)^k*(n-k-1) ).
Sum_{k=0..n-1} T(n, k) = (1/120)*(2*n^5 + 5*n^4 + 20*n^3 + 25*n^2 + 98*n - 15*(1-(-1)^n)). (End)

A385108 Triangle a(n,k) read by antidiagonals: a(n,k) is the number of dots in the k-augmented centered triangle of order n, k>=0, n>=1.

Original entry on oeis.org

1, 1, 4, 1, 10, 10, 1, 31, 31, 19, 1, 109, 109, 64, 31, 1, 409, 409, 235, 109, 46, 1, 1585, 1585, 901, 409, 166, 64, 1, 6241, 6241, 3529, 1585, 631, 235, 85, 1, 24769, 24769, 13969, 6241, 2461, 901, 316, 109, 1, 98689, 98689, 55585, 24769, 9721, 3529, 1219, 409, 136
Offset: 1

Views

Author

Noel B. Lacpao, Jun 18 2025

Keywords

Comments

The k-augmented centered triangular numbers a(n,k) count the number of dots in the k-augmented centered triangle of order n. The order, n, refers to the number of exact dots along each side of the base equilateral triangle in the initial unaugmented centered triangle. For k=0, the configuration is simply this base triangle. It would be a single dot for n=1 or for n>=2, a central dot surrounded by dots so that each side contains exactly n dots. For k>=1, the k-augmented centered triangle of order n is recursively constructed by taking a (k-1)-augmented centered triangle of order n and attaching one congruent copy on each side. Each copy shares a whole side with the central triangle. Any overlapping dots that occur along the shared sides and vertices are counted only once. This recursive construction generalizes the classic centered triangular numbers. As k increases, it produces more complex and symmetric triangular patterns.
For k=0, a(n,0) gives the centered triangular numbers (A005448).
For k=1, a(n,1) matches A085473.
When k=2, a(n,1) matches the truncated hex numbers A381424.
The rows appear to be new for all k>=3.
For geometric illustrations, see the linked images.

Examples

			For n=1, any k:
a(1,k) = 4^k*(3*1^2-3*1+2)/2 - 3*1*Sum_{j=1..k} 4^(k-j)*2^(j-1) + 3*Sum_{j=1..k} 4^{k-j}*(2^{j-1}-1)
       = 4^k*1 - 3*Sum_{j=1..k} 4^(k-j)*2^(j-1) + 3*Sum_{j=1..k} 4^(k-j)*2^(j-1) - 3*Sum_{j=1..k} 4^(k-j)
       = 4^k-3*Sum_{j=1..k} 4^(k-j)
       = 4^k-3*(4^k-1)/3
       = 4^k-4^k+1
       = 1.
For n=2,k=0:
a(2,0) = 4^0*(3*2^2-3*2+2)/2
       = 8/2
       = 4.
For n=3, k=2:
a(3,2) = 4^2*(3*3^2-3*3+2)/2 - 3*3*Sum_{j=1..2} 4^(2-j)*2^(j-1) + 3*Sum_{j=1..22} 4^(2-j)*(2^(j-1)-1)
       = 16*20/2-9*6+3*1
       = 109.
Square array begins:
   1,   1,    1,    1,     1,     1,      1,       1, ...
   4,  10,   31,  109,   409,  1585,   6241,   24769, ...
  10,  31,  109,  409,  1585,  6241,  24769,   98689, ...
  19,  64,  235,  901,  3529, 13969,  55585,  221761, ...
  31, 109,  409, 1585,  6241, 24769,  98689,  393985, ...
  46, 166,  631, 2461,  9721, 38641, 154081,  615361, ...
  64, 235,  901, 3529, 13969, 55585, 221761,  885889, ...
  85, 316, 1219, 4789, 18985, 75601, 301729, 1205569, ...
		

Crossrefs

Programs

  • Maple
    a := proc(n, k)
       local S1, S2, j;
       S1 := add(4^(k-j)*2^(j-1), j=1..k);
       S2 := add(4^(k-j)*(2^(j-1)-1), j=1..k);
       return 4^k*(3*n^2 - 3*n + 2)/2 - 3*n*S1 + 3*S2;
    end proc:
    seq(seq(a(n,d-n), n=1..d), d=1..10);
  • Mathematica
    a[n_, k_] := Module[{S1, S2},
      S1 = Sum[4^(k - j) * 2^(j - 1), {j, 1, k}];
      S2 = Sum[4^(k - j) * (2^(j - 1) - 1), {j, 1, k}];
      4^k * (3 n^2 - 3 n + 2)/2 - 3 n * S1 + 3 * S2
    ];
    Table[a[n, k], {n, 1, 5}, {k, 0, 5}]
    TableForm[Table[a[n, k], {n, 1, 5}, {k, 0, 5}]]
  • Python
    def a(n, k):
         return 4**k*(3*n**2-3*n+2)//2-3*n*sum(4**(k-j)*2**(j-1) for j in range(1,k+1))+ 3*sum(4**(k-j)*(2**(j-1)-1) for j in range(1,k+1))
    for n in range(1, 10):
         row = [a(n, k)
    for k in range(0, 10)]
         print(row)
    
  • Python
    # For the antidiagonal terms.
    def a(n,k):
        term1 = 4**k * (3*n**2 - 3*n + 2) // 2
        if k == 0:
            return term1
        return term1 - 3*n*sum([4**(k-j) * 2**(j-1) for j in range(1, k+1)]) + 3*sum([4**(k-j) * (2**(j-1) - 1) for j in range(1, k+1)])
    def antidiagonal_sequence(num_terms):
        terms = []
        diag = 0
        while len(terms) < num_terms:
            for n in range(1, diag+2):
                k = diag - (n-1)
                if k < 0:
                    continue
                terms.append(a(n, k))
                if len(terms) == num_terms:
                    break
            diag += 1
        return terms
    N = 55
    seq = antidiagonal_sequence(N)
    print(', '.join(str(x) for x in seq))

Formula

a(n,k) = 4^k * (3*n^2-3*n+2) / 2 - 3*n * Sum_{j=1..k} 4^(k-j) * 2^(j-1) + 3 * Sum_{j=1..k} 4^(k-j) * (2^(j-1)-1).
a(n,k) = 4 * a(n,k-1) - 3 * (2^(k-1) * n - (2^(k-1)-1)).
G.f. for fixed k: G_k(x) = (A_kx(x+1) + B_kx(1-x) + C_kx(1-x)^2) / (1-x)^3, where a(n,k)=A_kn^2 + B_kn + C_k.

A115519 n*(1+3*n+6*n^2)/2.

Original entry on oeis.org

0, 5, 31, 96, 218, 415, 705, 1106, 1636, 2313, 3155, 4180, 5406, 6851, 8533, 10470, 12680, 15181, 17991, 21128, 24610, 28455, 32681, 37306, 42348, 47825, 53755, 60156, 67046, 74443, 82365, 90830, 99856, 109461, 119663, 130480, 141930, 154031, 166801, 180258
Offset: 0

Views

Author

N. J. A. Sloane, Mar 09 2006

Keywords

Crossrefs

Cf. A085473.

Formula

a(n) = n*(1+3*n+6*n^2)/2. a(n) = n*A085473(n)/2. a(n) = n*[C(2n+3,3)-C(2n,3)]/2. - Jonathan Vos Post, Mar 10 2006
a(0) = 0, a(1) = 5, a(2) = 31, a>2: a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3) + 18; G.f. = (5*x+11*x^2+2*x^3)/(1-x)^4 - Zak Seidov, Mar 10 2006

A338369 Triangle read by rows: T(n,k) = (Sum_{i=0..n-k}(1+k*i)^3)/(Sum_{i=0..n-k} (1+k*i)) for 0 <= k <= n.

Original entry on oeis.org

1, 1, 1, 1, 3, 1, 1, 6, 7, 1, 1, 10, 17, 13, 1, 1, 15, 31, 34, 21, 1, 1, 21, 49, 64, 57, 31, 1, 1, 28, 71, 103, 109, 86, 43, 1, 1, 36, 97, 151, 177, 166, 121, 57, 1, 1, 45, 127, 208, 261, 271, 235, 162, 73, 1, 1, 55, 161, 274, 361, 401, 385, 316, 209, 91, 1, 1, 66, 199, 349, 477, 556, 571, 519, 409, 262, 111, 1
Offset: 0

Views

Author

Werner Schulte, Nov 26 2020

Keywords

Comments

Seen as a square array: (1) A(n,k) = T(n+k,k) = (k^2*n^2+k*(k+2)*n+2)/2 for n,k >= 0; (2) A(n,k) = A(n-1,k) + k*(1 + k*n) for k >= 0 and n > 0; (3) A(n,k) = A(n,k-1) + k*n*(n+1) - n*(n-1)/2 for n >= 0 and k > 0; (4) G.f. of row n >= 0: (2 + (n^2+3*n-4)*x + (n^2-n+2)*x^2) / (2*(1-x)^3).

Examples

			The triangle T(n,k) for 0 <= k <= n starts:
n \k :  0   1    2    3    4    5    6    7    8    9   10   11   12
====================================================================
   0 :  1
   1 :  1   1
   2 :  1   3    1
   3 :  1   6    7    1
   4 :  1  10   17   13    1
   5 :  1  15   31   34   21    1
   6 :  1  21   49   64   57   31    1
   7 :  1  28   71  103  109   86   43    1
   8 :  1  36   97  151  177  166  121   57    1
   9 :  1  45  127  208  261  271  235  162   73    1
  10 :  1  55  161  274  361  401  385  316  209   91    1
  11 :  1  66  199  349  477  556  571  519  409  262  111    1
  12 :  1  78  241  433  609  736  793  771  673  514  321  133    1
etc.
		

Crossrefs

Cf. A000012 (column 0, main diagonal), A000217 (column 1), A056220 (column 2), A081271 (column 3), A118057 (column 4), A002061 (1st subdiagonal), A056109 (2nd subdiagonal), A085473 (3rd subdiagonal), A272039 (4th subdiagonal).

Programs

  • Mathematica
    T[n_, k_] := Sum[(1 + k*i)^3, {i, 0, n - k}]/Sum[1 + k*i, {i, 0, n - k}]; Table[T[n, k], {n, 0, 11}, {k, 0, n}] // Flatten (* Amiram Eldar, Nov 26 2020 *)
  • PARI
    for(n=0,12,for(k=0,n,print1((k^2*(n-k)^2+k*(k+2)*(n-k)+2)/2,", "));print(" "))

Formula

T(n,k) = (k^2*(n-k)^2 + k*(k+2)*(n-k) + 2)/2 for 0 <= k <= n.
T(n,0) = T(n,n) = 1 for n >= 0.
T(n,k) = T(n-1,k-1) + k*(n-k)*(n-k+1) - (n-k)*(n-k-1)/2 for 0 < k <= n.
T(n,k) = T(n-1,k) + k * (1+k*(n-k)) for 0 <= k < n.
G.f. of column k >= 0: (1 + (k^2+k-2)*t + (1-k)*t^2) * t^k / (1-t)^3.
E.g.f.: exp(x+y)*(2 + (x^2 + 2*x - 2)*y + (x^2 - 4*x + 2)*y^2 - (2*x - 5)*y^3 + y^4)/2. - Stefano Spezia, Nov 27 2020
Showing 1-9 of 9 results.