Search: a008805 -id:a008805
|
|
A350684
|
|
Number T(n,k) of partitions of [n] such that the sum of elements i contained in block i equals k when blocks are ordered with decreasing largest elements; triangle T(n,k), n>=0, 0<=k<=max(0,A008805(n-1)), read by rows.
|
|
+20
4
|
|
|
1, 0, 1, 1, 1, 1, 1, 2, 1, 6, 3, 4, 2, 16, 7, 8, 14, 3, 3, 1, 73, 25, 26, 51, 12, 12, 4, 298, 91, 92, 164, 116, 56, 30, 21, 4, 4, 1, 1453, 390, 391, 601, 676, 256, 163, 147, 28, 28, 7, 7366, 1797, 1798, 2484, 3228, 1927, 897, 876, 307, 307, 87, 31, 31, 5, 5, 1
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,8
|
|
LINKS
|
|
|
FORMULA
|
T(n,2) - T(n,1) = 1 for n>=3.
|
|
EXAMPLE
|
T(4,0) = 6: 432|1, 42|31, 42|3|1, 4|31|2, 4|3|21, 4|3|2|1.
T(4,1) = 3: 432(1), 42(1)|3, 4(1)|3|2.
T(4,2) = 4: 43|(2)1, 43|(2)|1, 4|3(2)1, 4|3(2)|1,
T(4,3) = 2: 43(1)|(2), 4(1)|3(2).
Triangle T(n,k) begins:
1;
0, 1;
1, 1;
1, 1, 2, 1;
6, 3, 4, 2;
16, 7, 8, 14, 3, 3, 1;
73, 25, 26, 51, 12, 12, 4;
298, 91, 92, 164, 116, 56, 30, 21, 4, 4, 1;
1453, 390, 391, 601, 676, 256, 163, 147, 28, 28, 7;
...
|
|
MAPLE
|
b:= proc(n, m) option remember; expand(`if`(n=0, 1, add(
`if`(n=j, x^j, 1)*b(n-1, max(m, j)), j=1..m+1)))
end:
T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))(b(n, 0)):
seq(T(n), n=0..10);
|
|
MATHEMATICA
|
b[n_, m_] := b[n, m] = Expand[If[n == 0, 1, Sum[
If[n == j, x^j, 1]*b[n - 1, Max[m, j]], {j, 1, m + 1}]]];
T[n_] := CoefficientList[b[n, 0], x];
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,tabf
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|
|
A158920
|
|
Binomial transform of A008805 (triangular numbers with repeats).
|
|
+20
3
|
|
|
1, 2, 6, 16, 41, 102, 248, 592, 1392, 3232, 7424, 16896, 38144, 85504, 190464, 421888, 929792, 2039808, 4456448, 9699328, 21037056, 45481984, 98041856, 210763776, 451936256, 966787072, 2063597568, 4395630592, 9344909312, 19830669312
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
LINKS
|
M. Janjic and B. Petkovic, A Counting Function, arXiv preprint arXiv:1301.4550, 2013. - From N. J. A. Sloane, Feb 13 2013
|
|
FORMULA
|
A007318 * (1, 1, 3, 3, 6, 6, 10, 10, 15, 15, ...) = binomial transform of triangular numbers A000217 with repeats.
G.f.: x*(x-1)^4/(1-2*x)^3.
a(n) = 6*a(n-1) - 12*a(n-2) + 8*a(n-3), n > 5. (End)
|
|
EXAMPLE
|
a(4) = 16 = (1, 3, 3, 1) dot (1, 1, 3, 3) = (1 + 3 + 9 + 3).
|
|
MAPLE
|
|
|
MATHEMATICA
|
Join[{1, 2}, LinearRecurrence[{6, -12, 8}, {6, 16, 41}, 30]] (* Harvey P. Dale, Feb 25 2012 *)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|
|
A177747
|
|
Convolution of A008805 (triangular numbers repeated) with itself.
|
|
+20
2
|
|
|
1, 2, 7, 12, 27, 42, 77, 112, 182, 252, 378, 504, 714, 924, 1254, 1584, 2079, 2574, 3289, 4004, 5005, 6006, 7371, 8736, 10556, 12376, 14756, 17136, 20196, 23256, 27132, 31008, 35853, 40698, 46683, 52668, 59983, 67298, 76153, 85008, 95634, 106260, 118910, 131560, 146510
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,2
|
|
LINKS
|
Index entries for linear recurrences with constant coefficients, signature (2,3,-8,-2,12,-2,-8,3,2,-1).
|
|
FORMULA
|
Square (1 + x + 3x^2 + 3x^3 + 6x^4 + 6x^5 + ...)
a(n) = (n+5)*(2*n*(n+10)*(n^2+10*n+35)+5*(2*n*(n+10)+39)*(-1)^n+573)/3840. [Bruno Berselli, Mar 23 2012]
|
|
EXAMPLE
|
As a multiplication table array:
.
1, 1, 3, 3, 6,...
1, 1, 3, 3,......
3, 3, 9,.........
3, 3,............
6,...............
.
Then taking antidiagonal sums of terms, we obtain 1, (1 + 1) = 2, (3 + 1 + 3) = 7, (3 + 3 + 3 + 3) = 12, (6, + 3 + 9 + 3 + 6) = 27, etc.
|
|
MATHEMATICA
|
lst = CoefficientList[ Series[1/((1 - x) (1 - x^2)^2), {x, 0, 111}], x]; t[n_, k_] := lst[[n]] lst[[k]]; f[n_] := Sum[ t[n - m + 1, m], {m, n}]; Array[f, 45] (* Robert G. Wilson v, Dec 18 2010 *)
LinearRecurrence[{2, 3, -8, -2, 12, -2, -8, 3, 2, -1}, {1, 2, 7, 12, 27, 42, 77, 112, 182, 252}, 45] (* Bruno Berselli, Mar 23 2012 *)
|
|
PROG
|
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|
|
A178320
|
|
INVERT transform of A008805 (triangular numbers repeated).
|
|
+20
0
|
|
|
1, 2, 6, 14, 35, 85, 208, 508, 1241, 3032, 7407, 18096, 44209, 108005, 263861, 644625, 1574849, 3847430, 9399452, 22963302, 56100424, 137055967, 334834156, 818015548, 1998450352, 4882307945, 11927707309, 29139948412, 71190260748
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,2
|
|
LINKS
|
|
|
FORMULA
|
G.f.: -1/(x^5-x^4-2*x^3+2*x^2+2*x-1).
|
|
EXAMPLE
|
a(3) = 14 = (3, 3, 1, 1) * (1, 1, 2, 6) = (3 + 3 + 2 + 6).
|
|
MAPLE
|
b:= proc(n) local m;
m:= ceil((n+1)/2);
m*(m+1)/2
end:
invtr:= proc(b)
local a;
a:= proc(n) option remember; local i;
`if`(n<1, 1, add(a(n-i) *b(i-1), i=1..n+1))
end;
end:
a:= invtr(b):
seq(a(n), n=0..30);
|
|
MATHEMATICA
|
LinearRecurrence[{2, 2, -2, -1, 1}, {1, 2, 6, 14, 35}, 30] (* Jean-François Alcover, Nov 28 2020 *)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|
|
A237593
|
|
Triangle read by rows in which row n lists the elements of the n-th row of A237591 and then the elements of the same row but in reverse order.
|
|
+10
503
|
|
|
1, 1, 2, 2, 2, 1, 1, 2, 3, 1, 1, 3, 3, 2, 2, 3, 4, 1, 1, 1, 1, 4, 4, 2, 1, 1, 2, 4, 5, 2, 1, 1, 2, 5, 5, 2, 2, 2, 2, 5, 6, 2, 1, 1, 1, 1, 2, 6, 6, 3, 1, 1, 1, 1, 3, 6, 7, 2, 2, 1, 1, 2, 2, 7, 7, 3, 2, 1, 1, 2, 3, 7, 8, 3, 1, 2, 2, 1, 3, 8, 8, 3, 2, 1, 1, 1, 1, 2, 3, 8
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,3
|
|
COMMENTS
|
Row n is a palindromic composition of 2*n.
T(n,k) is also the length of the k-th segment in a Dyck path on the first quadrant of the square grid, connecting the x-axis with the y-axis, from (n, 0) to (0, n), starting with a segment in vertical direction, see example.
Conjecture 1: the area under the n-th Dyck path equals A024916(n), the sum of all divisors of all positive integers <= n.
If the conjecture is true then the n-th Dyck path represents the boundary segments after the alternating sum of the elements of the n-th row of A236104.
Conjecture 2: two adjacent Dyck paths never cross (checked by hand up to n = 128), hence the total area between the n-th Dyck path and the (n-1)-st Dyck path is equal to sigma(n) = A000203(n), the sum of divisors of n.
PARI scripts area(n) and chkcross(n) have been written to check the 2 properties and have been run up to n=10000. - Michel Marcus, Mar 27 2014
The place to start is with A235791, which is very simple. Then go to A237591, also very simple, and A237593, still very simple.
You then need to interpret the rows of A237593 as Dyck paths. This interpretation is in terms of run lengths, so 2,1,1,2 means up twice, down once, up once, and down twice. Because the rows of A237593 are symmetric and of even length, this path will always be symmetric.
Now the surprising fact is that the areas enclosed by the Dyck path for n (laid on its side) always includes the area enclosed for n-1; and the number of squares added is sigma(n).
Finally, look at the connected areas enclosed by n but not by n-1; the size of these areas is the symmetric representation of sigma. (End)
Mathematica functions have been written that verified the 2 properties through n=30000. - Hartmut F. W. Hoft, Apr 07 2014
It appears that, for the n-th set, the number of cells lying on the first diagonal is equal to A067742(n), the number of middle divisors of n. - Michel Marcus, Jun 21 2014
A003056(n) is also the number of peaks of the Dyck path related to the n-th row of triangle. - Omar E. Pol, Nov 03 2015
The number of peaks of the Dyck path associated to the row A000396(n) of this triangle equals the n-th Mersenne prime A000668(n), hence Mersenne primes are visible in two ways at the pyramid described in A245092. - Omar E. Pol, Dec 19 2016
The limit as n approaches infinity (area under the Dyck path described in the n-th row of triangle divided by n^2) equals Pi^2/12 = zeta(2)/2. (Cf. A072691.) - Omar E. Pol, Dec 18 2021
The connection between the isosceles triangle and the stepped pyramid is due to the fact that this object can also be interpreted as a pop-up card. - Omar E. Pol, Nov 09 2022
|
|
LINKS
|
|
|
FORMULA
|
|
|
EXAMPLE
|
Triangle begins:
n
1 | 1, 1;
2 | 2, 2;
3 | 2, 1, 1, 2;
4 | 3, 1, 1, 3;
5 | 3, 2, 2, 3;
6 | 4, 1, 1, 1, 1, 4;
7 | 4, 2, 1, 1, 2, 4;
8 | 5, 2, 1, 1, 2, 5;
9 | 5, 2, 2, 2, 2, 5;
10 | 6, 2, 1, 1, 1, 1, 2, 6;
11 | 6, 3, 1, 1, 1, 1, 3, 6;
12 | 7, 2, 2, 1, 1, 2, 2, 7;
13 | 7, 3, 2, 1, 1, 2, 3, 7;
14 | 8, 3, 1, 2, 2, 1, 3, 8;
15 | 8, 3, 2, 1, 1, 1, 1, 2, 3, 8;
16 | 9, 3, 2, 1, 1, 1, 1, 2, 3, 9;
17 | 9, 4, 2, 1, 1, 1, 1, 2, 4, 9;
18 | 10, 3, 2, 2, 1, 1, 2, 2, 3, 10;
19 | 10, 4, 2, 2, 1, 1, 2, 2, 4, 10;
20 | 11, 4, 2, 1, 2, 2, 1, 2, 4, 11;
21 | 11, 4, 3, 1, 1, 1, 1, 1, 1, 3, 4, 11;
22 | 12, 4, 2, 2, 1, 1, 1, 1, 2, 2, 4, 12;
23 | 12, 5, 2, 2, 1, 1, 1, 1, 2, 2, 5, 12;
24 | 13, 4, 3, 2, 1, 1, 1, 1, 2, 3, 4, 13;
...
Illustration of rows 8 and 9 interpreted as Dyck paths in the first quadrant and the illustration of the symmetric representation of sigma(9) = 5 + 3 + 5 = 13, see below:
.
y y
. .
. ._ _ _ _ _ _ _ _ _ _ 5
._ _ _ _ _ . | |_ _ _ _ _|
. | . |_ _ |_ _ 3
. |_ . | |_ |
. |_ _ . |_ _ |_|_ _ 5
. | . | | |
. Area = 56 | . Area = 69 | | |
. | . | | |
. | . | | |
. . . . . . . . | . x . . . . . . . . . | . x |_|
.
. Fig. 1 Fig. 2 Fig. 3
.
Figure 1. For n = 8 the 8th row of triangle is [5, 2, 1, 1, 2, 5] and the area under the symmetric Dyck path is equal to A024916(8) = 56.
Figure 2. For n = 9 the 9th row of triangle is [5, 2, 2, 2, 2, 5] and the area under the symmetric Dyck path is equal to A024916(9) = 69.
Figure 3. The symmetric representation of sigma(9): between both symmetric Dyck paths there are three regions (or parts) of sizes [5, 3, 5].
The sum of divisors of 9 is 1 + 3 + 9 = A000203(9) = 13. On the other hand the difference between the areas under the Dyck paths equals the sum of the parts of the symmetric representation of sigma(9) = 69 - 56 = 5 + 3 + 5 = 13, equaling the sum of divisors of 9.
.
Illustration of initial terms as Dyck paths in the first quadrant:
(row n = 1..28)
. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
|_ _ _ _ _ _ _ _ _ _ _ _ _ _ |
|_ _ _ _ _ _ _ _ _ _ _ _ _ _| |
|_ _ _ _ _ _ _ _ _ _ _ _ _ | |
|_ _ _ _ _ _ _ _ _ _ _ _ _| | |
|_ _ _ _ _ _ _ _ _ _ _ _ | | |_ _ _
|_ _ _ _ _ _ _ _ _ _ _ _| | |_ _ _ |
|_ _ _ _ _ _ _ _ _ _ _ | | |_ _ | |_
|_ _ _ _ _ _ _ _ _ _ _| | |_ _ _| |_ |_
|_ _ _ _ _ _ _ _ _ _ | | |_ _| |_
|_ _ _ _ _ _ _ _ _ _| | |_ _ |_ |_ _ |_ _
|_ _ _ _ _ _ _ _ _ | |_ _ _| |_ | |_ _ |
|_ _ _ _ _ _ _ _ _| | |_ _ |_ |_|_ _ | |
|_ _ _ _ _ _ _ _ | |_ _ |_ _|_ | | | |_ _ _ _ _
|_ _ _ _ _ _ _ _| | | | |_ _ | |_|_ _ _ _ _ |
|_ _ _ _ _ _ _ | |_ _ |_ |_ | | |_ _ _ _ _ | | |
|_ _ _ _ _ _ _| |_ _ |_ |_ _ | | |_ _ _ _ _ | | | | |
|_ _ _ _ _ _ | |_ |_ |_ | |_|_ _ _ _ | | | | | | |
|_ _ _ _ _ _| |_ _| |_ | |_ _ _ _ | | | | | | | | |
|_ _ _ _ _ | |_ _ | |_ _ _ _ | | | | | | | | | | |
|_ _ _ _ _| |_ | |_|_ _ _ | | | | | | | | | | | | |
|_ _ _ _ |_ _|_ |_ _ _ | | | | | | | | | | | | | | |
|_ _ _ _| |_ | |_ _ _ | | | | | | | | | | | | | | | | |
|_ _ _ |_ |_|_ _ | | | | | | | | | | | | | | | | | | |
|_ _ _| |_ _ | | | | | | | | | | | | | | | | | | | | |
|_ _ |_ _ | | | | | | | | | | | | | | | | | | | | | | |
|_ _|_ | | | | | | | | | | | | | | | | | | | | | | | | |
|_ | | | | | | | | | | | | | | | | | | | | | | | | | | |
|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|
.
n: 1 2 3 4 5 6 7 8 9 10..12..14..16..18..20..22..24..26..28
.
It appears that the total area (also the total number of cells) in the first n set of symmetric regions of the diagram is equal to A024916(n), the sum of all divisors of all positive integers <= n.
It appears that the total area (also the total number of cells) in the n-th set of symmetric regions of the diagram is equal to sigma(n) = A000203(n) (checked by hand up n = 128).
The above diagram is also the top view of the stepped pyramid described in A245092 and it is also the top view of the staircase described in A244580, in both cases the figure represents the first 28 levels of the structure. Note that the diagram contains (and arises from) a hidden pattern which is shown below.
.
Illustration of initial terms as an isosceles triangle:
Row _ _
1 _|1|1|_
2 _|2 _|_ 2|_
3 _|2 |1|1| 2|_
4 _|3 _|1|1|_ 3|_
5 _|3 |2 _|_ 2| 3|_
6 _|4 _|1|1|1|1|_ 4|_
7 _|4 |2 |1|1| 2| 4|_
8 _|5 _|2 _|1|1|_ 2|_ 5|_
9 _|5 |2 |2 _|_ 2| 2| 5|_
10 _|6 _|2 |1|1|1|1| 2|_ 6|_
11 _|6 |3 _|1|1|1|1|_ 3| 6|_
12 _|7 _|2 |2 |1|1| 2| 2|_ 7|_
13 _|7 |3 |2 _|1|1|_ 2| 3| 7|_
14 _|8 _|3 _|1|2 _|_ 2|1|_ 3|_ 8|_
15 _|8 |3 |2 |1|1|1|1| 2| 3| 8|_
16 |9 |3 |2 |1|1|1|1| 2| 3| 9|
...
This diagram is the simpler representation of the sequence.
The number of horizontal line segments in the n-th level in each side of the diagram equals A001227(n), the number of odd divisors of n.
The number of horizontal line segments in the left side of the diagram plus the number of the horizontal line segment in the right side equals A054844(n).
The total number of vertical line segments in the n-th level of the diagram equals A131507(n).
Note that this symmetric pattern also emerges from the front view of the stepped pyramid described in A245092, which is related to sigma A000203, the sum-of-divisors function, and other related sequences. The diagram represents the first 16 levels of the pyramid. (End)
|
|
MATHEMATICA
|
row[n_]:=Floor[(Sqrt[8n+1]-1)/2]
s[n_, k_]:=Ceiling[(n+1)/k-(k+1)/2]-Ceiling[(n+1)/(k+1)-(k+2)/2]
f[n_, k_]:=If[k<=row[n], s[n, k], s[n, 2 row[n]+1-k]]
TableForm[Table[f[n, k], {n, 1, 50}, {k, 1, 2 row[n]}]] (* Hartmut F. W. Hoft, Apr 08 2014 *)
|
|
PROG
|
(PARI) row(n) = {my(orow = row237591(n)); vector(2*#orow, i, if (i <= #orow, orow[i], orow[2*#orow-i+1])); }
area(n) = {my(rown = row(n)); surf = 0; h = n; odd = 1; for (i=1, #row, if (odd, surf += h*rown[i], h -= rown[i]; ); odd = !odd; ); surf; }
heights(v, n) = {vh = vector(n); ivh = 1; h = n; odd = 1; for (i=1, #v, if (odd, for (j=1, v[i], vh[ivh] = h; ivh++), h -= v[i]; ); odd = !odd; ); vh; }
isabove(hb, ha) = {for (i=1, #hb, if (hb[i] < ha[i], return (0)); ); return (1); }
chkcross(nn) = {hga = concat(heights(row(1), 1), 0); for (n=2, nn, hgb = heights(row(n), n); if (! isabove(hgb, hga), print("pb cross at n=", n)); hga = concat(hgb, 0); ); } \\ Michel Marcus, Mar 27 2014
(Python)
from sympy import sqrt
import math
def row(n): return int(math.floor((sqrt(8*n + 1) - 1)/2))
def s(n, k): return int(math.ceil((n + 1)/k - (k + 1)/2)) - int(math.ceil((n + 1)/(k + 1) - (k + 2)/2))
def T(n, k): return s(n, k) if k<=row(n) else s(n, 2*row(n) + 1 - k)
for n in range(1, 11): print [T(n, k) for k in range(1, 2*row(n) + 1)] # Indranil Ghosh, Apr 21 2017
|
|
CROSSREFS
|
Column k starts in row A008805(k-1).
Column 1 = right border = A008619, n >= 1.
For further information see A262626.
Cf. A000203, A000217, A001065, A001227, A024916, A048050, A054844, A067742, A072691, A131507, A196020, A221529, A235791, A236104, A237048, A237270, A237271, A237590, A237591, A239660, A239931-A239934, A244050, A244580, A245092, A249351, A261350, A261699, A262611, A262612, A279387, A280850, A280851, A286000, A286001, A296508, A335616, A340035.
|
|
KEYWORD
|
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|
|
A004736
|
|
Triangle read by rows: row n lists the first n positive integers in decreasing order.
|
|
+10
333
|
|
|
1, 2, 1, 3, 2, 1, 4, 3, 2, 1, 5, 4, 3, 2, 1, 6, 5, 4, 3, 2, 1, 7, 6, 5, 4, 3, 2, 1, 8, 7, 6, 5, 4, 3, 2, 1, 9, 8, 7, 6, 5, 4, 3, 2, 1, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1
(list;
table;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
Old name: Triangle T(n,k) = n-k, n >= 1, 0 <= k < n. Fractal sequence formed by repeatedly appending strings m, m-1, ..., 2, 1.
The PARI functions t1 (this sequence), t2 (A002260) can be used to read a square array T(n,k) (n >= 1, k >= 1) by antidiagonals upwards: n -> T(t1(n), t2(n)). - Michael Somos, Aug 23 2002, edited by M. F. Hasler, Mar 31 2020
A004736 is the mirror of the self-fission of the polynomial sequence (q(n,x)) given by q(n,x) = x^n+ x^(n-1) + ... + x + 1. See A193842 for the definition of fission. - Clark Kimberling, Aug 07 2011
Sequence B is called a reverse reluctant sequence of sequence A, if B is triangle array read by rows: row number k lists first k elements of the sequence A in reverse order. Sequence A004736 is the reverse reluctant sequence of sequence 1,2,3,... (A000027). - Boris Putievskiy, Dec 13 2012
Riordan array (1/(1-x)^2,x). Call this array M and for k = 0,1,2,... define M(k) to be the lower unit triangular block array
/I_k 0\
\ 0 M/
having the k X k identity matrix I_k as the upper left block; in particular, M(0) = M. Then the infinite matrix product M(0)*M(1)*M(2)*... is equal to A078812. (End)
T(n, k) gives the number of subsets of [n] := {1, 2, ..., n} with k consecutive numbers (consecutive k-subsets of [n]). - Wolfdieter Lang, May 30 2018
a(n) gives the distance from (n-1) to the smallest triangular number > (n-1). - Ctibor O. Zizka, Apr 09 2020
To construct the sequence, start from 1,2,,3,,,4,,,,5,,,,,6... where there are n commas after each "n". Then fill the empty places by the sequence itself. - Benoit Cloitre, Aug 17 2021
T(n,k) is the number of cycles of length 2*(k+1) in the (n+1)-ladder graph. There are no cycles of odd length. - Mohammed Yaseen, Jan 14 2023
The first 77 entries are also the signature sequence of log(3)=A002391. Then the two sequences start to differ. - R. J. Mathar, May 27 2024
|
|
REFERENCES
|
H. S. M. Coxeter, Regular Polytopes, 3rd ed., Dover, NY, 1973, pp 159-162.
|
|
LINKS
|
Glen Joyce C. Dulatre, Jamilah V. Alarcon, Vhenedict M. Florida, and Daisy Ann A. Disu, On Fractal Sequences, DMMMSU-CAS Science Monitor (2016-2017) Vol. 15 No. 2, 109-113.
|
|
FORMULA
|
a(n) = (2 - 2*n + round(sqrt(2*n)) + round(sqrt(2*n))^2)/2. - Brian Tenneson, Oct 11 2003
Recursion: e(n,k) = (e(n - 1, k)*e(n, k - 1) + 1)/e(n - 1, k - 1). - Roger L. Bagula, Mar 25 2009
a(n) = (t*t+3*t+4)/2-n, where t = floor((-1+sqrt(8*n-7))/2). - Boris Putievskiy, Dec 13 2012
T(n, k) = n - k + 1, n >= 1 and 1 <= k <= n.
T(n, k) = A002260(n+k-1, n-k+1). (End)
|
|
EXAMPLE
|
The triangle T(n, k) starts:
n\k 1 2 3 4 5 6 7 8 9 10 11 12 ...
1: 1
2: 2 1
3: 3 2 1
4: 4 3 2 1
5: 5 4 3 2 1
6: 6 5 4 3 2 1
7: 7 6 5 4 3 2 1
8: 8 7 6 5 4 3 2 1
9: 9 8 7 6 5 4 3 2 1
10: 10 9 8 7 6 5 4 3 2 1
11: 11 10 9 8 7 6 5 4 3 2 1
12: 12 11 10 9 8 7 6 5 4 3 2 1
T(6, 3) = 4 because the four consecutive 3-subsets of [6] = {1, 2, ..., 6} are {1, 2, 3}, {2, 3, 4}, {3, 4, 5} and {4, 5, 6}. - Wolfdieter Lang, May 30 2018
|
|
MAPLE
|
T := (n, k) -> n-k+1: seq(seq(T(n, k), k=1..n), n=1..13); # Johannes W. Meijer, Sep 28 2013
|
|
MATHEMATICA
|
Table[Range[n, 1, -1], {n, 20}]//Flatten (* Harvey P. Dale, May 27 2020 *)
|
|
PROG
|
(PARI) {a(n) = 1 + binomial(1 + floor(1/2 + sqrt(2*n)), 2) - n}
(PARI) {t1(n) = binomial( floor(3/2 + sqrt(2*n)), 2) - n + 1} /* A004736 */
(PARI) {t2(n) = n - binomial( floor(1/2 + sqrt(2*n)), 2)} /* A002260 */
(PARI) apply( A004736(n)=1-n+(n=sqrtint(8*n)\/2)*(n+1)\2, [1..99]) \\ M. F. Hasler, Mar 31 2020
(Excel) =if(row()>=column(); row()-column()+1; "") [Mats Granvik, Jan 19 2009]
(Haskell)
a004736 n k = n - k + 1
a004736_row n = a004736_tabl !! (n-1)
a004736_tabl = map reverse a002260_tabl
(Python)
def agen(rows):
for n in range(1, rows+1): yield from range(n, 0, -1)
|
|
CROSSREFS
|
Cf. A141419 (partial sums per row).
See A001511 for definition of ordinal transform.
|
|
KEYWORD
|
|
|
AUTHOR
|
R. Muller
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|
|
A001318
|
|
Generalized pentagonal numbers: m*(3*m - 1)/2, m = 0, +-1, +-2, +-3, ....
(Formerly M1336 N0511)
|
|
+10
272
|
|
|
0, 1, 2, 5, 7, 12, 15, 22, 26, 35, 40, 51, 57, 70, 77, 92, 100, 117, 126, 145, 155, 176, 187, 210, 222, 247, 260, 287, 301, 330, 345, 376, 392, 425, 442, 477, 495, 532, 551, 590, 610, 651, 672, 715, 737, 782, 805, 852, 876, 925, 950, 1001, 1027, 1080, 1107, 1162, 1190, 1247, 1276, 1335
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,3
|
|
COMMENTS
|
"Conway's relation twixt the triangular and pentagonal numbers: Divide the triangular numbers by 3 (when you can exactly):
0 1 3 6 10 15 21 28 36 45 55 66 78 91 105 120 136 153 ...
0 - 1 2 .- .5 .7 .- 12 15 .- 22 26 .- .35 .40 .- ..51 ...
.....-.-.....+..+.....-..-.....+..+......-...-.......+....
"and you get the pentagonal numbers in pairs, one of positive rank and the other negative.
"Append signs according as the pair have the same (+) or opposite (-) parity.
"Then Euler's pentagonal number theorem is easy to remember:
"p(n-0) - p(n-1) - p(n-2) + p(n-5) + p(n-7) - p(n-12) - p(n-15) ++-- = 0^n
where p(n) is the partition function, the left side terminates before the argument becomes negative and 0^n = 1 if n = 0 and = 0 if n > 0.
"E.g. p(0) = 1, p(7) = p(7-1) + p(7-2) - p(7-5) - p(7-7) + 0^7 = 11 + 7 - 2 - 1 + 0 = 15."
(End)
The sequence may be used in order to compute sigma(n), as described in Euler's article. - Thomas Baruchel, Nov 19 2003
Number of levels in the partitions of n + 1 with parts in {1,2}.
a(n) is the number of 3 X 3 matrices (symmetrical about each diagonal) M = {{a, b, c}, {b, d, b}, {c, b, a}} such that a + b + c = b + d + b = n + 2, a,b,c,d natural numbers; example: a(3) = 5 because (a,b,c,d) = (2,2,1,1), (1,2,2,1), (1,1,3,3), (3,1,1,3), (2,1,2,3). - Philippe Deléham, Apr 11 2007
Also numbers a(n) such that 24*a(n) + 1 = (6*m - 1)^2 are odd squares: 1, 25, 49, 121, 169, 289, 361, ..., m = 0, +-1, +-2, ... . - Zak Seidov, Mar 08 2008
This sequence contains all members of A000332 and all nonnegative members of A145919. For values of n such that n*(3*n - 1)/2 belongs to A000332, see A145919. (End)
Starting with offset 1 can be considered the first in an infinite set generated from A026741. Refer to the array in A175005. - Gary W. Adamson, Apr 03 2010
A general formula for the generalized k-gonal numbers is given by n*((k - 2)*n - k + 4)/2, n=0, +-1, +-2, ..., k >= 5. - Omar E. Pol, Sep 15 2011
a(n) is the number of 3-tuples (w,x,y) having all terms in {0,...,n} and 2*w = 2*x + y. - Clark Kimberling, Jun 04 2012
Generalized k-gonal numbers are second k-gonal numbers and positive terms of k-gonal numbers interleaved, k >= 5. - Omar E. Pol, Aug 04 2012
a(n) is the sum of the largest parts of the partitions of n+1 into exactly 2 parts. - Wesley Ivan Hurt, Jan 26 2013
Conway's relation mentioned by R. K. Guy is a relation between triangular numbers and generalized pentagonal numbers, two sequences from different families, but as triangular numbers are also generalized hexagonal numbers in this case we have a relation between two sequences from the same family. - Omar E. Pol, Feb 01 2013
Start with the sequence of all 0's. Add n to each value of a(n) and the next n - 1 terms. The result is the generalized pentagonal numbers. - Wesley Ivan Hurt, Nov 03 2014
(6k + 1) | a(4k). (3k + 1) | a(4k+1). (3k + 2) | a(4k+2). (6k + 5) | a(4k+3). - Jon Perry, Nov 04 2014
Enge, Hart and Johansson proved: "Every generalised pentagonal number c >= 5 is the sum of a smaller one and twice a smaller one, that is, there are generalised pentagonal numbers a, b < c such that c = 2a + b." (see link theorem 5). - Peter Luschny, Aug 26 2016
The Enge, et al. result for c >= 5 also holds for c >= 2 if 0 is included as a generalized pentagonal number. That is, 2 = 2*1 + 0. - Michael Somos, Jun 02 2018
Suggestion for title, where n actually matches the list and b-file: "Generalized pentagonal numbers: k(n)*(3*k(n) - 1)/2, where k(n) = A001057(n) = [0, 1, -1, 2, -2, 3, -3, ...], n >= 0" - Daniel Forgues, Jun 09 2018 & Jun 12 2018
Generalized k-gonal numbers are the partial sums of the sequence formed by the multiples of (k - 4) and the odd numbers (A005408) interleaved, with k >= 5. - Omar E. Pol, Jul 25 2018
The last digits form a symmetric cycle of length 40 [0, 1, 2, 5, ..., 5, 2, 1, 0], i.e., a(n) == a(n + 40) (mod 10) and a(n) == a(40*k - n - 1) (mod 10), 40*k > n. - Alejandro J. Becerra Jr., Aug 14 2018
Only 2, 5, and 7 are prime. All terms are of the form k*(k+1)/6, where 3 | k or 3 | k+1. For k > 6, the value divisible by 3 must have another factor d > 2, which will remain after the division by 6. - Eric Snyder, Jun 03 2022
8*a(n) is the product of two even numbers one of which is n + n mod 2. - Peter Luschny, Jul 15 2022
a(n) is the dot product of [1, 2, 3, ..., n] and repeat[1, 1/2]. a(5) = 12 = [1, 2, 3, 4, 5] dot [1, 1/2, 1, 1/2, 1] = [1 + 1 + 3 + 2 + 5]. - Gary W. Adamson, Dec 10 2022
Every nonnegative number is the sum of four terms of this sequence [S. Realis]. - N. J. A. Sloane, May 07 2023
|
|
REFERENCES
|
Enoch Haga, A strange sequence and a brilliant discovery, chapter 5 of Exploring prime numbers on your PC and the Internet, first revised ed., 2007 (and earlier ed.), pp. 53-70.
Ross Honsberger, Ingenuity in Mathematics, Random House, 1970, p. 117.
Donald E. Knuth, The Art of Computer Programming, vol. 4A, Combinatorial Algorithms, (to appear), section 7.2.1.4, equation (18).
Ivan Niven and Herbert S. Zuckerman, An Introduction to the Theory of Numbers, 2nd ed., Wiley, NY, 1966, p. 231.
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).
|
|
LINKS
|
Johannes W. Meijer, Euler's Ship on the Pentagonal Sea, pdf and jpg.
S. Realis, Question 271, Nouv. Corresp. Math., 4 (1878) 27-29.
|
|
FORMULA
|
Euler: Product_{n>=1} (1 - x^n) = Sum_{n=-oo..oo} (-1)^n*x^(n*(3*n - 1)/2).
Euler transform of length-3 sequence [2, 2, -1]. - Michael Somos, Mar 24 2011
a(-1 - n) = a(n) for all n in Z. a(2*n) = A005449(n). a(2*n - 1) = A000326(n). - Michael Somos, Mar 24 2011. [The extension of the recurrence to negative indices satisfies the signature (1,2,-2,-1,1), but not the definition of the sequence m*(3*m -1)/2, because there is no m such that a(-1) = 0. - Klaus Purath, Jul 07 2021]
a(n) = 3 + 2*a(n-2) - a(n-4). - Ant King, Aug 23 2011
Product_{k>0} (1 - x^k) = Sum_{k>=0} (-1)^k * x^a(k). - Michael Somos, Mar 24 2011
G.f.: x*(1 + x + x^2)/((1 + x)^2*(1 - x)^3).
Sequence consists of the pentagonal numbers (A000326), followed by A000326(n) + n and then the next pentagonal number. - Jon Perry, Sep 11 2003
a(n) = Sum_{k=1..floor((n+1)/2)} (n - k + 1). - Paul Barry, Sep 07 2005
If n even a(n) = a(n-1) + n/2 and if n odd a(n) = a(n-1) + n, n >= 2. - Pierre CAMI, Dec 09 2007
a(n)-a(n-1) = A026741(n) and it follows that the difference between consecutive terms is equal to n if n is odd and to n/2 if n is even. Hence this is a self-generating sequence that can be simply constructed from knowledge of the first term alone. - Ant King, Sep 26 2011
a(n) = (1/2)*ceiling(n/2)*ceiling((3*n + 1)/2). - Mircea Merca, Jul 13 2012
a(n) = floor((n + 1)/2)*((n + 1) - (1/2)*floor((n + 1)/2) - 1/2). - Wesley Ivan Hurt, Jan 26 2013
a(n) = a(n+14)- A001651(n)*7. (End)
G.f.: x*G(0), where G(k) = 1 + x*(3*k + 4)/(3*k + 2 - x*(3*k + 2)*(3*k^2 + 11*k + 10)/(x*(3*k^2 + 11*k + 10) + (k + 1)*(3*k + 4)/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, Jun 16 2013
a(n) = Sum_{i=1..n} numerator(i/2) = Sum_{i=1..n} denominator(2/i). - Wesley Ivan Hurt, Feb 26 2017
Quadrisection. For r = 0,1,2,3: a(r + 4*k) = 6*k^2 + sqrt(24*a(r) + 1)*k + a(r), for k >= 1, with inputs (k = 0) {0,1,2,5}. These are the sequences A049453(k), A033570(k), A033568(k+1), A049452(k+1), for k >= 0, respectively. - Wolfdieter Lang, Feb 12 2021
a(n) = a(n-4) + sqrt(24*a(n-2) + 1), n >= 4. - Klaus Purath, Jul 07 2021
Sum_{n>=1} (-1)^(n+1)/a(n) = 6*(log(3)-1). - Amiram Eldar, Feb 28 2022
E.g.f.: (x*(7 + 3*x)*cosh(x) + (1 + 5*x + 3*x^2)*sinh(x))/8. - Stefano Spezia, Aug 01 2024
|
|
EXAMPLE
|
G.f. = x + 2*x^2 + 5*x^3 + 7*x^4 + 12*x^5 + 15*x^6 + 22*x^7 + 26*x^8 + 35*x^9 + ...
|
|
MAPLE
|
A001318 := -(1+z+z**2)/(z+1)**2/(z-1)**3; # Simon Plouffe in his 1992 dissertation; gives sequence without initial zero
|
|
MATHEMATICA
|
Table[n*(n+1)/6, {n, Select[Range[0, 100], Mod[#, 3] != 1 &]}]
Select[Accumulate[Range[0, 200]]/3, IntegerQ] (* Harvey P. Dale, Oct 12 2014 *)
CoefficientList[Series[x (1 + x + x^2) / ((1 + x)^2 (1 - x)^3), {x, 0, 70}], x] (* Vincenzo Librandi, Nov 04 2014 *)
LinearRecurrence[{1, 2, -2, -1, 1}, {0, 1, 2, 5, 7}, 70] (* Harvey P. Dale, Jun 05 2017 *)
a[ n_] := With[{m = Quotient[n + 1, 2]}, m (3 m + (-1)^n) / 2]; (* Michael Somos, Jun 02 2018 *)
|
|
PROG
|
(PARI) {a(n) = (3*n^2 + 2*n + (n%2) * (2*n + 1)) / 8}; /* Michael Somos, Mar 24 2011 */
(PARI) {a(n) = if( n<0, n = -1-n); polcoeff( x * (1 - x^3) / ((1 - x) * (1-x^2))^2 + x * O(x^n), n)}; /* Michael Somos, Mar 24 2011 */
(PARI) {a(n) = my(m = (n+1) \ 2); m * (3*m + (-1)^n) / 2}; /* Michael Somos, Jun 02 2018 */
(Sage)
@CachedFunction
if n == 0 : return 0
inc = n//2 if is_even(n) else n
(Magma) [(6*n^2 + 6*n + 1 - (2*n + 1)*(-1)^n)/16 : n in [0..50]]; // Wesley Ivan Hurt, Nov 03 2014
(Magma) [(3*n^2 + 2*n + (n mod 2) * (2*n + 1)) div 8: n in [0..70]]; // Vincenzo Librandi, Nov 04 2014
(Haskell)
a001318 n = a001318_list !! n
(GAP) a:=[0, 1, 2, 5];; for n in [5..60] do a[n]:=2*a[n-2]-a[n-4]+3; od; a; # Muniru A Asiru, Aug 16 2018
(Python)
def a(n):
p = n % 2
return (n + p)*(3*n + 2 - p) >> 3
|
|
CROSSREFS
|
Indices of nonzero terms of A010815, i.e., the (zero-based) indices of 1-bits of the infinite binary word to which the terms of A068052 converge.
Sequences of generalized k-gonal numbers: this sequence (k=5), A000217 (k=6), A085787 (k=7), A001082 (k=8), A118277 (k=9), A074377 (k=10), A195160 (k=11), A195162 (k=12), A195313 (k=13), A195818 (k=14), A277082 (k=15), A274978 (k=16), A303305 (k=17), A274979 (k=18), A303813 (k=19), A218864 (k=20), A303298 (k=21), A303299 (k=22), A303303 (k=23), A303814 (k=24), A303304 (k=25), A316724 (k=26), A316725 (k=27), A303812 (k=28), A303815 (k=29), A316729 (k=30).
|
|
KEYWORD
|
nonn,easy,nice,changed
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|
|
A001788
|
|
a(n) = n*(n+1)*2^(n-2).
(Formerly M4161 N1729)
|
|
+10
108
|
|
|
0, 1, 6, 24, 80, 240, 672, 1792, 4608, 11520, 28160, 67584, 159744, 372736, 860160, 1966080, 4456448, 10027008, 22413312, 49807360, 110100480, 242221056, 530579456, 1157627904, 2516582400, 5452595200, 11777605632
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,3
|
|
COMMENTS
|
Number of 2-dimensional faces in (n+1)-dimensional hypercube; also number of 4-cycles in the (n+1)-dimensional hypercube. - Henry Bottomley, Apr 14 2000
Also the number of edges in the (n+1)-halved cube graph. - Eric W. Weisstein, Jun 21 2017
From Philippe Deléham, Apr 28 2004: a(n) is the sum, over all nonempty subsets E of {1, 2, ..., n}, of all elements of E. E.g., a(3) = 24: the nonempty subsets are {1, 2, 3}, {1, 2}, {1, 3}, {2, 3}, {1}, {2}, {3} and 1 + 2 + 3 + 1 + 2 + 1 + 3 + 2 + 3 + 1 + 2 + 3 = 24.
Equivalently, sum of all nodes (except the last one, equal to n+1) of all integer compositions of n+1. - Olivier Gérard, Oct 22 2011
Take n points on a finite line. They all move with the same constant speed; they instantaneously change direction when they collide with another; and they fall when they quit the line. a(n-1) is the total number of collisions before falling when the initials directions are the 2^n possible. The mean number of collisions is then n(n-1)/8. E.g., a(1)=0 before any collision is possible. a(2)=1 because there is a collision only if the initials directions are, say, right-left. - Emmanuel Moreau, Feb 11 2006
Also number of pericondensed hexagonal systems with n hexagons. For example, if n=5 then the number of pericondensed hexagonal systems with n hexagons is 24. - Parthasarathy Nambi, Sep 06 2006
If X_1,X_2,...,X_n is a partition of a 2n-set X into 2-blocks then, for n>1, a(n-1) is equal to the number of (n+2)-subsets of X intersecting each X_i (i=1,2,...,n). - Milan Janjic, Jul 21 2007
Number of n-permutations of 3 objects u,v,w, with repetition allowed, containing exactly two u's. Example: a(2)=6 because we have uuw, uuv, uwu, uvu, wuu and vuu. - Zerinvary Lajos, Dec 29 2007
For n>0 where [0]={}, the empty set, and [n]={1,2,...n} a(n) is the number of ways to separate [n-1] into three non-overlapping intervals (allowed to be empty) and then choose a subset from each interval. - Geoffrey Critzer, Feb 07 2009
Form an array with m(n,0) = m(0,n) = n^2 and m(i,j) = m(i-1,j-1) + m(i-1,j). Then m(1,n) = A001844(n) and m(n,n) = a(n). - J. M. Bergot, Nov 07 2012
The sum of the number of inversions of all sequences of zeros and ones with length n+1. - Evan M. Bailey, Dec 09 2020
|
|
REFERENCES
|
M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 796.
Clifford A. Pickover, The Math Book, From Pythagoras to the 57th Dimension, 250 Milestones in the History of Mathematics, Sterling Publ., NY, 2009, page 282.
A. P. Prudnikov, Yu. A. Brychkov and O.I. Marichev, "Integrals and Series", Volume 1: "Elementary Functions", Chapter 4: "Finite Sums", New York, Gordon and Breach Science Publishers, 1986-1992.
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).
|
|
LINKS
|
M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards, Applied Math. Series 55, Tenth Printing, 1972 [alternative scanned copy].
C. W. Jones, J. C. P. Miller, J. F. C. Conn, and R. C. Pankhurst, Tables of Chebyshev polynomials, Proc. Roy. Soc. Edinburgh. Sect. A., Vol. 62, No. 2 (1946), pp. 187-203.
Lara Pudwell, Nathan Chenette and Manda Riehl, Statistics on Hypercube Orientations, AMS Special Session on Experimental and Computer Assisted Mathematics, Joint Mathematics Meetings (Denver 2020).
Eric Weisstein's World of Mathematics, Edge Count.
|
|
FORMULA
|
G.f.: x/(1-2*x)^3.
E.g.f.: x*(1 + x)*exp(2*x).
a(n) = 2*a(n-1) + n*2^(n-1) = 2*a(n-1) + A001787(n).
a(n) = Sum_{i=1..n} i^2 * binomial(n, i): binomial transform of A000290. - Yong Kong, Dec 26 2000
a(n) = Sum_{j=0..n} binomial(n+1,j)*(n+1-j)^2. - Zerinvary Lajos, Aug 22 2006
If the leading 0 is deleted, the binomial transform of A001844: (1, 5, 13, 25, 41, ...); = double binomial transform of [1, 4, 4, 0, 0, 0, ...]. - Gary W. Adamson, Sep 02 2007
a(n) = Sum_{1<=i<=k<=n} (-1)^(i+1)*i^2*binomial(n+1,k+i)*binomial(n+1,k-i). - Mircea Merca, Apr 09 2012
a(0)=0, a(1)=1, a(2)=6, a(n) = 6*a(n-1) - 12*a(n-2) + 8*a(n-3). - Harvey P. Dale, Jul 16 2013
a(n) = Sum_{k=0..n-1} Sum_{i=0..n-1} (k+1) * C(n-1,i). - Wesley Ivan Hurt, Sep 20 2017
Sum_{n>=1} 1/a(n) = 4*(1-log(2)).
Sum_{n>=1} (-1)^(n+1)/a(n) = 12*log(3/2) - 4. (End)
|
|
EXAMPLE
|
The nodes of an integer composition are the partial sums of its elements, seen as relative distances between nodes of a 1-dimensional polygon. For a composition of 7 such as 1+2+1+3, the nodes are 0,1,3,4,7. Their sum (without the last node) is 8. The sum of all nodes of all 2^(7-1)=64 integer compositions of 7 is 672.
|
|
MAPLE
|
A001788:=-1/(2*z-1)**3; # Simon Plouffe in his 1992 dissertation; gives sequence without initial zero
|
|
MATHEMATICA
|
CoefficientList[Series[x/(1-2x)^3, {x, 0, 30}], x]
Table[n*(n+1)*2^(n-2), {n, 0, 30}]
With[{n = 30}, Join[{0}, Times @@@ Thread[{Accumulate[Range[n]], 2^Range[0, n - 1]}]]] (* Harvey P. Dale, Jul 16 2013 *)
LinearRecurrence[{6, -12, 8}, {0, 1, 6}, 30] (* Harvey P. Dale, Jul 16 2013 *)
|
|
PROG
|
(PARI) a(n)=if(n<0, 0, 2^n*n*(n+1)/4)
(Sage) [n if n < 2 else n * (n + 1) * 2**(n - 2) for n in range(28)] # Zerinvary Lajos, Mar 10 2009
(Haskell)
a001788 n = if n < 2 then n else n * (n + 1) * 2 ^ (n - 2)
a001788_list = zipWith (*) a000217_list $ 1 : a000079_list
(Magma) [n*(n+1)*2^(n-2): n in [0..30]]; // G. C. Greubel, Aug 27 2019
(GAP) List([0..30], n-> n*(n+1)*2^(n-2)); # G. C. Greubel, Aug 27 2019
|
|
CROSSREFS
|
Sequences similar to the form q^(n-2)*binomial(n, 2): A000217 (q=1), this sequence (q=2), A027472 (q=3), A038845 (q=4), A081135 (q=5), A081136 (q=6), A027474 (q=7), A081138 (q=8), A081139 (q=9), A081140 (q=10), A081141 (q=11), A081142 (q=12), A027476 (q=15).
|
|
KEYWORD
|
nonn,easy,nice
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|
|
A211422
|
|
Number of ordered triples (w,x,y) with all terms in {-n,...,0,...,n} and w^2 + x*y = 0.
|
|
+10
106
|
|
|
1, 9, 17, 25, 41, 49, 57, 65, 81, 105, 113, 121, 137, 145, 153, 161, 193, 201, 225, 233, 249, 257, 265, 273, 289, 329, 337, 361, 377, 385, 393, 401, 433, 441, 449, 457, 505, 513, 521, 529, 545, 553, 561, 569, 585, 609, 617, 625, 657, 713, 753, 761
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,2
|
|
COMMENTS
|
Suppose that S={-n,...,0,...,n} and that f(w,x,y,n) is a function, where w,x,y are in S. The number of ordered triples (w,x,y) satisfying f(w,x,y,n)=0, regarded as a function of n, is a sequence t of nonnegative integers. Sequences such as t/4 may also be integer sequences for all except certain initial values of n. In the following guide, such sequences are indicated in the related sequences column and may be included in the corresponding Mathematica programs.
...
sequence... f(w,x,y,n) ..... related sequences
A211415 ... w^2+x*y-1 ...... t+2, t/4, (t/4-1)/4
A211423 ... w^2+2x*y ....... (t-1)/4
A211424 ... w^2+3x*y ....... (t-1)/4
A211425 ... w^2+4x*y ....... (t-1)/4
A211426 ... 2w^2+x*y ....... (t-1)/4
A211427 ... 3w^2+x*y ....... (t-1)/4
A211428 ... 2w^2+3x*y ...... (t-1)/4
A211429 ... w^3+x*y ........ (t-1)/4
A211430 ... w^2+x+y ........ (t-1)/2
A211431 ... w^3+(x+y)^2 .... (t-1)/2
A211432 ... w^2-x^2-y^2 .... (t-1)/8
A211433 ... w+2x+4y ........ (t-1)/2
A211434 ... w+2x+5y ........ (t-1)/4
A211435 ... w+4x+5y ........ (t-1)/2
A211436 ... 2w+3x+4y ....... (t-1)/2
A211435 ... 2w+3x+5y ....... (t-1)/2
A211439 ... w+3x+3y ........ (t-1)/2
A211440 ... 2w+3x+3y ....... (t-1)/2
...
For the following sequences, S={1,...,n}, rather than
{-n,...,0,...n}. If f(w,x,y,n) is linear in w,x,y,n, then the sequence is a linear recurrence sequence.
A008805 ... w-2x-2y (repeated triangular numbers)
A211546 ... w-3x+3y (triply repeated triangular numbers)
A211547 ... 2w-3x-3y (triply repeated squares)
...
Next, S={-n,...-1,1,...,n}, and the sequence counts the cases (w,x,y) satisfying the indicated inequality. If f(w,x,y,n) is linear in w,x,y,n, then the sequence is a linear recurrence sequence.
A211545 ... w+x+y>0; recurrence degree: 4
A211617 ... 2w+x+y>0; recurrence degree: 5
A211624 ... w+2x+2y>0; recurrence degree: 6
A211625 ... w+3x+3y>0; recurrence degree: 8
A211626 ... w+4x+4y>0; recurrence degree: 10
A211627 ... w+5x+5y>0; recurrence degree: 12
A211628 ... 3w+x+y>0; recurrence degree: 6
A211629 ... 4w+x+y>0; recurrence degree: 7
A211630 ... 5w+x+y>0; recurrence degree: 8
A211631 ... w^2>x^2+y^2; all terms divisible by 8
A211632 ... 2w^2>x^2+y^2; all terms divisible by 8
A211633 ... w^2>2x^2+2y^2; all terms divisible by 8
...
Next, S={1,...,n}, and the sequence counts the cases (w,x,y) satisfying the indicated relation.
|
|
LINKS
|
|
|
EXAMPLE
|
a(1) counts these 9 triples: (-1,-1,1), (-1, 1,-1), (0, -1, 0), (0, 0, -1), (0,0,0), (0,0,1), (0,1,0), (1,-1,1), (1,1,-1).
|
|
MATHEMATICA
|
t[n_] := t[n] = Flatten[Table[w^2 + x*y, {w, -n, n}, {x, -n, n}, {y, -n, n}]]
c[n_] := Count[t[n], 0]
t = Table[c[n], {n, 0, 70}] (* A211422 *)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|
|
A006918
|
|
a(n) = binomial(n+3, 3)/4 for odd n, n*(n+2)*(n+4)/24 for even n.
(Formerly M1349)
|
|
+10
102
|
|
|
0, 1, 2, 5, 8, 14, 20, 30, 40, 55, 70, 91, 112, 140, 168, 204, 240, 285, 330, 385, 440, 506, 572, 650, 728, 819, 910, 1015, 1120, 1240, 1360, 1496, 1632, 1785, 1938, 2109, 2280, 2470, 2660, 2870, 3080, 3311, 3542, 3795, 4048, 4324, 4600, 4900, 5200, 5525, 5850, 6201, 6552, 6930
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,3
|
|
COMMENTS
|
Maximal number of inconsistent triples in a tournament on n+2 nodes [Kac]. - corrected by Leen Droogendijk, Nov 10 2014
a(n-4) is the number of aperiodic necklaces (Lyndon words) with 4 black beads and n-4 white beads.
Number of trees with diameter 4 where at most 2 vertices 1 away from the graph center have degree > 2. - Jon Perry, Jul 11 2003
a(n+1) is the number of partitions of n into parts of two kinds, with at most two parts of each kind. Also a(n-3) is the number of partitions of n with Durfee square of size 2. - Franklin T. Adams-Watters, Jan 27 2006
Factoring the g.f. as x/(1-x)^2 times 1/(1-x^2)^2 we find that the sequence equals (1, 2, 3, 4, ...) convolved with (1, 0, 2, 0, 3, 0, 4, ...), A000027 convolved with its aerated variant. - Gary W. Adamson, May 01 2009
The Kn21, Kn22, Kn23, Fi2 and Ze2 triangle sums, see A180662 for their definitions, of the Connell-Pol triangle A159797 are linear sums of shifted versions of this sequence, e.g., Kn22(n) = a(n+1) + a(n) + 2*a(n-1) + a(n-2) and Fi2(n) = a(n) + 4*a(n-1) + a(n-2). - Johannes W. Meijer, May 20 2011
For n>3, a(n-4) is the number of (w,x,y,z) having all terms in {1,...,n} and w+x+y+z=|x-y|+|y-z|. - Clark Kimberling, May 23 2012
a(n) is the number of (w,x,y) having all terms in {0,...,n} and w+x+y < |w-x|+|x-y|. - Clark Kimberling, Jun 13 2012
For n>0 number of inequivalent (n-1) X 2 binary matrices, where equivalence means permutations of rows or columns or the symbol set. - Alois P. Heinz, Aug 17 2014
Number of partitions p of n+5 such that p[3] = 2. Examples: a(1)=1 because we have (2,2,2); a(2)=2 because we have (2,2,2,1) and (3,2,2); a(3)=5 because we have (2,2,2,1,1), (2,2,2,2), (3,2,2,1), (3,3,2), and (4,2,2). See the R. P. Stanley reference. - Emeric Deutsch, Oct 28 2014
a(n) is the number of 2413-avoiding odd Grassmannian permutations of size n+1. - Juan B. Gil, Mar 09 2023
|
|
REFERENCES
|
J. M. Borwein, D. H. Bailey and R. Girgensohn, Experimentation in Mathematics, A K Peters, Ltd., Natick, MA, 2004. x+357 pp. See p. 147.
M. Kac, An example of "counting without counting", Philips Res. Reports, 30 (1975), 20*-22* [Special issue in honour of C. J. Bouwkamp].
E. V. McLaughlin, Numbers of factorizations in non-unique factorial domains, Senior Thesis, Allegeny College, Meadville, PA, 2004.
K. B. Reid and L. W. Beineke "Tournaments", pp. 169-204 in L. W. Beineke and R. J. Wilson, editors, Selected Topics in Graph Theory, Academic Press, NY, 1978, p. 186, Theorem 6.11.
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
R. P. Stanley, Enumerative Combinatorics, Cambridge, Vol. 1, 2nd ed., 2012, Exercise 4.16, pp. 530, 552.
W. A. Whitworth, DCC Exercises in Choice and Chance, Stechert, NY, 1945, p. 33.
|
|
LINKS
|
B. G. Eke, Monotonic triads, Discrete Math., Vol. 9, No. 4 (1974), pp. 359-363. MR0354390 (50 #6869)
|
|
FORMULA
|
G.f.: x/((1-x)^2*(1-x^2)^2) = x/((1+x)^2*(1-x)^4).
0, 0, 0, 1, 2, 5, 8, 14, ... has a(n) = (Sum_{k=0..n} floor(k(n-k)/2))/2. - Paul Barry, Sep 14 2003
0, 0, 0, 0, 0, 1, 2, 5, 8, 14, 20, 30, 40, 55, ... has a(n) = binomial(floor(1/2 n), 3) + binomial(floor(1/2 n + 1/2), 3) [Eke]. - N. J. A. Sloane, May 12 2012
a(0)=0, a(1)=1, a(n) = (2/(n-1))*a(n-1) + ((n+3)/(n-1))*a(n-2). - Benoit Cloitre, Jun 28 2004
a(n) = floor(binomial(n+4, 4)/(n+4)) - floor((n+2)/8)(1+(-1)^n)/2. - Paul Barry, Jan 01 2005
Linear recurrence: a(n) = 2a(n-1) + a(n-2) - 4a(n-3) + a(n-4) + 2a(n-5) - a(n-6). - Jaume Oliver Lafont, Dec 05 2008
Euler transform of length 2 sequence [2, 2]. - Michael Somos, Aug 15 2009
a(n) = -a(-4-n) for all n in Z.
E.g.f.: (x*(18 + 9*x + x^2)*cosh(x) + (6 + 15*x + 9*x^2 + x^3)*sinh(x))/24. - Stefano Spezia, Dec 07 2021
Sum_{n>=1} 1/a(n) = 75/4 - 24*log(2).
Sum_{n>=1} (-1)^(n+1)/a(n) = 69/4 - 24*log(2). (End)
|
|
EXAMPLE
|
G.f. = x + 2*x^2 + 5*x^3 + 8*x^4 + 14*x^5 + 20*x^6 + 30*x^7 + 40*x^8 + 55*x^9 + ...
The a(4 - 3) = 1 through a(8 - 3) = 14 integer partitions with Durfee square of length 2 are the following (see Franklin T. Adams-Watters's second comment). The Heinz numbers of these partitions are given by A325164.
(22) (32) (33) (43) (44)
(221) (42) (52) (53)
(222) (322) (62)
(321) (331) (332)
(2211) (421) (422)
(2221) (431)
(3211) (521)
(22111) (2222)
(3221)
(3311)
(4211)
(22211)
(32111)
(221111)
The a(0 + 1) = 1 through a(4 + 1) = 14 integer partitions of n into parts of two kinds with at most two parts of each kind are the following (see Franklin T. Adams-Watters's first comment).
()() ()(1) ()(2) ()(3) ()(4)
(1)() (2)() (3)() (4)()
()(11) (1)(2) (1)(3)
(1)(1) ()(21) ()(22)
(11)() (2)(1) (2)(2)
(21)() (22)()
(1)(11) ()(31)
(11)(1) (3)(1)
(31)()
(11)(2)
(1)(21)
(2)(11)
(21)(1)
(11)(11)
The a(6 - 5) = 1 through a(10 - 5) = 14 integer partitions whose third part is 2 are the following (see Emeric Deutsch's comment). The Heinz numbers of these partitions are given by A307373.
(222) (322) (332) (432) (442)
(2221) (422) (522) (532)
(2222) (3222) (622)
(3221) (3321) (3322)
(22211) (4221) (4222)
(22221) (4321)
(32211) (5221)
(222111) (22222)
(32221)
(33211)
(42211)
(222211)
(322111)
(2221111)
(End)
|
|
MAPLE
|
with(combstruct):ZL:=[st, {st=Prod(left, right), left=Set(U, card=r), right=Set(U, card=r), U=Sequence(Z, card>=3)}, unlabeled]: subs(r=1, stack): seq(count(subs(r=2, ZL), size=m), m=11..58) ; # Zerinvary Lajos, Mar 09 2007
if type(n, 'even') then
n*(n+2)*(n+4)/24 ;
else
binomial(n+3, 3)/4 ;
fi ;
|
|
MATHEMATICA
|
f[n_]:=If[EvenQ[n], (n(n+2)(n+4))/24, Binomial[n+3, 3]/4]; Join[{0}, Array[f, 60]] (* Harvey P. Dale, Apr 20 2011 *)
durf[ptn_]:=Length[Select[Range[Length[ptn]], ptn[[#]]>=#&]];
Table[Length[Select[IntegerPartitions[n], durf[#]==2&]], {n, 0, 30}] (* Gus Wiseman, Apr 06 2019 *)
|
|
PROG
|
(PARI) { parttrees(n)=local(pt, k, nk); if (n%2==0, pt=(n/2+1)^2, pt=ceil(n/2)*(ceil(n/2)+1)); pt+=floor(n/2); for (x=1, floor(n/2), pt+=floor(x/2)+floor((n-x)/2)); if (n%2==0 && n>2, pt-=floor(n/4)); k=1; while (3*k<=n, for (x=k, floor((n-k)/2), pt+=floor(k/2); if (x!=k, pt+=floor(x/2)); if ((n-x-k)!=k && (n-x-k)!=x, pt+=floor((n-x-k)/2))); k++); pt }
(PARI) {a(n) = n += 2; (n^3 - n * (2-n%2)^2) / 24}; /* Michael Somos, Aug 15 2009 */
(Haskell)
a006918 n = a006918_list !! n
a006918_list = scanl (+) 0 a008805_list
(Magma) [Floor(Binomial(n+4, 4)/(n+4))-Floor((n+2)/8)*(1+(-1)^n)/2: n in [0..60]]; // Vincenzo Librandi, Nov 10 2014
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,nice,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
Search completed in 0.049 seconds
|