Displaying 91-100 of 361 results found.
page
1
...
5
6
7
8
9
10
11
12
13
14
15
... 37
Integers with one or two 1-bits in their binary expansion.
+10
34
1, 2, 3, 4, 5, 6, 8, 9, 10, 12, 16, 17, 18, 20, 24, 32, 33, 34, 36, 40, 48, 64, 65, 66, 68, 72, 80, 96, 128, 129, 130, 132, 136, 144, 160, 192, 256, 257, 258, 260, 264, 272, 288, 320, 384, 512, 513, 514, 516, 520, 528, 544, 576, 640, 768, 1024, 1025, 1026, 1028, 1032
COMMENTS
Apart from initial 1, sums of two not necessarily distinct powers of 2.
4 does not divide C(2s-1,s) (= A001700[ s ]) if and only if s=a(n).
Possible number of sides of a regular polygon such that there exists a triangulation where each triangle is isosceles. - Sen-peng Eu, May 07 2008
Also numbers n such that n!/2^(n-2) is an integer. - Michel Lagneau, Mar 28 2011
Numbers with binary weight 1 or 2. - Omar E. Pol, Feb 22 2015
FORMULA
a(0) = 1, a(n) = (2^(trinv(n-1)-1) + 2^((n-1)-((trinv(n-1)*(trinv(n-1)-1))/2))), i.e., 2^ A003056(n) + 2^ A002262(n-1) (the latter sequence contains the definition of trinv).
Let Theta = Sum_{k >= 0} x^(2^k). Then Sum_{n>=1} x^a(n) = (Theta^2 + Theta + x)/2. - N. J. A. Sloane, Jun 23 2009
EXAMPLE
Also, written as a triangle T(j,k), k >= 1, in which row lengths are the terms of A028310:
1;
2;
3, 4;
5, 6, 8;
9, 10, 12, 16;
17, 18, 20, 24, 32;
33, 34, 36, 40, 48, 64;
65, 66, 68, 72, 80, 96, 128;
...
It appears that column 1 is A094373.
It appears that the right border gives A000079.
It appears that the first differences in every row that contains at least two terms give the first h-1 powers of 2, where h is the length of the row.
(End)
MAPLE
lincom:=proc(a, b, n) local i, j, s, m; s:={}; for i from 0 to n do for j from 0 to n do m:=a^i+b^j; if m<=n then s:={op(s), m} fi od; od; lprint(sort([op(s)])); end: lincom(2, 2, 1000); # Zerinvary Lajos, Feb 24 2007
PROG
(Haskell)
import Data.List (insert)
a048645 n k = a048645_tabl !! (n-1) !! (k-1)
a048645_row n = a048645_tabl !! (n-1)
a048645_tabl = iterate (\xs -> insert (2 * head xs + 1) $ map ((* 2)) xs) [1]
a048645_list = concat a048645_tabl
(PARI) isok(n) = my(hw = hammingweight(n)); (hw == 1) || (hw == 2); \\ Michel Marcus, Mar 06 2016
(PARI) a(n) = if(n <= 2, return(n), n-=2); my(c = (sqrtint(8*n + 1) - 1) \ 2); 1 << c + 1 << (n - binomial(c + 1, 2)) \\ David A. Corneth, Jan 02 2019
(PARI) nxt(n) = msb = 1 << logint(n, 2); if(n == msb, n + 1, t = n - msb; n + t) \\ David A. Corneth, Jan 02 2019
(Python)
def ok(n): return 1 <= bin(n)[2:].count('1') <= 2
(Python)
from itertools import count, islice
def agen(): # generator of terms
for d in count(0):
msb = 2**d
yield msb
for lsb in range(d):
yield msb + 2**lsb
(Python)
from math import isqrt, comb
def A048645(n): return (1<<(m:=isqrt(n-1<<3)+1>>1)-1)+(1<<(n-2-comb(m, 2))) if n>1 else 1 # Chai Wah Wu, Oct 30 2024
CROSSREFS
Cf. A018900, A048623, A046097, A169707, A147562, A162795, A003056, A002262, A094373, A028310, A179951.
Irregular triangle read by rows in which row n is constructed with an algorithm using the n-th row of triangle A196020 (see Comments for precise definition).
+10
34
1, 3, 2, 2, 7, 0, 3, 3, 11, 0, 1, 4, 4, 0, 15, 0, 0, 5, 5, 3, 9, 0, 0, 9, 6, 6, 0, 0, 23, 0, 5, 0, 7, 7, 0, 0, 12, 0, 0, 12, 8, 8, 7, 0, 1, 31, 0, 0, 0, 0, 9, 9, 0, 0, 0, 35, 0, 2, 2, 0, 10, 10, 0, 0, 0, 39, 0, 0, 0, 3, 11, 11, 5, 0, 0, 5, 18, 0, 0, 18, 0, 0, 12, 12, 0, 0, 0, 0, 47, 0, 13, 0, 0, 0
COMMENTS
For the construction of the n-th row of this triangle start with a copy of the n-th row of the triangle A196020.
Then replace each element of the m-th pair of positive integers (x, y) with the value (x - y)/2, where "y" is the m-th even-indexed term of the row, and "x" is its previous nearest odd-indexed term not used in another pair in the same row, if such a pair exist. Otherwise T(n,k) = A196020(n,k). (See example).
Observation 1: at least for the first 28 rows of the triangle the nonzero terms in the n-th row are also the subparts of the symmetric representation of sigma(n), assuming the ordering of the subparts in the same row does not matter.
Question 1: are always the nonzero terms of the n-th row the same as all the subparts of the symmetric representation of sigma(n)? If not, what is the index of the row in which appears the first counterexample?
Note that the "subparts" are the regions that arise after the dissection of the symmetric representation of sigma(n) into successive layers of width 1.
About the question 1, it appears that the n-th row of the triangle A280851 and the n-th row of this triangle contain the same nonzero numbers, though in different order; checked through n = 250000. - Hartmut F. W. Hoft, Jan 31 2018
Observation 2: at least for the first 28 rows of the triangle we have that in the n-th row the odd-indexed terms, from left to right, together with the even-indexed terms, from right to left, form a finite sequence in which the nonzero terms are the same as the n-th row of triangle A280851, which lists the subparts of the symmetric representation of sigma(n).
Question 2: Are always the same for all rows? If not, what is the index of the row in which appears the first counterexample? (End)
Conjecture: the odd-indexed terms of the n-th row together with the even-indexed terms of the same row but listed in reverse order give the n-th row of triangle A296508 (this is the same conjecture from A296508). - Omar E. Pol, Apr 20 2018
EXAMPLE
Triangle begins (rows 1..28):
1;
3;
2, 2;
7, 0;
3, 3;
11, 0, 1;
4, 4, 0;
15, 0, 0;
5, 5, 3;
9, 0, 0, 9;
6, 6, 0, 0;
23, 0, 5, 0;
7, 7, 0, 0;
12, 0, 0, 12;
8, 8, 7, 0, 1;
31, 0, 0, 0, 0;
9, 9, 0, 0, 0;
35, 0, 2, 2, 0;
10, 10, 0, 0, 0;
39, 0, 0, 0, 3;
11, 11, 5, 0, 0, 5;
18, 0, 0, 18, 0, 0;
12, 12, 0, 0, 0, 0;
47, 0, 13, 0, 0, 0;
13, 13, 0, 0, 5, 0;
21, 0, 0, 21, 0, 0;
14, 14, 6, 0, 0, 6;
55, 0, 0, 0, 0, 0, 1;
...
An example of the algorithm.
For n = 75, the construction of the 75th row of this triangle is as shown below:
.
75th row of A196020: [149, 73, 47, 0, 25, 19, 0, 0, 0, 5, 0]
.
Odd-indexed terms: 149 47 25 0 0 0
Even-indexed terms: 73 0 19 0 5
.
First even-indexed nonzero term: 73
First pair: 149 73
. *----*
Difference: 149 - 73 = 76
76/2 = 38 *----*
New first pair: 38 38
.
Second even-indexed nonzero term: 19
Second pair: 25 19
. *---*
Difference: 25 - 19 = 6
6/2 = 3 *---*
New second pair: 3 3
.
Third even-indexed nonzero term: 5
Third pair: 47 5
. *----------------------*
Difference: 47 - 5 = 42
42/2 = 21 *----------------------*
New third pair: 21 21
.
So the 75th row
of this triangle is [38, 38, 21, 0, 3, 3, 0, 0, 0, 21, 0]
.
On the other hand, the 75th row of A237593 is [38, 13, 7, 4, 3, 3, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 3, 3, 4, 7, 13, 38], and the 74th row of the same triangle is [38, 13, 6, 5, 3, 2, 2, 1, 2, 1, 1, 1, 1, 2, 1, 2, 2, 3, 5, 6, 13, 38], therefore between both symmetric Dyck paths (described in A237593 and A279387) there are six subparts: [38, 38, 21, 21, 3, 3]. (The diagram of the symmetric representation of sigma(75) is too large to include.) At least in this case the nonzero terms of the 75th row of the triangle coincide with the subparts of the symmetric representation of sigma(75). The ordering of the elements does not matter.
Continuing with the original example, in the 75th row of this triangle we have that the odd-indexed terms, from left to right, together with the even-indexed terms, from right to left, form the finite sequence [38, 21, 3, 0, 0, 0, 21, 0, 3, 0, 38] which is the 75th row of a triangle. At least in this case the nonzero terms coincide with the 75th row of triangle A280851: [38, 21, 3, 21, 3, 38], which lists the six subparts of the symmetric representation of sigma(75) in order of appearance from left to right. - Omar E. Pol, Feb 02 2018
In accordance with the conjecture from the Comments section, the finite sequence [38, 21, 3, 0, 0, 0, 21, 0, 3, 0, 38] mentioned above should be the 75th row of triangle A296508. - Omar E. Pol, Apr 20 2018
MATHEMATICA
(* functions row[], line[] and their support are defined in A196020 *)
(* maintain a stack of odd indices with nonzero entries for matching *)
a280850[n_] := Module[{a=line[n], r=row[n], stack={1}, i, j, b}, For[i=2, i<=r, i++, If[a[[i]]!=0, If[OddQ[i], AppendTo[stack, i], j=Last[stack]; b=(a[[j]]-a[[i]])/2; a[[i]]=b; a[[j]]=b; stack=Drop[stack, -1]]]]; a]
Flatten[Map[a280850, Range[24]]] (* data *)
TableForm[Map[a280850, Range[28]], TableDepth->2] (* triangle in Example *)
CROSSREFS
The number of positive terms in row n is A001227(n).
Cf. A196020, A235791, A236104, A237048, A237270, A237591, A237593, A239657, A239660, A244050, A245092, A250068, A250070, A261699, A262626, A279387, A279388, A279391, A280851, A296508.
Twice second pentagonal numbers.
+10
31
0, 4, 14, 30, 52, 80, 114, 154, 200, 252, 310, 374, 444, 520, 602, 690, 784, 884, 990, 1102, 1220, 1344, 1474, 1610, 1752, 1900, 2054, 2214, 2380, 2552, 2730, 2914, 3104, 3300, 3502, 3710, 3924, 4144, 4370, 4602, 4840, 5084, 5334, 5590, 5852, 6120, 6394, 6674, 6960, 7252, 7550, 7854
COMMENTS
Write 1,2,3,4,... in a hexagonal spiral around 0, then a(n) is the sequence found by reading the line from 0 in the direction 0,4,... . The spiral begins:
.
52
. \
33--32--31--30 51
/ . \ \
34 16--15--14 29 50
/ / . \ \ \
35 17 5---4 13 28 49
/ / / . \ \ \ \
36 18 6 0 3 12 27 48
/ / / / / / / /
37 19 7 1---2 11 26 47
\ \ \ / / /
38 20 8---9--10 25 46
\ \ / /
39 21--22--23--24 45
\ /
40--41--42--43--44
(End)
Number of edges in the join of the complete bipartite graph of order 2n and the cycle graph of order n, K_n,n * C_n. - Roberto E. Martinez II, Jan 07 2002
The average of the first n elements starting from a(1) is equal to (n+1)^2. - Mario Catalani (mario.catalani(AT)unito.it), Apr 10 2003
If Y is a 4-subset of an n-set X then, for n >= 4, a(n-4) is the number of (n-4)-subsets of X having either one element or two elements in common with Y. - Milan Janjic, Dec 28 2007
With offset 1: the maximum possible sum of numbers in an N x N standard Minesweeper grid. - Dmitry Kamenetsky, Dec 14 2008
a(n) = A001399(6*n-2), number of partitions of 6*n-2 into parts < 4. For example a(2)=14 where the partitions of 6*2-2=10 into parts < 4 are [1,1,1,1,1,1,1,1,1,1], [1,1,1,1,1,1,1,1,2], [1,1,1,1,1,1,1,3], [1,1,1,1,1,1,2,2], [1,1,1,1,1,2,3], [1,1,1,1,2,2,2], [1,1,1,1,3,3], [1,1,1,2,2,3], [1,1,2,2,2,2], [1,1,2,3,3], [1,2,2,2,3], [2,2,2,2,2], [1,3,3,3], [2,2,3,3]. - Adi Dani, Jun 07 2011
A003056 is the following array A read by antidiagonals:
0, 1, 2, 3, 4, 5, ...
1, 2, 3, 4, 5, 6, ...
2, 3, 4, 5, 6, 7, ...
3, 4, 5, 6, 7, 8, ...
4, 5, 6, 7, 8, 9, ...
5, 6, 7, 8, 9, 10, ...
and a(n) is the hook sum Sum_{k=0..n} A(n,k) + Sum_{r=0..n-1} A(r,n). - R. J. Mathar, Jun 30 2013
a(n)*Pi is the total length of 3 points circle center spiral after n rotations. The spiral length at each rotation (L(n)) is A016957. The spiral length ratio rounded down [floor(L(n)/L(1))] is A001651. See illustration in links. - Kival Ngaokrajang, Dec 27 2013
For n >= 1, the continued fraction expansion of sqrt(27*a(n)) is [9n+1; {2, 2n-1, 1, 4, 1, 2n-1, 2, 18n+2}]. - Magus K. Chu, Oct 13 2022
REFERENCES
L. B. W. Jolley, Summation of Series, Dover Publications, 1961, p. 12.
FORMULA
a(n) = n*(3*n+1).
G.f.: 2*x*(2+x)/(1-x)^3.
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3) with a(0) = 0, a(1) = 4, a(2) = 14. - Philippe Deléham, Mar 26 2013
a(n) = Sum_{i = 2..5} P(i,n), where P(i,m) = m*((i-2)*m-(i-4))/2. - Bruno Berselli, Jul 04 2018
Sum_{n>=1} 1/a(n) = 3 - Pi/(2*sqrt(3)) - 3*log(3)/2.
Sum_{n>=1} (-1)^(n+1)/a(n) = Pi/sqrt(3) + 2*log(2) - 3. (End)
EXAMPLE
From Dmitry Kamenetsky, Dec 14 2008, with slight rewording by Raymond Martineau (mart0258(AT)yahoo.com), Dec 16 2008: (Start)
For an N x N Minesweeper grid the highest sum of numbers is (N-1)(3*N-2). This is achieved by filling every second row with mines (shown as 'X'). For example, when N=5 the best grids are:
.
X X X X X
4 6 6 6 4
X X X X X
4 6 6 6 4
X X X X X
.
and
.
2 3 3 3 2
X X X X X
4 6 6 6 4
X X X X X
2 3 3 3 2
.
each giving a total of 52. (End)
MATHEMATICA
Table[n(3n+1), {n, 0, 55}] (* or *) CoefficientList[Series[2x(2+x)/(1-x)^3, {x, 0, 55}], x] (* Michael De Vlieger, Apr 05 2017 *)
CROSSREFS
Similar sequences are listed in A316466.
AUTHOR
Joe Keane (jgk(AT)jgk.org)
Irregular triangle read by rows in which row n lists the elements of row n of A249223 and then the elements of the same row in reverse order.
+10
31
1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 2, 2, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 2, 2, 2, 2, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 1, 1, 2, 2, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
COMMENTS
The n-th row of the triangle has length 2* A003056(n).
The entries in the n-th row of the triangle are the widths of the regions between the (n-1)-st and n-th Dyck paths for the symmetric representation of sigma(n) with each column representing the corresponding leg of the n-th path.
EXAMPLE
n\k 1 2 3 4 5 6 7 8 9 10
1 1 1
2 1 1
3 1 0 0 1
4 1 1 1 1
5 1 0 0 1
6 1 1 2 2 1 1
7 1 0 0 0 0 1
8 1 1 1 1 1 1
9 1 0 1 1 0 1
10 1 1 1 0 0 1 1 1
11 1 0 0 0 0 0 0 1
12 1 1 2 2 2 2 1 1
13 1 0 0 0 0 0 0 1
14 1 1 1 0 0 1 1 1
15 1 0 1 1 2 2 1 1 0 1
16 1 1 1 1 1 1 1 1 1 1
17 1 0 0 0 0 0 0 0 0 1
18 1 1 2 1 1 1 1 2 1 1
19 1 0 0 0 0 0 0 0 0 1
20 1 1 1 1 2 2 1 1 1 1
...
The triangle shows that the region between a Dyck path for n and n-1 has width 1 if n is a power of 2. For n a prime the region is a horizontal rectangle of width (height) 1 and the vertical rectangle of width 1 which is its reflection. The Dyck paths and regions are shown below for n = 1..5 (see the A237593 example for n = 1..28):
_ _ _
5 |_ _ _|
4 |_ _ |_ _
3 |_ _|_ | |
2 |_ | | | |
1 |_|_|_|_|_|
MATHEMATICA
(* functions a237048[ ] and row[ ] are defined in A237048 *)
f[n_] :=Drop[FoldList[Plus, 0, Map[(-1)^(#+1)&, Range[row[n]]] a237048[n]], 1]
a262045[n_]:=Join[f[n], Reverse[f[n]]]
Flatten[Map[a262045, Range[16]]](* data *)
CROSSREFS
Cf. A000203, A003056, A196020, A236104, A237048, A237270, A237271, A237591, A237593, A249223, A262048.
Multiplication table read by antidiagonals: T(i,j) = i*j (i>=0, j>=0). Alternatively, multiplication triangle read by rows: P(i,j) = j*(i-j) (i>=0, 0<=j<=i).
+10
29
0, 0, 0, 0, 1, 0, 0, 2, 2, 0, 0, 3, 4, 3, 0, 0, 4, 6, 6, 4, 0, 0, 5, 8, 9, 8, 5, 0, 0, 6, 10, 12, 12, 10, 6, 0, 0, 7, 12, 15, 16, 15, 12, 7, 0, 0, 8, 14, 18, 20, 20, 18, 14, 8, 0, 0, 9, 16, 21, 24, 25, 24, 21, 16, 9, 0, 0, 10, 18, 24, 28, 30, 30, 28, 24, 18, 10, 0, 0, 11, 20, 27, 32, 35, 36, 35, 32, 27, 20, 11, 0, 0, 12, 22, 30, 36, 40, 42, 42, 40, 36, 30
COMMENTS
Table of x*y, where (x,y) = (0,0),(0,1),(1,0),(0,2),(1,1),(2,0),...
Or, triangle read by rows, in which row n gives the numbers 0, n*1, (n-1)*2, (n-2)*3, ..., 2*(n-1), 1*n, 0.
Letting T(n,k) be the (k+1)st entry in the (n+1)st row (same numbering used for Pascal's triangle), T(n,k) is the dimension of the space of all k-dimensional subspaces of a (fixed) n-dimensional real vector space. - Paul Boddington, Oct 21 2003
Triangle P(n,k), 0<=k<=n, equals n^2 x the variance of a binary data set with k zeros and (n-k) ones. [For the case when n=0, let the variance of the empty set be defined as 0.]
P(n,k) is also the number of ways to form an opposite-sex dance couple from k women and (n-k) men. (End)
P(n,k) is the number of negative products of two numbers from a set of n real numbers, k of which are negative. - Logan Pipes, Jul 08 2021
FORMULA
a(n) = (3/4 + n)*t^2 - (1/4)*t^4 - (1/2)*t - n^2 - n, where t = floor(sqrt(2*n+1)+1/2). (End)
P(n,k) = (P(n-1,k-1) + P(n-1,k) + n) / 2. - Robert FERREOL, Jan 16 2020
G.f. as array: x*y/((1 - x)^2*(1 - y)^2).
E.g.f. as array: exp(x+y)*x*y. (End)
EXAMPLE
As the triangle P, sequence begins:
0;
0,0;
0,1,0;
0,2,2,0;
0,3,4,3,0;
0,4,6,6,4,0,;
0,5,8,9,8,5,0;
...
P(5,2)=T(2,3)=6 since the variance of the data set <0,0,1,1,1> equals 6/25.
P(5,2)=6 since, with 2 women, say Alice and Betty, and with 3 men, say Charles, Dennis, and Ed, the dance couple is one of the following: {Alice, Charles}, {Alice, Dennis}, {Alice, Ed}, {Betty, Charles}, {Betty, Dennis} and {Betty, Ed}. (End)
CROSSREFS
See A003991 for another version with many more comments.
Triangle read by rows: row n counts down from n in steps of 2, then counts up the remaining elements in the set {1,2,...,n}, again in steps of 2.
+10
28
1, 2, 1, 3, 1, 2, 4, 2, 1, 3, 5, 3, 1, 2, 4, 6, 4, 2, 1, 3, 5, 7, 5, 3, 1, 2, 4, 6, 8, 6, 4, 2, 1, 3, 5, 7, 9, 7, 5, 3, 1, 2, 4, 6, 8, 10, 8, 6, 4, 2, 1, 3, 5, 7, 9, 11, 9, 7, 5, 3, 1, 2, 4, 6, 8, 10, 12, 10, 8, 6, 4, 2, 1, 3, 5, 7, 9, 11, 13, 11, 9, 7, 5, 3, 1, 2, 4, 6, 8, 10, 12, 14, 12, 10
COMMENTS
Triangle read by rows in which row n lists the number of pairs of states of the subshells of the n-th shell of the nuclear shell model ordered by energy level in increasing order.
Row n lists a permutation of the first n positive integers.
If n is odd then row n lists the first (n+1)/2 odd numbers in decreasing order together with the first (n-1)/2 positive even numbers.
If n is even then row n lists the first n/2 even numbers in decreasing order together with the first n/2 odd numbers.
Row n >= 2, with its floor(n/2) last numbers taken as negative, lists the n different eigenvalues (in decreasing order) of the odd graph O(n). The odd graph O(n) has the (n-1)-subsets of a (2*n-1)-set as vertices, with two (n-1)-subsets adjacent if and only if they are disjoint. For example, O(3) is isomorphic to the Petersen graph. - Miquel A. Fiol, Apr 07 2024
LINKS
Eric Weisstein's World of Mathematics, Odd graph
FORMULA
T(1,1) = 1; for n > 1: T(n,1) = T(n-1,1)+1 and T(n,k) = T(n-1,n-k+1), 1 < k <= n. - Reinhard Zumkeller, Dec 03 2012
a(n) = |2*n - t^2 - 2*t - 3| + floor((2*n - t^2 - t)/(t+3)) where t = floor((-1+sqrt(8*n-7))/2). (End)
EXAMPLE
A geometric model of the atomic nucleus:
......-------------------------------------------------
......|...-----------------------------------------...|
......|...|...---------------------------------...|...|
......|...|...|...-------------------------...|...|...|
......|...|...|...|...-----------------...|...|...|...|
......|...|...|...|...|...---------...|...|...|...|...|
......|...|...|...|...|...|...-...|...|...|...|...|...|
......i...h...g...f...d...p...s...p...d...f...g...h...i
......|...|...|...|...|...|.......|...|...|...|...|...|
......|...|...|...|...|.......1.......|...|...|...|...|
......|...|...|...|.......2.......1.......|...|...|...|
......|...|...|.......3.......1.......2.......|...|...|
......|...|.......4.......2.......1.......3.......|...|
......|.......5.......3.......1.......2.......4.......|
..........6.......4.......2.......1.......3.......5....
......7.......5.......3.......1.......2.......4.......6
.......................................................
...13/2.11/2.9/2.7/2.5/2.3/2.1/2.1/2.3/2.5/2.7/2.9/2.11/2
......|...|...|...|...|...|...|...|...|...|...|...|...|
......|...|...|...|...|...|...-----...|...|...|...|...|
......|...|...|...|...|...-------------...|...|...|...|
......|...|...|...|...---------------------...|...|...|
......|...|...|...-----------------------------...|...|
......|...|...-------------------------------------...|
......|...---------------------------------------------
.
Triangle begins:
1;
2, 1;
3, 1, 2;
4, 2, 1, 3;
5, 3, 1, 2, 4;
6, 4, 2, 1, 3, 5;
7, 5, 3, 1, 2, 4, 6;
8, 6, 4, 2, 1, 3, 5, 7;
9, 7, 5, 3, 1, 2, 4, 6, 8;
10, 8, 6, 4, 2, 1, 3, 5, 7, 9;
...
Also:
1;
2, 1;
3, 1, 2;
4, 2, 1, 3;
5, 3, 1, 2, 4;
6, 4, 2, 1, 3, 5;
7, 5, 3, 1, 2, 4, 6;
8, 6, 4, 2, 1, 3, 5, 7;
9, 7, 5, 3, 1, 2, 4, 6, 8;
10, 8, 6, 4, 2, 1, 3, 5, 7, 9;
...
In this view each column contains the same numbers.
Eigenvalues of the odd graphs O(n) for n=2..10:
2, -1;
3, 1, -2;
4, 2, -1, -3;
5, 3, 1, -2, -4;
6, 4, 2, -1, -3, -5;
7, 5, 3, 1, -2, -4, -6;
8, 6, 4, 2, -1, -3, -5, -7;
9, 7, 5, 3, 1, -2, -4, -6, -8;
10, 8, 6, 4, 2, -1, -3, -5, -7, -9;
... (End)
MAPLE
if k <= (n+1)/2 then
n-2*(k-1) ;
else
1-n+2*(k-1) ;
end if;
MATHEMATICA
t[n_, 1] := n; t[n_, n_] := n-1; t[n_, k_] := Abs[2*k-n - If[2*k <= n+1, 2, 1]]; Table[t[n, k], {n, 1, 14}, {k, 1, n}] // Flatten (* Jean-François Alcover, Oct 03 2013, from abs( A056951) *)
PROG
(Haskell)
a130517 n k = a130517_tabl !! (n-1) !! (k-1)
a130517_row n = a130517_tabl !! (n-1)
a130517_tabl = iterate (\row -> (head row + 1) : reverse row) [1]
(PARI) a130517_row(n) = my(v=vector(n), s=1, n1=0, n2=n+1); forstep(k=n, 1, -1, s=-s; if(s>0, n2--; v[n2]=k, n1++; v[n1]=k)); v \\ Hugo Pfoertner, Aug 26 2024
Triangle read by rows: T(n,k), n >= 1, k >= 1, in which column k lists the positive integers interleaved with k-1 zeros, and the first element of column k is in row k(k+1)/2.
+10
27
1, 2, 3, 1, 4, 0, 5, 2, 6, 0, 1, 7, 3, 0, 8, 0, 0, 9, 4, 2, 10, 0, 0, 1, 11, 5, 0, 0, 12, 0, 3, 0, 13, 6, 0, 0, 14, 0, 0, 2, 15, 7, 4, 0, 1, 16, 0, 0, 0, 0, 17, 8, 0, 0, 0, 18, 0, 5, 3, 0, 19, 9, 0, 0, 0, 20, 0, 0, 0, 2, 21, 10, 6, 0, 0, 1, 22, 0, 0, 4, 0, 0, 23, 11, 0, 0, 0, 0, 24, 0, 7, 0, 0, 0
COMMENTS
The number of positive terms in row n is A001227(n).
If n = 2^j then the only positive integer in row n is T(n,1) = n
If n is an odd prime then the only two positive integers in row n are T(n,1) = n and T(n,2) = (n - 1)/2.
Conjecture 1: T(n,k) is the smallest part of the partition of n into k consecutive parts, if T(n,k) > 0.
Conjecture 2: the last positive integer in the row n is in the column A109814(n). (End)
FORMULA
T(n,k) = floor((1 + A196020(n,k))/2).
EXAMPLE
Triangle begins:
1;
2;
3, 1;
4, 0;
5, 2;
6, 0, 1;
7, 3, 0;
8, 0, 0;
9, 4, 2;
10, 0, 0, 1;
11, 5, 0, 0;
12, 0, 3, 0;
13, 6, 0, 0;
14, 0, 0, 2;
15, 7, 4, 0, 1;
16, 0, 0, 0, 0;
17, 8, 0, 0, 0;
18, 0, 5, 3, 0;
19, 9, 0, 0, 0;
20, 0, 0, 0, 2;
21, 10, 6, 0, 0, 1;
22, 0, 0, 4, 0, 0;
23, 11, 0, 0, 0, 0;
24, 0, 7, 0, 0, 0;
25, 12, 0, 0, 3, 0;
26, 0, 0, 5, 0, 0;
27, 13, 8, 0, 0, 2;
28, 0, 0, 0, 0, 0, 1;
...
In accordance with the conjectures, for n = 15 there are four partitions of 15 into consecutive parts: [15], [8, 7], [6, 5, 4] and [5, 4, 3, 2, 1]. The smallest parts of these partitions are 15, 7, 4, 1, respectively, so the 15th row of the triangle is [15, 7, 4, 0, 1]. - Omar E. Pol, Apr 30 2017
MATHEMATICA
a196020[n_, k_]:=If[Divisible[n - k(k + 1)/2, k], 2n/k - k, 0]; T[n_, k_]:= Floor[(1 + a196020[n, k])/2]; Table[T[n, k], {n, 28}, {k, Floor[(Sqrt[8n+1]-1)/2]}] // Flatten (* Indranil Ghosh, Apr 30 2017 *)
PROG
(Python)
from sympy import sqrt
import math
def a196020(n, k):return 2*n/k - k if (n - k*(k + 1)/2)%k == 0 else 0
def T(n, k): return int((1 + a196020(n, k))/2)
for n in range(1, 29): print([T(n, k) for k in range(1, int((sqrt(8*n + 1) - 1)/2) + 1)]) # Indranil Ghosh, Apr 30 2017
Irregular triangle read by rows: T(n,k), n>=1, k>=1, in which column k lists k's interleaved with k-1 zeros, and the first element of column k is in row k(k+1)/2.
+10
27
1, 1, 1, 2, 1, 0, 1, 2, 1, 0, 3, 1, 2, 0, 1, 0, 0, 1, 2, 3, 1, 0, 0, 4, 1, 2, 0, 0, 1, 0, 3, 0, 1, 2, 0, 0, 1, 0, 0, 4, 1, 2, 3, 0, 5, 1, 0, 0, 0, 0, 1, 2, 0, 0, 0, 1, 0, 3, 4, 0, 1, 2, 0, 0, 0, 1, 0, 0, 0, 5, 1, 2, 3, 0, 0, 6, 1, 0, 0, 4, 0, 0, 1, 2, 0, 0, 0, 0, 1, 0, 3, 0, 0, 0, 1, 2, 0, 0, 5, 0, 1, 0, 0, 4, 0, 0, 1, 2, 3, 0, 0, 6
COMMENTS
Conjecture 1: T(n,k) is the number of parts in the partition of n into k consecutive parts, if T(n,k) > 0.
Conjecture 2: row sums give A204217, which should be also the total number of parts in all partitions of n into consecutive parts.
Theorem: Let T(n,k) be an irregular triangle read by rows in which column k lists k's interleaved with k-1 zeros, and the first element of column k is in the row that is the k-th (m+2)-gonal number, with n >= 1, k >= 1, m >= 0. T(n,k) is also the number of parts in the partition of n into k consecutive parts that differ by m, including n as a valid partition. Hence the sum of row n gives the total number of parts in all partitions of n into consecutive parts that differ by m.
About the above theorem, this is the case for m = 1. For m = 0 see the triangle A127093, in which row sums give A000203. For m = 2 see the triangle A330466, in which row sums give A066839 (conjectured). For m = 3 see the triangle A330888, in which row sums give A330889.
Note that there are infinitely many triangles of this kind, with m >= 0. Also, every triangle can be represented with a diagram of overlapping curves, in which every column of triangle is represented by a periodic curve. (End)
EXAMPLE
Triangle begins (rows 1..28):
1;
1;
1, 2;
1, 0;
1, 2;
1, 0, 3;
1, 2, 0;
1, 0, 0;
1, 2, 3;
1, 0, 0, 4;
1, 2, 0, 0;
1, 0, 3, 0;
1, 2, 0, 0;
1, 0, 0, 4;
1, 2, 3, 0, 5;
1, 0, 0, 0, 0;
1, 2, 0, 0, 0;
1, 0, 3, 4, 0;
1, 2, 0, 0, 0;
1, 0, 0, 0, 5;
1, 2, 3, 0, 0, 6;
1, 0, 0, 4, 0, 0;
1, 2, 0, 0, 0, 0;
1, 0, 3, 0, 0, 0;
1, 2, 0, 0, 5, 0;
1, 0, 0, 4, 0, 0;
1, 2, 3, 0, 0, 6;
1, 0, 0, 0, 0, 0, 7;
...
In accordance with the conjectures, for n = 15 there are four partitions of 15 into consecutive parts: [15], [8, 7], [6, 5, 4] and [5, 4, 3, 2, 1]. These partitions are formed by 1, 2, 3 and 5 consecutive parts respectively, so the 15th row of the triangle is [1, 2, 3, 0, 5].
Illustration of initial terms:
Row _
1 _|1|
2 _|1 _|
3 _|1 |2|
4 _|1 _|0|
5 _|1 |2 _|
6 _|1 _|0|3|
7 _|1 |2 |0|
8 _|1 _|0 _|0|
9 _|1 |2 |3 _|
10 _|1 _|0 |0|4|
11 _|1 |2 _|0|0|
12 _|1 _|0 |3 |0|
13 _|1 |2 |0 _|0|
14 _|1 _|0 _|0|4 _|
15 _|1 |2 |3 |0|5|
16 _|1 _|0 |0 |0|0|
17 _|1 |2 _|0 _|0|0|
18 _|1 _|0 |3 |4 |0|
19 _|1 |2 |0 |0 _|0|
20 _|1 _|0 _|0 |0|5 _|
21 _|1 |2 |3 _|0|0|6|
22 _|1 _|0 |0 |4 |0|0|
23 _|1 |2 _|0 |0 |0|0|
24 _|1 _|0 |3 |0 _|0|0|
25 _|1 |2 |0 _|0|5 |0|
26 _|1 _|0 _|0 |4 |0 _|0|
27 _|1 |2 |3 |0 |0|6 _|
28 |1 |0 |0 |0 |0|0|7|
...
Note that the k's are placed exactly below the k-th horizontal line segment of every row.
The above structure is related to the triangle A237591, also to the left-hand part of the triangle A237593, and also to the left-hand part of the front view of the pyramid described in A245092.
MATHEMATICA
With[{nn = 6}, Table[Boole[If[EvenQ@ k, Mod[(n - k/2), k] == 0, Mod[n, k] == 0]] k, {n, nn (nn + 3)/2}, {k, Floor[((Sqrt[8 n + 1] - 1)/2)]}]] // Flatten (* Michael De Vlieger, Jun 15 2017, after Python by Indranil Ghosh *)
PROG
(Python)
from sympy import sqrt
import math
def a237048(n, k):
return int(n%k == 0) if k%2 else int(((n - k//2)%k) == 0)
def T(n, k): return k*a237048(n, k)
for n in range(1, 29): print([T(n, k) for k in range(1, int(math.floor((sqrt(8*n + 1) - 1)/2)) + 1)]) # Indranil Ghosh, Apr 30 2017
(PARI) t(n, k) = if (k % 2, (n % k) == 0, ((n - k/2) % k) == 0); \\ A237048
tabf(nn) = {for (n=1, nn, for (k=1, floor((sqrt(1+8*n)-1)/2), print1(k*t(n, k), ", "); ); print(); ); } \\ Michel Marcus, Nov 04 2019
CROSSREFS
The number of positive terms in row n is A001227(n), the number of partitions of n into consecutive parts.
Cf. A000203, A066839, A196020, A204217, A235791, A236104, A237048, A237591, A237593, A245092, A261699, A285898, A262626, A330889.
Triangle T(n,k) = n+k, n >= 0, 0 <= k <= n.
+10
26
0, 1, 2, 2, 3, 4, 3, 4, 5, 6, 4, 5, 6, 7, 8, 5, 6, 7, 8, 9, 10, 6, 7, 8, 9, 10, 11, 12, 7, 8, 9, 10, 11, 12, 13, 14, 8, 9, 10, 11, 12, 13, 14, 15, 16, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20
COMMENTS
Row sums are A045943 = triangular matchstick numbers: 3n(n+1)/2. This was independently noted by me and, without cross-reference, as a comment on A045943, by Jon Perry, Jan 15 2004. - Jonathan Vos Post, Nov 09 2007
In partitions of n into distinct parts having maximal size, a(n) is the greatest number, see A000009. - Reinhard Zumkeller, Jun 13 2009
Row sums of reciprocals of terms in this triangle converge to log(2). See link to Eric Naslund's answer. - Mats Granvik, Mar 07 2013
T(n,k) satisfies the cubic equation T(n,k)^3 + 3* A025581(n, k)*T(n,k) - 4* A105125(n,k) = 0. This is a problem similar to the one posed by François Viète (Vieta) mentioned in a comment on A025581. Here the problem is to determine for a rectangle (a, b), with a > b >= 1, from the given values for a^3 + b^3 and a - b the value of a + b. Here for nonnegative integers a = n and b = k. - Wolfdieter Lang, May 15 2015
FORMULA
T(n, k) = n + k, 0 <= k <= n.
G.f.: x/(1-x)^2 + (1-x)^(-1)*Sum(j>=1, (1-j)*x^ A000217(j)). The sum is related to Jacobi Theta functions. (End)
G.f. as triangle: (x + (2 - 3*x)*x*y)/((1 - x)^2*(1 - x*y)^2). - Stefano Spezia, Apr 22 2024
EXAMPLE
The triangle T(n, k) starts:
n\k 0 1 2 3 4 5 6 7 8 9 10 ...
0: 0
1: 1 2
2: 2 3 4
3: 3 4 5 6
4: 4 5 6 7 8
5: 5 6 7 8 9 10
6: 6 7 8 9 10 11 12
7: 7 8 9 10 11 12 13 14
8: 8 9 10 11 12 13 14 15 16
9: 9 10 11 12 13 14 15 16 17 18
10: 10 11 12 13 14 15 16 17 18 19 20
MATHEMATICA
With[{c=Range[0, 20]}, Flatten[Table[Take[c, {n, 2n-1}], {n, 11}]]] (* Harvey P. Dale, Nov 19 2011 *)
PROG
(Haskell)
a051162 n k = a051162_tabl !! n !! k
a051162_row n = a051162_tabl !! n
a051162_tabl = iterate (\xs@(x:_) -> (x + 1) : map (+ 2) xs) [0]
(PARI) for(n=0, 10, for(k=0, n, print1(n+k, ", "))) \\ Derek Orr, May 19 2015
Dimensions of representations by Witt vectors.
(Formerly M1921)
+10
25
0, 1, 2, 9, 24, 130, 720, 8505, 35840, 412776, 3628800, 42030450, 479001600, 7019298000, 82614884352, 1886805545625, 20922789888000, 374426276224000, 6402373705728000, 134987215801622184, 2379913632645120000
REFERENCES
Reutenauer, Christophe; Sur des fonctions symétriques liées aux vecteurs de Witt et à l'algèbre de Lie libre, Report 177, Dept. Mathématiques et d'Informatique, Univ. Québec à Montréal, Mar 26 1992.
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
FORMULA
G.f.: Product_{n>=1} (1 + a(n)*x^n/n!) = exp(-x)/(1-x). - Paul D. Hanna, Feb 14 2008
A recurrence. With FP(n,m) the set of partitions of n with m distinct parts (which could be called fermionic partitions (fp)) and the multinomial numbers M1(fp(n,m)) (given as M_1 array for any partition in A036038): a(n) = (-1)^n - Sum_{m=2..maxm(n)} ( Sum_{fp from FP(n,m)} (M1(fp)*Product_{j=1..m} ( a(k[j]) ) ), with maxm(n) = A003056(n) = floor((sqrt(1+8*n) -1)/2) and the distinct parts k[j], j=1..m, of the partition of n, n>=2, with input a(1)=-1 (but only for this recurrence). Note that a(1)=0. Proof by comparing coefficients of (x^n)/n! in exp(-x) = (1-x)*Product_{j>=1} ( 1 + a(j)*(x^j)/j! ). See array A008289(n,m) for the cardinality of the set FP(n,m). Another recurrence has been given in the first PARI program line below. - Wolfdieter Lang, Feb 24 2009
EXAMPLE
G.f.: exp(-x)/(1-x) = (1 + 0*x)*(1 + 1*x^2/2!)*(1 + 2*x^3/3!)*(1 + 9*x^4/4!)*
(1 + 24*x^5/5!)*(1 + 130*x^6/6!)*...*(1 + a(n)*x^n/n!)*...
Recurrence: a(7) = -1 - (7*a(1)*a(6) + 21*a(2)*a(5) + 35 a(3)*a(4) + 105*a(1)*a(2)*a(4)) = -1 -(-910 + 504 + 630 - 945) = 720 = 6!. For the recurrence one has to use a(1)=-1. - Wolfdieter Lang, Feb 24 2009
G.f. = x^2 + 2*x^3 + 9*x^4 + 24*x^5 + 130*x^6 + 720*x^7 + 8505*x^8 + ...
MATHEMATICA
a[n_] := a[n] = If[n < 4, Max[n-1, 0], (n-1)!*(1 + Sum[ k*(-a[k]/k!)^(n/k), {k, Most[Divisors[n]]}])]; Table[a[n], {n, 1, 21}] (* Jean-François Alcover, Jul 19 2012, after 1st PARI program *)
a[ n_]:= If[n<2, 0, a[n] = n! SeriesCoefficient[ Exp[-x]/((1-x) Product[ 1 + a[k] x^k/k!, {k, 2, n-1}]), {x, 0, n}]]; (* Michael Somos, Feb 23 2015 *)
PROG
(PARI) a(n)=if(n<4, max(n-1, 0), (n-1)!*(1+sumdiv(n, k, if(k<n, k*(-a(k)/k!)^(n/k)))))
(PARI) /* As coefficients in product g.f.: */ a(n)=if(n<2, 0, n!*polcoeff((exp(-x+x*O(x^n))/(1-x))/prod(k=0, n-1, 1+a(k)*x^k/k! +x*O(x^n)), n)) \\ Paul D. Hanna, Feb 14 2008
Search completed in 0.215 seconds
|