A126890
Triangle read by rows: T(n,k) = n*(n+2*k+1)/2, 0 <= k <= n.
Original entry on oeis.org
0, 1, 2, 3, 5, 7, 6, 9, 12, 15, 10, 14, 18, 22, 26, 15, 20, 25, 30, 35, 40, 21, 27, 33, 39, 45, 51, 57, 28, 35, 42, 49, 56, 63, 70, 77, 36, 44, 52, 60, 68, 76, 84, 92, 100, 45, 54, 63, 72, 81, 90, 99, 108, 117, 126, 55, 65, 75, 85, 95, 105, 115, 125, 135, 145, 155, 66, 77, 88
Offset: 0
From _Philippe Deléham_, Oct 03 2011: (Start)
Triangle begins:
0;
1, 2;
3, 5, 7;
6, 9, 12, 15;
10, 14, 18, 22, 26;
15, 20, 25, 30, 35, 40;
21, 27, 33, 39, 45, 51, 57;
28, 35, 42, 49, 56, 63, 70, 77; (End)
- Léonard Euler, Introduction à l'analyse infinitésimale, tome premier, ACL-Editions, Paris, 1987, p. 353-354.
- Reinhard Zumkeller, Rows n = 0..125 of triangle, flattened
- Émile Fourrey, Les nombres abstraits, Récreations arithmétiques, 1899 and later, Vuibert, Paris, page 86-87. Triangle without right diagonal.
- Adrien-Marie Legendre, Théorie des nombres, tome 2, quatrième partie, p.131, troisième édition, Paris, 1830.
-
a126890 n k = a126890_tabl !! n !! k
a126890_row n = a126890_tabl !! n
a126890_tabl = map fst $ iterate
(\(xs@(x:_), i) -> (zipWith (+) ((x-i):xs) [2*i+1 ..], i+1)) ([0], 0)
-- Reinhard Zumkeller, Nov 10 2013
-
Flatten[Table[(n(n+2k+1))/2,{n,0,20},{k,0,n}]] (* Harvey P. Dale, Jun 21 2013 *)
A095660
Pascal (1,3) triangle.
Original entry on oeis.org
3, 1, 3, 1, 4, 3, 1, 5, 7, 3, 1, 6, 12, 10, 3, 1, 7, 18, 22, 13, 3, 1, 8, 25, 40, 35, 16, 3, 1, 9, 33, 65, 75, 51, 19, 3, 1, 10, 42, 98, 140, 126, 70, 22, 3, 1, 11, 52, 140, 238, 266, 196, 92, 25, 3, 1, 12, 63, 192, 378, 504, 462, 288, 117, 28, 3, 1, 13, 75, 255, 570, 882, 966, 750, 405, 145, 31, 3
Offset: 0
Triangle starts:
3;
1, 3;
1, 4, 3;
1, 5, 7, 3;
1, 6, 12, 10, 3;
1, 7, 18, 22, 13, 3;
1, 8, 25, 40, 35, 16, 3;
1, 9, 33, 65, 75, 51, 19, 3;
1, 10, 42, 98, 140, 126, 70, 22, 3;
1, 11, 52, 140, 238, 266, 196, 92, 25, 3;
1, 12, 63, 192, 378, 504, 462, 288, 117, 28, 3;
1, 13, 75, 255, 570, 882, 966, 750, 405, 145, 31, 3;
Row sums:
A000079(n+1), n>=1, 3 if n=0. Alternating row sums are [3, -2, followed by 0's].
-
a095660 n k = a095660_tabl !! n !! k
a095660_row n = a095660_tabl !! n
a095660_tabl = [3] : iterate
(\row -> zipWith (+) ([0] ++ row) (row ++ [0])) [1,3]
-- Reinhard Zumkeller, Apr 08 2012
-
A095660:= func< n,k | n eq 0 select 3 else (1+2*k/n)*Binomial(n,k) >;
[A095660(n,k): k in [0..n], n in [1..12]]; // G. C. Greubel, May 02 2021
-
T(n,k):=piecewise(n=0,3,0Mircea Merca, Apr 08 2012
-
{3}~Join~Table[(1 + 2 k/n) Binomial[n, k], {n, 11}, {k, 0, n}] // Flatten (* Michael De Vlieger, Sep 14 2015 *)
-
def A095660(n,k): return 3 if n==0 else (1+2*k/n)*binomial(n,k)
flatten([[A095660(n,k) for k in (0..n)] for n in (0..12)]) # G. C. Greubel, May 02 2021
A185787
Sum of first k numbers in column k of the natural number array A000027; by antidiagonals.
Original entry on oeis.org
1, 7, 25, 62, 125, 221, 357, 540, 777, 1075, 1441, 1882, 2405, 3017, 3725, 4536, 5457, 6495, 7657, 8950, 10381, 11957, 13685, 15572, 17625, 19851, 22257, 24850, 27637, 30625, 33821, 37232, 40865, 44727, 48825, 53166, 57757, 62605, 67717, 73100, 78761, 84707, 90945, 97482, 104325, 111481, 118957, 126760, 134897, 143375
Offset: 1
-
[n*(7*n^2-6*n+5)/6: n in [1..50]]; // Vincenzo Librandi, Jul 04 2012
-
f[n_,k_]:=n+(n+k-2)(n+k-1)/2;
s[k_]:=Sum[f[n,k],{n,1,k}];
Factor[s[k]]
Table[s[k],{k,1,70}] (* A185787 *)
CoefficientList[Series[(3*x^2+3*x+1)/(1-x)^4,{x,0,50}],x] (* Vincenzo Librandi, Jul 04 2012 *)
A059438
Triangle T(n,k) (1 <= k <= n) read by rows: T(n,k) is the number of permutations of [1..n] with k components.
Original entry on oeis.org
1, 1, 1, 3, 2, 1, 13, 7, 3, 1, 71, 32, 12, 4, 1, 461, 177, 58, 18, 5, 1, 3447, 1142, 327, 92, 25, 6, 1, 29093, 8411, 2109, 531, 135, 33, 7, 1, 273343, 69692, 15366, 3440, 800, 188, 42, 8, 1, 2829325, 642581, 125316, 24892, 5226, 1146, 252, 52, 9, 1
Offset: 1
Triangle begins:
[1] [ 1]
[2] [ 1, 1]
[3] [ 3, 2, 1]
[4] [ 13, 7, 3, 1]
[5] [ 71, 32, 12, 4, 1]
[6] [ 461, 177, 58, 18, 5, 1]
[7] [ 3447, 1142, 327, 92, 25, 6, 1]
[8] [ 29093, 8411, 2109, 531, 135, 33, 7, 1]
[9] [273343, 69692, 15366, 3440, 800, 188, 42, 8, 1]
- G. C. Greubel, Table of n, a(n) for the first 50 rows, flattened
- Louis Comtet, Advanced Combinatorics, Reidel, 1974, p. 262 (#14).
- Antonio Di Crescenzo, Barbara Martinucci, and Abdelaziz Rhandi, A linear birth-death process on a star graph and its diffusion approximation, arXiv:1405.4312 [math.PR], 2014.
- FindStat - Combinatorial Statistic Finder, The decomposition number of a permutation.
- Peter Hegarty and Anders Martinsson, On the existence of accessible paths in various models of fitness landscapes, arXiv:1210.4798 [math.PR], 2012-2014. - From _N. J. A. Sloane_, Jan 01 2013
- Sergey Kitaev and Philip B. Zhang, Distributions of mesh patterns of short lengths, arXiv:1811.07679 [math.CO], 2018.
A version with reflected rows is
A263484.
-
# Uses function PMatrix from A357368. Adds column 1, 0, 0, ... to the left.
PMatrix(10, A003319); # Peter Luschny, Oct 09 2022
-
(* p = indecomposable permutations = A003319 *) p[n_] := p[n] = n! - Sum[ k!*p[n-k], {k, 1, n-1}]; t[n_, k_] /; n < k = 0; t[n_, 1] := p[n]; t[n_, k_] /; n >= k := t[n, k] = Sum[ t[n-j, k-1]*p[j], {j, 1, n}]; Flatten[ Table[ t[n, k], {n, 1, 10}, {k, 1, n}] ] (* Jean-François Alcover, Mar 06 2012, after Philippe Deléham *)
-
def A059438_triangle(dim) :
R = PolynomialRing(ZZ, 'x')
C = [R(0)] + [R(1) for i in range(dim+1)]
A = [(i + 2) // 2 for i in range(dim+1)]
A[0] = R.gen(); T = []
for k in range(1, dim+1) :
for n in range(k, 0, -1) :
C[n] = C[n-1] + C[n+1] * A[n-1]
T.append(list(C[1])[1::])
return T
A059438_triangle(8) # Peter Luschny, Sep 10 2022
-
# Alternatively, using the function PartTrans from A357078:
# Adds a (0,0)-based column (1, 0, 0, ...) to the left of the triangle.
dim = 10
A = ZZ[['t']]; g = A([0]+[factorial(n) for n in range(1, 30)]).O(dim+2)
PartTrans(dim, lambda n: list(g / (1 + g))[n]) # Peter Luschny, Sep 11 2022
A111774
Numbers that can be written as a sum of at least three consecutive positive integers.
Original entry on oeis.org
6, 9, 10, 12, 14, 15, 18, 20, 21, 22, 24, 25, 26, 27, 28, 30, 33, 34, 35, 36, 38, 39, 40, 42, 44, 45, 46, 48, 49, 50, 51, 52, 54, 55, 56, 57, 58, 60, 62, 63, 65, 66, 68, 69, 70, 72, 74, 75, 76, 77, 78, 80, 81, 82, 84, 85, 86, 87, 88, 90, 91, 92, 93, 94, 95, 96, 98, 99, 100, 102
Offset: 1
a(1)=6 because 6 is the first number that can be written as a sum of three consecutive positive integers: 6 = 1+2+3.
From _Bob Selcoe_, Feb 23 2014: (Start)
Let the top row of an array be A000217(n). Let the diagonals (reading down and left) be A000217(n)-A000217(1), A000217(n)-A000217(2), A000217(n)-A000217(3)..., A000217(n)-A000217(n-3). This is A049777 read as a square array, starting with the third column. The array begins as follows:
6 10 15 21 28 36 45 55 66
9 14 20 27 35 44 54 65
12 18 25 33 42 52 63
15 22 30 39 49 60
18 26 35 45 56
21 30 40 51
24 34 45
27 38
30
This is (x*(x+1)-y*(y+1))/2 for nonnegative integers x,y with x-y >= 3, because it is equivalent to 1+2+3/+4/+5/...+x/-0/-1/-2/-3/-4/-5/...-(x+3)/ for all possible strings of consecutive integers, which represents every possible way to sum three or more consecutive positive integers. So for example, 4+5+6+7 = 1+2+3+4+5+6+7-1-2-3 = 22, which is (x*(x+1)-y*(y+1))/2 when x=7, y=3. Notice that values can appear more than once in the array because some numbers can be represented as sums of more than one string of three or more consecutive positive integers. For example, 30 = (x*(x+1)-y*(y+1))/2 when (a) x=11, y=8: 9+10+11; (b) x=9, y=5: 6+7+8+9; and (c) x=8, y=3: 4+5+6+7+8. By definition, x-y is the number of integers in the string. (End)
- Paul Halmos, "Problems for Mathematicians, Young and Old", Dolciani Mathematical Expositions, 1991, Solution to problem 3G p. 179.
-
ispoweroftwo := proc(n) local a, t; t := 1; while (n > t) do t := 2*t end do; if (n = t) then a := true else a := false end if; return a; end proc; f:= proc(n) if (not isprime(n)) and (not ispoweroftwo(n)) then return n end if; end proc; seq(f(i),i = 1..150);
-
max=6!;lst={};Do[z=n+(n+1);Do[z+=(n+x);If[z>max,Break[]];AppendTo[lst,z],{x,2,max}],{n,max}];Union[lst] (* Vladimir Joseph Stephan Orlovsky, Mar 06 2010 *)
-
isok(n) = !(n == 1) && !isprime(n) && !(isprimepower(n, &p) && (p == 2)); \\ Michel Marcus, Jul 02 2019
-
from sympy import primepi
def A111774(n):
def f(x): return int(n+(0 if x<=1 else primepi(x)-1)+x.bit_length())
m, k = n, f(n)
while m != k: m, k = k, f(k)
return m # Chai Wah Wu, Sep 19 2024
A179986
Second 9-gonal (or nonagonal) numbers: a(n) = n*(7*n+5)/2.
Original entry on oeis.org
0, 6, 19, 39, 66, 100, 141, 189, 244, 306, 375, 451, 534, 624, 721, 825, 936, 1054, 1179, 1311, 1450, 1596, 1749, 1909, 2076, 2250, 2431, 2619, 2814, 3016, 3225, 3441, 3664, 3894, 4131, 4375, 4626, 4884, 5149, 5421, 5700, 5986, 6279, 6579, 6886
Offset: 0
-
[n*(7*n+5)/2: n in [0..50]]; // Bruno Berselli, Sep 23 2016
-
I:=[0, 6, 19]; [n le 3 select I[n] else 3*Self(n-1) -3*Self(n-2) +Self(n-3): n in [1..60]]; // Vincenzo Librandi, Oct 15 2012
-
f[n_] := n (7 n + 5)/2; f[Range[0, 60]] (* Vladimir Joseph Stephan Orlovsky, Feb 05 2011*)
LinearRecurrence[{3, -3, 1}, {0, 6, 19}, 60] (* or *) Array[(#(7# + 5))/2&, 60, 0] (* Harvey P. Dale, Aug 19 2011 *)
CoefficientList[Series[x (6 + x)/(1 - x)^3, {x, 0, 60}], x] (* Vincenzo Librandi, Oct 15 2012 *)
-
a(n)=n*(7*n+5)/2 \\ Charles R Greathouse IV, Sep 24 2015
A255961
Square array A(n,k), n>=0, k>=0, read by antidiagonals, where column k is Euler transform of (j->j*k).
Original entry on oeis.org
1, 1, 0, 1, 1, 0, 1, 2, 3, 0, 1, 3, 7, 6, 0, 1, 4, 12, 18, 13, 0, 1, 5, 18, 37, 47, 24, 0, 1, 6, 25, 64, 111, 110, 48, 0, 1, 7, 33, 100, 215, 303, 258, 86, 0, 1, 8, 42, 146, 370, 660, 804, 568, 160, 0, 1, 9, 52, 203, 588, 1251, 1938, 2022, 1237, 282, 0
Offset: 0
Square array A(n,k) begins:
1, 1, 1, 1, 1, 1, 1, 1, ...
0, 1, 2, 3, 4, 5, 6, 7, ...
0, 3, 7, 12, 18, 25, 33, 42, ...
0, 6, 18, 37, 64, 100, 146, 203, ...
0, 13, 47, 111, 215, 370, 588, 882, ...
0, 24, 110, 303, 660, 1251, 2160, 3486, ...
0, 48, 258, 804, 1938, 4005, 7459, 12880, ...
0, 86, 568, 2022, 5400, 12150, 24354, 44885, ...
Columns k=0-10 give:
A000007,
A000219,
A161870,
A255610,
A255611,
A255612,
A255613,
A255614,
A193427,
A316461,
A316462.
-
A:= proc(n, k) option remember; `if`(n=0, 1, k*add(
A(n-j, k)*numtheory[sigma][2](j), j=1..n)/n)
end:
seq(seq(A(n, d-n), n=0..d), d=0..12);
-
A[n_, k_] := A[n, k] = If[n==0, 1, k*Sum[A[n-j, k]*DivisorSigma[2, j], {j, 1, n}]/n]; Table[Table[A[n, d-n], {n, 0, d}], {d, 0, 12}] // Flatten (* Jean-François Alcover, Feb 02 2016, after Alois P. Heinz *)
A238858
Triangle T(n,k) read by rows: T(n,k) is the number of length-n ascent sequences with exactly k descents.
Original entry on oeis.org
1, 1, 0, 2, 0, 0, 4, 1, 0, 0, 8, 7, 0, 0, 0, 16, 33, 4, 0, 0, 0, 32, 131, 53, 1, 0, 0, 0, 64, 473, 429, 48, 0, 0, 0, 0, 128, 1611, 2748, 822, 26, 0, 0, 0, 0, 256, 5281, 15342, 9305, 1048, 8, 0, 0, 0, 0, 512, 16867, 78339, 83590, 21362, 937, 1, 0, 0, 0, 0, 1024, 52905, 376159, 647891, 307660, 35841, 594, 0, 0, 0, 0, 0
Offset: 0
Triangle starts:
00: 1;
01: 1, 0;
02: 2, 0, 0;
03: 4, 1, 0, 0;
04: 8, 7, 0, 0, 0;
05: 16, 33, 4, 0, 0, 0;
06: 32, 131, 53, 1, 0, 0, 0;
07: 64, 473, 429, 48, 0, 0, 0, 0;
08: 128, 1611, 2748, 822, 26, 0, 0, 0, 0;
09: 256, 5281, 15342, 9305, 1048, 8, 0, 0, 0, 0;
10: 512, 16867, 78339, 83590, 21362, 937, 1, 0, 0, 0, 0;
11: 1024, 52905, 376159, 647891, 307660, 35841, 594, 0, 0, 0, 0, 0;
12: 2048, 163835, 1728458, 4537169, 3574869, 834115, 45747, 262, 0, 0, 0, 0, 0;
...
The 53 ascent sequences of length 5 together with their numbers of descents are (dots for zeros):
01: [ . . . . . ] 0 28: [ . 1 1 . 1 ] 1
02: [ . . . . 1 ] 0 29: [ . 1 1 . 2 ] 1
03: [ . . . 1 . ] 1 30: [ . 1 1 1 . ] 1
04: [ . . . 1 1 ] 0 31: [ . 1 1 1 1 ] 0
05: [ . . . 1 2 ] 0 32: [ . 1 1 1 2 ] 0
06: [ . . 1 . . ] 1 33: [ . 1 1 2 . ] 1
07: [ . . 1 . 1 ] 1 34: [ . 1 1 2 1 ] 1
08: [ . . 1 . 2 ] 1 35: [ . 1 1 2 2 ] 0
09: [ . . 1 1 . ] 1 36: [ . 1 1 2 3 ] 0
10: [ . . 1 1 1 ] 0 37: [ . 1 2 . . ] 1
11: [ . . 1 1 2 ] 0 38: [ . 1 2 . 1 ] 1
12: [ . . 1 2 . ] 1 39: [ . 1 2 . 2 ] 1
13: [ . . 1 2 1 ] 1 40: [ . 1 2 . 3 ] 1
14: [ . . 1 2 2 ] 0 41: [ . 1 2 1 . ] 2
15: [ . . 1 2 3 ] 0 42: [ . 1 2 1 1 ] 1
16: [ . 1 . . . ] 1 43: [ . 1 2 1 2 ] 1
17: [ . 1 . . 1 ] 1 44: [ . 1 2 1 3 ] 1
18: [ . 1 . . 2 ] 1 45: [ . 1 2 2 . ] 1
19: [ . 1 . 1 . ] 2 46: [ . 1 2 2 1 ] 1
20: [ . 1 . 1 1 ] 1 47: [ . 1 2 2 2 ] 0
21: [ . 1 . 1 2 ] 1 48: [ . 1 2 2 3 ] 0
22: [ . 1 . 1 3 ] 1 49: [ . 1 2 3 . ] 1
23: [ . 1 . 2 . ] 2 50: [ . 1 2 3 1 ] 1
24: [ . 1 . 2 1 ] 2 51: [ . 1 2 3 2 ] 1
25: [ . 1 . 2 2 ] 1 52: [ . 1 2 3 3 ] 0
26: [ . 1 . 2 3 ] 1 53: [ . 1 2 3 4 ] 0
27: [ . 1 1 . . ] 1
There are 16 ascent sequences with no descent, 33 with one, and 4 with 2, giving row 4 [16, 33, 4, 0, 0, 0].
Cf.
A137251 (ascent sequences with k ascents),
A242153 (ascent sequences with k flat steps).
-
# b(n, i, t): polynomial in x where the coefficient of x^k is #
# the number of postfixes of these sequences of #
# length n having k descents such that the prefix #
# has rightmost element i and exactly t ascents #
b:= proc(n, i, t) option remember; `if`(n=0, 1, expand(add(
`if`(ji, 1, 0)), j=0..t+1)))
end:
T:= n-> (p-> seq(coeff(p, x, i), i=0..n))(b(n, -1$2)):
seq(T(n), n=0..12);
-
b[n_, i_, t_] := b[n, i, t] = If[n == 0, 1, Sum[If[ji, 1, 0]], {j, 0, t+1}]]; T[n_] := Function[{p}, Table[Coefficient[p, x, i], {i, 0, n}]][b[n, -1, -1]]; Table[T[n], {n, 0, 12}] // Flatten (* Jean-François Alcover, Jan 06 2015, translated from Maple *)
-
# Transcription of the Maple program
R. = QQ[]
@CachedFunction
def b(n,i,t):
if n==0: return 1
return sum( ( x if ji) ) for j in range(t+2) )
def T(n): return b(n, -1, -1)
for n in range(0,10): print(T(n).list())
A226492
a(n) = n*(11*n-5)/2.
Original entry on oeis.org
0, 3, 17, 42, 78, 125, 183, 252, 332, 423, 525, 638, 762, 897, 1043, 1200, 1368, 1547, 1737, 1938, 2150, 2373, 2607, 2852, 3108, 3375, 3653, 3942, 4242, 4553, 4875, 5208, 5552, 5907, 6273, 6650, 7038, 7437, 7847, 8268, 8700, 9143, 9597, 10062, 10538, 11025, 11523
Offset: 0
Cf. sequences in Comments lines.
-
[n*(11*n-5)/2: n in [0..50]];
-
I:=[0,3,17]; [n le 3 select I[n] else 3*Self(n-1)-3*Self(n-2)+Self(n-3): n in [1..46]]; // Vincenzo Librandi, Aug 18 2013
-
Table[n (11 n - 5)/2, {n, 0, 50}]
CoefficientList[Series[x (3 + 8 x) / (1 - x)^3, {x, 0, 45}], x] (* Vincenzo Librandi, Aug 18 2013 *)
LinearRecurrence[{3,-3,1},{0,3,17},50] (* Harvey P. Dale, Jan 14 2019 *)
-
a(n)=n*(11*n-5)/2 \\ Charles R Greathouse IV, Sep 24 2015
A140673
a(n) = 3*n*(n + 5)/2.
Original entry on oeis.org
0, 9, 21, 36, 54, 75, 99, 126, 156, 189, 225, 264, 306, 351, 399, 450, 504, 561, 621, 684, 750, 819, 891, 966, 1044, 1125, 1209, 1296, 1386, 1479, 1575, 1674, 1776, 1881, 1989, 2100, 2214, 2331, 2451, 2574, 2700, 2829, 2961, 3096
Offset: 0
The generalized pentagonal numbers b*n+3*n*(n-1)/2, for b = 1 through 12, form sequences
A000326,
A005449,
A045943,
A115067,
A140090,
A140091,
A059845,
A140672,
A140673,
A140674,
A140675,
A151542.
-
Table[Sum[i + n - 3, {i, 6, n}], {n, 5, 52}] (* Zerinvary Lajos, Jul 11 2009 *)
Table[3 n (n + 5)/2, {n, 0, 50}] (* Bruno Berselli, Sep 05 2018 *)
LinearRecurrence[{3,-3,1},{0,9,21},50] (* Harvey P. Dale, Jul 20 2023 *)
-
concat(0, Vec(3*x*(3 - 2*x)/(1 - x)^3 + O(x^100))) \\ Michel Marcus, Apr 20 2015
-
a(n) = 3*n*(n+5)/2; \\ Altug Alkan, Sep 05 2018
Comments