[go: up one dir, main page]

login
Search: a003056 -id:a003056
     Sort: relevance | references | number | modified | created      Format: long | short | data
A table of partitions into consecutive parts (see Comments lines for definition).
+10
50
1, 2, 3, 1, 4, 2, 5, 2, 6, 3, 1, 7, 3, 2, 8, 4, 3, 9, 4, 2, 10, 5, 3, 1, 11, 5, 4, 2, 12, 6, 3, 3, 13, 6, 4, 4, 14, 7, 5, 2, 15, 7, 4, 3, 1, 16, 8, 5, 4, 2, 17, 8, 6, 5, 3, 18, 9, 5, 3, 4, 19, 9, 6, 4, 5, 20, 10, 7, 5, 2, 21, 10, 6, 6, 3, 1, 22, 11, 7, 4, 4, 2, 23, 11, 8, 5, 5, 3, 24, 12, 7, 6, 6, 4, 25, 12, 8, 7, 3, 5
OFFSET
1,2
COMMENTS
This is a triangle read by rows: T(n,k), n>=1, k>=1, in which column k lists successive blocks of k consecutive terms, where the m-th block starts with m, m>=1, and the first element of column k is in row k*(k+1)/2.
The partitions of n into consecutive parts are represented from the row n up to row A288529(n) as maximum, but in increasing order, exclusively in the columns where the blocks begin.
More precisely, the partition of n into exactly k consecutive parts (if such partition exists) is represented in the column k from the row n up to row n + k - 1 (see examples).
A288772(n) is the minimum number of rows that are required to represent in this table the partitions of all positive integers <= n into consecutive parts.
A288773(n) is the largest of all positive integers whose partitions into consecutive parts can be totally represented in the first n rows of this table.
A288774(n) is the largest positive integers whose partitions into consecutive parts can be totally represented in the first n rows of this table.
For a theorem related to this table see A286000.
EXAMPLE
Triangle begins:
1;
2;
3, 1;
4, 2;
5, 2;
6, 3, 1;
7, 3, 2;
8, 4, 3;
9, 4, 2;
10, 5, 3, 1;
11, 5, 4, 2;
12, 6, 3, 3;
13, 6, 4, 4;
14, 7, 5, 2;
15, 7, 4, 3, 1;
16, 8, 5, 4, 2;
17, 8, 6, 5, 3;
18, 9, 5, 3, 4;
19, 9, 6, 4, 5;
20, 10, 7, 5, 2;
21, 10, 6, 6, 3, 1;
22, 11, 7, 4, 4, 2;
23, 11, 8, 5, 5, 3;
24, 12, 7, 6, 6, 4;
25, 12, 8, 7, 3, 5;
26, 13, 9, 5, 4, 6;
27, 13, 8, 6, 5, 2;
28, 14, 9, 7, 6, 3, 1;
...
Figures A..G show the location (in the columns of the table) of the partitions of n = 1..7 (respectively) into consecutive parts:
. ------------------------------------------------------------------------
Fig: A B C D E F G
. ------------------------------------------------------------------------
. n: 1 2 3 4 5 6 7
Row ------------------------------------------------------------------------
1 | [1];| 1; | 1; | 1; | 1; | 1; | 1; |
2 | | [2];| 2; | 2; | 2; | 2; | 2; |
3 | | | [3],[1];| 3, 1;| 3, 1; | 3, 1; | 3, 1; |
4 | | | 4 ,[2];| [4], 2;| 4, 2; | 4, 2; | 4, 2; |
5 | | | | | [5],[2]; | 5, 2; | 5, 2; |
6 | | | | | 6, [3], 3;| [6], 3, [1];| 6, 3, 1;|
7 | | | | | | 7, 3, [2];| [7],[3], 2;|
8 | | | | | | 8, 4, [3];| 8, [4], 3;|
. ------------------------------------------------------------------------
Figure F: for n = 6 the partitions of 6 into consecutive parts (but with the parts in increasing order) are [6] and [1, 2, 3]. These partitions have 1 and 3 consecutive parts respectively. On the other hand we can find the mentioned partitions in the columns 1 and 3 of this table, starting at the row 6.
.
Figures H..K show the location (in the columns of the table) of the partitions of 8..11 (respectively) into consecutive parts:
. --------------------------------------------------------------------
Fig: H I J K
. --------------------------------------------------------------------
. n: 8 9 10 11
Row --------------------------------------------------------------------
1 | 1; | 1; | 1; | 1; |
1 | 2; | 2; | 2; | 2; |
3 | 3, 1; | 3, 1; | 3, 1; | 3, 1; |
4 | 4, 2; | 4, 2; | 4, 2; | 4, 2; |
5 | 5, 2; | 5, 2; | 5, 2; | 5, 2; |
6 | 6, 3, 3;| 6, 3, 1; | 6, 3, 1; | 6, 3, 1; |
7 | 7, 3, 2;| 7, 3, 2; | 7, 3, 2; | 7, 3, 2; |
8 | [8], 4, 1;| 8, 4, 3; | 8, 4, 3; | 8, 4, 3; |
9 | | [9],[4],[2]; | 9, 4, 2; | 9, 4, 2; |
10 | | 10, [5],[3], 1;| [10], 5, 3, [1];| 10, 5, 3, 1;|
11 | | 11, 5, [4], 2;| 11, 5, 4, [2];| [11],[5], 4, 2;|
12 | | | 12, 6, 3, [3];| 12, [6], 3, 3;|
13 | | | 13, 6, 4, [4];| 13, 6, 4, 4;|
. --------------------------------------------------------------------
Figure J: For n = 10 the partitions of 10 into consecutive parts (but with the parts in increasing order) are [10] and [1, 2, 3, 4]. These partitions have 1 and 4 consecutive parts respectively. On the other hand, we can find the mentioned partitions in the columns 1 and 4 of this table, starting at the row 10.
.
Illustration of initial terms arranged into the diagram of the triangle A237591:
. _
. _|1|
. _|2 _|
. _|3 |1|
. _|4 _|2|
. _|5 |2 _|
. _|6 _|3|1|
. _|7 |3 |2|
. _|8 _|4 _|3|
. _|9 |4 |2 _|
. _|10 _|5 |3|1|
. _|11 |5 _|4|2|
. _|12 _|6 |3 |3|
. _|13 |6 |4 _|4|
. _|14 _|7 _|5|2 _|
. _|15 |7 |4 |3|1|
. _|16 _|8 |5 |4|2|
. _|17 |8 _|6 _|5|3|
. _|18 _|9 |5 |3 |4|
. _|19 |9 |6 |4 _|5|
. _|20 _|10 _|7 |5|2 _|
. _|21 |10 |6 _|6|3|1|
. _|22 _|11 |7 |4 |4|2|
. _|23 |11 _|8 |5 |5|3|
. _|24 _|12 |7 |6 _|6|4|
. _|25 |12 |8 _|7|3 |5|
. _|26 _|13 _|9 |5 |4 _|6|
. _|27 |13 |8 |6 |5|2 _|
. |28 |14 |9 |7 |6|3|1|
...
The number of horizontal line segments in the n-th row of the diagram equals A001227(n), the number of partitions of n into consecutive parts.
.
From Omar E. Pol, Dec 15 2020: (Start)
The connection (described step by step) between the triangle of A299765 and the above geometric diagram is as follows:
.
[1]; [1];
[2]; [2];
[3], [2, 1]; [3], [2, 1];
[4]; [4];
[5], [3, 2]; [5], [3, 2];
[6], [3, 2, 1]; [6], [3, 2, 1];
[7], [4, 3]; [7], [4, 3];
[8]; [8];
[9], [5, 4], [4, 3, 2]; [9], [5, 4], [4, 3, 2];
.
Figure 1. Figure 2.
.
We start with the irregular Then we write the same triangle
triangle of A299765 in which but ordered in columns where the
row n lists the partitions column k lists the partitions of
of n into consecutive parts. n into k consecutive parts.
.
. _ _
1| |1
_ _
2| |2
_ _ _ _ _
3| 2,1| |3 |1
_ _ |2
4| |4
_ _ _ _ _
5| 3,2| |5 |2
_ _ _ _ _ |3 _
6| 3,2,1| |6 |1
_ _ _ _ _ |2
7| 4,3| |7 |3 |3
_ _ |4
8| |8
_ _ _ _ _ _ _ _ _
9| 5,4| 4,3,2| |9 |4 |2
|5 |3
|4
.
Figure 3. Figure 4.
.
Then we draw to the right of Then we rotate each sub-diagram
each partition a vertical 90 degrees counterclockwise.
toothpick and above each part Every horizontal toothpick represents
we draw a horizontal toothpick. the existence of that partition.
. The number of vertical toothpicks
. equals the number of parts.
.
. _ _
_|1 _|1
_|2 _ _|2 _
_|3 |1 _|3 |1
_|4 _|2 _|4 _|2
_|5 |2 _ _|5 |2 _
_|6 _|3|1 _|6 _|3|1
_|7 |3 |2 _|7 |3 |2
_|8 _|4 _|3 _|8 _|4 _|3
|9 |4 |2 |9 |4 |2
|5 |3
|4
.
Figure 5. Figure 6.
.
Then we join the sub-diagrams Finally we erase the parts that
forming staircases (or zig-zag are beyond a certain level (in
paths) that represent the this case beyond the 9th level)
partitions that have the same to make the diagram more standard.
number of parts.
.
The numbers in the k-th staircase (from left to right) are the elements of the k-th column of the triangular array.
Note that this diagram is essentially the same diagram used to represent the triangles A237048, A235791, A237591, and other related sequences such as A001227, A060831 and A204217.
There is an infinite family of this kind of triangles, which are related to polygonal numbers and partitions into consecutive parts that differ by d. For more information see the theorems in A285914 and A303300.
Note that if we take two images of the diagram mirroring each other, with the y-axis in the middle of them, then a new diagram is formed, which is symmetric and represents the sequence A237593 as an isosceles triangle. Then if we fold each level (or row) of that isosceles triangle we essentially obtain the structure of the pyramid described in A245092 whose terraces at the n-th level have a total area equal to sigma(n) = A000203(n). (End)
CROSSREFS
Another version of A286000.
Tables of the same family where the consecutive parts differ by d are A010766 (d=0), this sequence (d=1), A332266 (d=2), A334945 (d=3), A334618(d=4).
KEYWORD
nonn,tabl
AUTHOR
Omar E. Pol, Apr 30 2017
STATUS
approved
Riordan array (1+x, 1) read by rows.
+10
47
1, 1, 1, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1
OFFSET
0,1
COMMENTS
Pair sum operator. Columns have g.f. (1+x)*x^k. Row sums are A040000. Diagonal sums are (1,1,1,....). Riordan inverse is (1/(1+x), 1). A097806 = B*A059260^(-1), where B is the binomial matrix.
Triangle T(n,k), 0<=k<=n, read by rows given by [1, -1, 0, 0, 0, 0, 0, ...] DELTA [1, 0, 0, 0, 0, 0, 0, ...] where DELTA is the operator defined in A084938. - Philippe Deléham, May 01 2007
Table T(n,k) read by antidiagonals. T(n,1) = 1, T(n,2) = 1, T(n,k) = 0, k > 2. - Boris Putievskiy, Jan 17 2013
LINKS
Michael De Vlieger, Table of n, a(n) for n = 0..10010 (Rows 0 <= n <= 140)
Boris Putievskiy, Transformations [of] Integer Sequences And Pairing Functions arXiv:1212.2732 [math.CO], 2012.
FORMULA
T(n, k) = if(n=k or n-k=1, 1, 0).
a(n) = A103451(n+1). - Philippe Deléham, Oct 16 2007
From Boris Putievskiy, Jan 17 2013: (Start)
a(n) = floor((A002260(n)+2)/(A003056(n)+2)), n > 0.
a(n) = floor((i+2)/(t+2)), n > 0,
where i=n-t*(t+1)/2, t=floor((-1+sqrt(8*n-7))/2). (End)
G.f.: (1+x)/(1-x*y). - R. J. Mathar, Aug 11 2015
EXAMPLE
Rows begin {1}, {1,1}, {0,1,1}, {0,0,1,1}...
From Boris Putievskiy, Jan 17 2013: (Start)
The start of the sequence as table:
1..1..0..0..0..0..0...
1..1..0..0..0..0..0...
1..1..0..0..0..0..0...
1..1..0..0..0..0..0...
1..1..0..0..0..0..0...
1..1..0..0..0..0..0...
1..1..0..0..0..0..0...
. . .
The start of the sequence as triangle array read by rows:
1;
1, 1;
0, 1, 1;
0, 0, 1, 1;
0, 0, 0, 1, 1;
0, 0, 0, 0, 1, 1;
0, 0, 0, 0, 0, 1, 1;
0, 0, 0, 0, 0, 0, 1, 1; . . .
Row number r (r>4) contains (r-2) times '0' and 2 times '1'. (End)
MAPLE
A097806 := proc(n, k)
if k =n or k=n-1 then
1;
else
0;
end if;
end proc: # R. J. Mathar, Jun 20 2015
MATHEMATICA
Table[Boole[n <= # <= n+1] & /@ Range[n+1], {n, 0, 15}] // Flatten (* or *)
Table[Floor[(# +2)/(n+2)] & /@ Range[n+1], {n, 0, 15}] // Flatten (* Michael De Vlieger, Jul 21 2016 *)
PROG
(PARI) T(n, k) = if(k==n || k==n-1, 1, 0); \\ G. C. Greubel, Jul 11 2019
(Magma) [k eq n or k eq n-1 select 1 else 0: k in [0..n], n in [0..15]]; // G. C. Greubel, Jul 11 2019
(Sage)
def T(n, k):
if (k==n or k==n-1): return 1
else: return 0
[[T(n, k) for k in (0..n)] for n in (0..15)] # G. C. Greubel, Jul 11 2019
KEYWORD
easy,nonn,tabl
AUTHOR
Paul Barry, Aug 25 2004
STATUS
approved
Irregular triangle read by rows where T(n,k) is the number of integer partitions of n with k co-modes.
+10
46
1, 0, 1, 0, 2, 0, 2, 1, 0, 4, 1, 0, 5, 2, 0, 7, 3, 1, 0, 10, 4, 1, 0, 13, 7, 2, 0, 16, 11, 3, 0, 23, 14, 4, 1, 0, 30, 19, 6, 1, 0, 35, 29, 11, 2, 0, 50, 34, 14, 3, 0, 61, 46, 23, 5, 0, 73, 69, 27, 6, 1, 0, 95, 81, 44, 10, 1, 0, 123, 105, 53, 14, 2
OFFSET
0,5
COMMENTS
We define a co-mode in a multiset to be an element that appears at most as many times as each of the others. For example, the co-modes of {a,a,b,b,b,c,c} are {a,c}.
LINKS
FORMULA
Sum_{k=0..A003056(n)} k * T(n,k) = A372632(n). - Alois P. Heinz, May 07 2024
EXAMPLE
Triangle begins:
1
0 1
0 2
0 2 1
0 4 1
0 5 2
0 7 3 1
0 10 4 1
0 13 7 2
0 16 11 3
0 23 14 4 1
0 30 19 6 1
0 35 29 11 2
0 50 34 14 3
0 61 46 23 5
0 73 69 27 6 1
0 95 81 44 10 1
Row n = 8 counts the following partitions:
(8) (53) (431)
(44) (62) (521)
(332) (71)
(422) (3221)
(611) (3311)
(2222) (4211)
(5111) (32111)
(22211)
(41111)
(221111)
(311111)
(2111111)
(11111111)
MATHEMATICA
comsi[ms_]:=Select[Union[ms], Count[ms, #]<=Min@@Length/@Split[ms]&];
Table[Length[Select[IntegerPartitions[n], Length[comsi[#]]==k&]], {n, 0, 15}, {k, 0, Floor[(Sqrt[1+8n]-1)/2]}]
CROSSREFS
Row sums are A000041.
Row lengths are A002024.
Removing columns 0 and 1 and taking sums gives A362609, ranks A362606.
Column k = 1 is A362610, ranks A359178.
This statistic (co-mode count) is ranked by A362613.
For mode instead of co-mode we have A362614, ranked by A362611.
A008284 counts partitions by length.
A096144 counts partitions by number of minima, A026794 by maxima.
A238342 counts compositions by number of minima, A238341 by maxima.
A275870 counts collapsible partitions.
KEYWORD
nonn,tabf
AUTHOR
Gus Wiseman, May 04 2023
STATUS
approved
Numbers whose sum of digits is 3.
+10
44
3, 12, 21, 30, 102, 111, 120, 201, 210, 300, 1002, 1011, 1020, 1101, 1110, 1200, 2001, 2010, 2100, 3000, 10002, 10011, 10020, 10101, 10110, 10200, 11001, 11010, 11100, 12000, 20001, 20010, 20100, 21000, 30000, 100002, 100011, 100020, 100101
OFFSET
1,1
COMMENTS
From Joshua S.M. Weiner, Oct 19 2012: (Start)
Sequence is a representation of the "energy states" of "multiplex" notation of 3 quantum of objects in a juggling pattern.
0 = an empty site, or empty hand. 1 = one object resides in the site. 2 = two objects reside in the site. 3 = three objects reside in the site. (See A038447.) (End)
A007953(a(n)) = 3; number of repdigits = #{3,111} = A242627(3) = 2. - Reinhard Zumkeller, Jul 17 2014
Can be seen as a table whose n-th row holds the n-digit terms {10^(n-1) + 10^m + 10^k, 0 <= k <= m < n}, n >= 1. Row lengths are then (1, 3, 6, 10, ...) = n*(n+1)/2 = A000217(n). The first and the n last terms of row n are 10^(n-1) + 2 resp. 2*10^(n-1) + 10^k, 0 <= k < n. - M. F. Hasler, Feb 19 2020
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..10000 (terms 1..84 from Vincenzo Librandi, terms 85..1140 from T. D. Noe)
FORMULA
T(n,k) = 10^(n-1) + 10^A003056(k) + 10^A002262(k) when read as a table with row lengths n*(n+1)/2, n >= 1, 0 <= k < n*(n+1)/2. - M. F. Hasler, Feb 19 2020
a(n) = 10^A056556(n-1) + 10^A056557(n-1) + 10^A056558(n-1). - Kevin Ryde, Apr 17 2021
MATHEMATICA
Union[FromDigits/@Select[Flatten[Table[Tuples[Range[0, 3], n], {n, 6}], 1], Total[#]==3&]] (* Harvey P. Dale, Oct 20 2012 *)
Select[Range[10^6], Total[IntegerDigits[#]] == 3 &] (* Vincenzo Librandi, Mar 07 2013 *)
Union[Flatten[Table[FromDigits /@ Permutations[PadRight[s, 18]], {s, IntegerPartitions[3]}]]] (* T. D. Noe, Mar 08 2013 *)
PROG
(Magma) [n: n in [1..100101] | &+Intseq(n) eq 3 ]; // Vincenzo Librandi, Mar 07 2013
(Haskell)
a052217 n = a052217_list !! (n-1)
a052217_list = filter ((== 3) . a007953) [0..]
-- Reinhard Zumkeller, Jul 17 2014
(PARI) isok(n) = sumdigits(n) == 3; \\ Michel Marcus, Dec 28 2015
(PARI) apply( {A052217_row(n, s, t=-1)=vector(n*(n+1)\2, k, t++>s&&t=!s++; 10^(n-1)+10^s+10^t)}, [1..5]) \\ M. F. Hasler, Feb 19 2020
(Python)
from itertools import count, islice
def agen(): yield from (10**i + 10**j + 10**k for i in count(0) for j in range(i+1) for k in range(j+1))
print(list(islice(agen(), 40))) # Michael S. Branicky, May 14 2022
CROSSREFS
Cf. A007953, A218043 (subsequence).
Row n=3 of A245062.
Other digit sums: A011557 (1), A052216 (2), A052218 (4), A052219 (5), A052220 (6), A052221 (7), A052222 (8), A052223 (9), A052224 (10), A166311 (11), A235151 (12), A143164 (13), A235225(14), A235226 (15), A235227 (16), A166370 (17), A235228 (18), A166459 (19), A235229 (20).
Other bases: A014311 (binary), A226636 (ternary), A179243 (Zeckendorf).
Cf. A003056, A002262 (triangular coordinates), A056556, A056557, A056558 (tetrahedral coordinates).
KEYWORD
base,easy,nonn
AUTHOR
Henry Bottomley, Feb 01 2000
EXTENSIONS
Offset changed from 0 to 1 by Vincenzo Librandi, Mar 07 2013
STATUS
approved
Irregular triangle read by rows: T(n,k) is the size of the subpart that is adjacent to the k-th peak of the largest Dyck path of the symmetric representation of sigma(n), or T(n,k) = 0 if the mentioned subpart is already associated to a previous peak or if there is no subpart adjacent to the k-th peak, with n >= 1, k >= 1.
+10
44
1, 3, 2, 2, 7, 0, 3, 3, 11, 1, 0, 4, 0, 4, 15, 0, 0, 5, 3, 5, 9, 0, 9, 0, 6, 0, 0, 6, 23, 5, 0, 0, 7, 0, 0, 7, 12, 0, 12, 0, 8, 7, 1, 0, 8, 31, 0, 0, 0, 0, 9, 0, 0, 0, 9, 35, 2, 0, 2, 0, 10, 0, 0, 0, 10, 39, 0, 3, 0, 0, 11, 5, 0, 5, 0, 11, 18, 0, 0, 0, 18, 0, 12, 0, 0, 0, 0, 12, 47, 13, 0, 0, 0, 0, 13, 0, 5, 0, 0, 13
OFFSET
1,2
COMMENTS
Conjecture: row n is formed by the odd-indexed terms of the n-th row of triangle A280850 together with the even-indexed terms of the same row but listed in reverse order. Examples: the 15th row of A280850 is [8, 8, 7, 0, 1] so the 15th row of this triangle is [8, 7, 1, 0, 8]. The 75th row of A280850 is [38, 38, 21, 0, 3, 3, 0, 0, 0, 21, 0] so the 75h row of this triangle is [38, 21, 3, 0, 0, 0, 21, 0, 3, 0, 38].
For the definition of "subparts" see A279387.
For more information about the mentioned Dyck paths see A237593.
T(n,k) could be called the "charge" of the k-th peak of the largest Dyck path of the symmetric representation of sigma(n).
The number of zeros in row n is A238005(n). - Omar E. Pol, Sep 11 2021
EXAMPLE
Triangle begins (rows 1..28):
1;
3;
2, 2;
7, 0;
3, 3;
11, 1, 0;
4, 0, 4;
15, 0, 0;
5, 3, 5;
9, 0, 9, 0;
6, 0, 0, 6;
23, 5, 0, 0;
7, 0, 0, 7;
12, 0, 12, 0;
8, 7, 1, 0, 8;
31, 0, 0, 0, 0;
9, 0, 0, 0, 9;
35, 2, 0, 2, 0;
10, 0, 0, 0, 10;
39, 0, 3, 0, 0;
11, 5, 0, 5, 0, 11;
18, 0, 0, 0, 18, 0;
12, 0, 0, 0, 0, 12;
47, 13, 0, 0, 0, 0;
13, 0, 5, 0, 0, 13;
21, 0, 0, 0 21, 0;
14, 6, 0, 6, 0, 14;
55, 0, 0, 1, 0, 0, 0;
...
For n = 15 we have that the 14th row of triangle A237593 is [8, 3, 1, 2, 2, 1, 3, 8] and the 15th row of the same triangle is [8, 3, 2, 1, 1, 1, 1, 2, 3, 8], so the diagram of the symmetric representation of sigma(15) is constructed in the third quadrant as shown below in Figure 1:
. _ _
. | | | |
. | | | |
. | | | |
. 8 | | | |
. | | | |
. | | | |
. | | | |
. |_|_ _ _ |_|_ _ _
. | |_ _ 8 | |_ _
. |_ | |_ _ |
. |_ |_ 7 |_| |_
. 8 |_ _| 1 |_ _|
. | 0 |
. |_ _ _ _ _ _ _ _ |_ _ _ _ _ _ _ _
. |_ _ _ _ _ _ _ _| |_ _ _ _ _ _ _ _|
. 8 8
.
. Figure 1. The symmetric Figure 2. After the dissection
. representation of sigma(15) of the symmetric representation
. has three parts of size 8 of sigma(15) into layers of
. because every part contains width 1 we can see four subparts,
. 8 cells, so the 15th row of so the 15th row of this triangle is
. triangle A237270 is [8, 8, 8]. [8, 7, 1, 0, 8]. See also below.
.
Illustration of first 50 terms (rows 1..16 of triangle) in an irregular spiral which can be find in the top view of the pyramid described in A244050:
.
. 12 _ _ _ _ _ _ _ _
. | _ _ _ _ _ _ _|_ _ _ _ _ _ _ 7
. | | |_ _ _ _ _ _ _|
. 0 _| | |
. |_ _|9 _ _ _ _ _ _ |_ _ 0
. 12 _ _| | _ _ _ _ _|_ _ _ _ _ 5 |_ 0
. 0 _ _ _| | 0 _| | |_ _ _ _ _| |
. | _ _ _| 9 _|_ _| |_ _ 3 |_ _ _ 7
. | | 0 _ _| | 11 _ _ _ _ |_ | | |
. | | | _ _| 1 _| _ _ _|_ _ _ 3 |_|_ _ 5 | |
. | | | | 0 _|_| | |_ _ _| | | | |
. | | | | | _ _| |_ _ 3 | | | |
. | | | | | | 3 _ _ | | | | | |
. | | | | | | | _|_ 1 | | | | | |
. _|_| _|_| _|_| _|_| |_| _|_| _|_| _|_| _
. | | | | | | | | | | | | | | | |
. | | | | | | |_|_ _ _| | | | | | | |
. | | | | | | 2 |_ _|_ _| _| | | | | | |
. | | | | |_|_ 2 |_ _ _| 0 _ _| | | | | |
. | | | | 4 |_ 7 _| _ _|0 | | | |
. | | |_|_ _ 0 |_ _ _ _ | _| _ _ _| | | |
. | | 6 |_ |_ _ _ _|_ _ _ _| | 0 _| _ _ _|0 | |
. |_|_ _ _ 0 |_ 4 |_ _ _ _ _| _| _| | _ _ _| |
. 8 | |_ _ 0 | 15| _| _| | _ _ _|
. |_ _ | |_ _ _ _ _ _ | |_ _| 0 _| | 0
. 7 |_| |_ |_ _ _ _ _ _|_ _ _ _ _ _| | 5 _| _|
. 1 |_ _| 6 |_ _ _ _ _ _ _| _ _| _| 0
. 0 | 23| _ _| 0
. |_ _ _ _ _ _ _ _ | | 0
. |_ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _| |
. 8 |_ _ _ _ _ _ _ _ _|
. 31
.
The diagram contains 30 subparts equaling A060831(16), the total number of partitions of all positive integers <= 16 into consecutive parts.
For the construction of the spiral see A239660.
From Omar E. Pol, Nov 26 2020: (Start)
Also consider the infinite double-staircases diagram defined in A335616 (see the theorem). For n = 15 the diagram with first 15 levels looks like this:
.
Level "Double-staircases" diagram
. _
1 _|1|_
2 _|1 _ 1|_
3 _|1 |1| 1|_
4 _|1 _| |_ 1|_
5 _|1 |1 _ 1| 1|_
6 _|1 _| |1| |_ 1|_
7 _|1 |1 | | 1| 1|_
8 _|1 _| _| |_ |_ 1|_
9 _|1 |1 |1 _ 1| 1| 1|_
10 _|1 _| | |1| | |_ 1|_
11 _|1 |1 _| | | |_ 1| 1|_
12 _|1 _| |1 | | 1| |_ 1|_
13 _|1 |1 | _| |_ | 1| 1|_
14 _|1 _| _| |1 _ 1| |_ |_ 1|_
15 |1 |1 |1 | |1| | 1| 1| 1|
.
Starting from A196020 and after the algorithm described n A280850 and the conjecture applied to the above diagram we have a new diagram as shown below:
.
Level "Ziggurat" diagram
. _
6 |1|
7 _ | | _
8 _|1| _| |_ |1|_
9 _|1 | |1 1| | 1|_
10 _|1 | | | | 1|_
11 _|1 | _| |_ | 1|_
12 _|1 | |1 1| | 1|_
13 _|1 | | | | 1|_
14 _|1 | _| _ |_ | 1|_
15 |1 | |1 |1| 1| | 1|
.
The 15th row
of A249351: [1,1,1,1,1,1,1,1,0,0,0,1,1,1,2,1,1,1,0,0,0,1,1,1,1,1,1,1,1]
The 15th row
of A237270: [ 8, 8, 8 ]
The 15th row
of this seq: [ 8, 7, 1, 0, 8 ]
The 15th row
of A280851: [ 8, 7, 1, 8 ]
.
(End)
CROSSREFS
Row sums give A000203.
Row n has length A003056(n).
Column k starts in row A000217(k).
Nonzero terms give A280851.
The number of nonzero terms in row n is A001227(n).
The triangle with n rows contain A060831(n) nonzero terms.
KEYWORD
nonn,tabf
AUTHOR
Omar E. Pol, Feb 10 2018
STATUS
approved
Array A(n, k) = lunar sum n + k (n >= 0, k >= 0) read by antidiagonals.
+10
42
0, 1, 1, 2, 1, 2, 3, 2, 2, 3, 4, 3, 2, 3, 4, 5, 4, 3, 3, 4, 5, 6, 5, 4, 3, 4, 5, 6, 7, 6, 5, 4, 4, 5, 6, 7, 8, 7, 6, 5, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 5, 6, 7, 8, 9, 10, 9, 8, 7, 6, 5, 6, 7, 8, 9, 10, 11, 11, 9, 8, 7, 6, 6, 7, 8, 9, 11, 11, 12, 11, 12, 9, 8, 7, 6, 7, 8, 9, 12, 11, 12, 13, 12, 12, 13, 9, 8
OFFSET
0,4
COMMENTS
There are no carries in lunar arithmetic. For each pair of lunar digits, to Add, take the lArger, but to Multiply, take the sMaller. For example:
169
+ 248
------
269
and
169
x 248
------
168
144
+ 122
--------
12468
Addition and multiplication are associative and commutative and multiplication distributes over addition. E.g., 357 * (169 + 248) = 357 * 269 = 23567 = 13567 + 23457 = (357 * 169) + (357 * 248). Note that 0 + x = x and 9*x = x for all x.
We have changed the name from "dismal arithmetic" to "lunar arithmetic" - the old name was too depressing. - N. J. A. Sloane, Aug 06 2014
LINKS
D. Applegate, M. LeBrun and N. J. A. Sloane, Dismal Arithmetic, arXiv:1107.1130 [math.NT], 2011.
Brady Haran and N. J. A. Sloane, Primes on the Moon (Lunar Arithmetic), Numberphile video, Nov 2018.
Rémy Sigrist, Colored representation of the array for n, k < 1000 (where the color is function of T(n, k))
FORMULA
T(n, k) = n - k if n - k > k, otherwise k, if seen as a triangle. See A004197, which is a kind of dual. In fact T(n, k) + A004197(n, k) = A003056(n, k). - Peter Luschny, May 07 2023
EXAMPLE
Lunar addition table A(n, k) begins:
[0] 0 1 2 3 4 5 6 7 8 9 10 11 12 13 ...
[1] 1 1 2 3 4 5 6 7 8 9 11 11 12 13 ...
[2] 2 2 2 3 4 5 6 7 8 9 12 12 12 13 ...
[3] 3 3 3 3 4 5 6 7 8 9 13 13 13 13 ...
[4] 4 4 4 4 4 5 6 7 8 9 14 14 14 14 ...
[5] 5 5 5 5 5 5 6 7 8 9 15 15 15 15 ...
[6] 6 6 6 6 6 6 6 7 8 9 16 16 16 16 ...
[7] 7 7 7 7 7 7 7 7 8 9 17 17 17 17 ...
[8] 8 8 8 8 8 8 8 8 8 9 18 18 18 18 ...
[9] 9 9 9 9 9 9 9 9 9 9 19 19 19 19 ...
...
Seen as a triangle T(n, k):
[0] 0;
[1] 1, 1;
[2] 2, 1, 2;
[3] 3, 2, 2, 3;
[4] 4, 3, 2, 3, 4;
[5] 5, 4, 3, 3, 4, 5;
[6] 6, 5, 4, 3, 4, 5, 6;
[7] 7, 6, 5, 4, 4, 5, 6, 7;
[8] 8, 7, 6, 5, 4, 5, 6, 7, 8;
[9] 9, 8, 7, 6, 5, 5, 6, 7, 8, 9;
MAPLE
# Maple programs for lunar arithmetic are in A087062.
# Seen as a triangle:
T := (n, k) -> if n - k > k then n - k else k fi:
for n from 0 to 9 do seq(T(n, k), k = 0..n) od; # Peter Luschny, May 07 2023
MATHEMATICA
ladd[x_, y_] := FromDigits[MapThread[Max, IntegerDigits[#, 10, Max @@ IntegerLength /@ {x, y}] & /@ {x, y}]]; Flatten[Table[ladd[k, n - k], {n, 0, 13}, {k, 0, n}]] (* Davin Park, Sep 29 2016 *)
PROG
(PARI) ladd=A087061(m, n)=fromdigits(vector(if(#(m=digits(m))>#n=digits(n), #n=Vec(n, -#m), #m<#n, #m=Vec(m, -#n), #n), k, max(m[k], n[k]))) \\ M. F. Hasler, Nov 12 2017, updated Nov 15 2018
CROSSREFS
Cf. A087062 (multiplication), A087097 (primes), A004197, A003056.
KEYWORD
nonn,tabl,nice,base,look
AUTHOR
Marc LeBrun, Oct 09 2003
EXTENSIONS
Edited by M. F. Hasler, Nov 12 2017
STATUS
approved
G.f.: Sum_{n>=1} n * x^(n*(n+1)/2) / (1 - x^n).
+10
37
1, 1, 3, 1, 3, 4, 3, 1, 6, 5, 3, 4, 3, 5, 11, 1, 3, 8, 3, 6, 12, 5, 3, 4, 8, 5, 12, 8, 3, 13, 3, 1, 12, 5, 15, 12, 3, 5, 12, 6, 3, 15, 3, 9, 26, 5, 3, 4, 10, 10, 12, 9, 3, 17, 18, 8, 12, 5, 3, 17, 3, 5, 28, 1, 18, 19, 3, 9, 12, 17, 3, 13, 3, 5, 27, 9, 21, 20, 3, 6, 21, 5, 3, 19, 18, 5, 12, 12, 3
OFFSET
1,3
COMMENTS
Conjecture: a(n) is the total number of parts in all partitions of n into consecutive parts. - Omar E. Pol, Apr 23 2017
Conjecture: row sums of A285914. - Omar E. Pol, Apr 30 2017
(The conjectures are true. See Joerg Arndt's proof in the Links section.) - Omar E. Pol, Jun 14 2017
Row lengths of A299765. - Omar E. Pol, Jul 23 2018
From Omar E. Pol, Oct 20 2019: (Start)
Row sums of A328361.
a(n) = 3 iff n is an odd prime. (End)
LINKS
David A. Corneth, Table of n, a(n) for n = 1..10000 (First 1024 terms from Paul D. Hanna)
Joerg Arndt, Proof of the conjectures of A204217, SeqFan Mailing List, Jun 03 2017.
Michael H. Mertens, Ken Ono and Larry Rolen, Mock modular Eisenstein series with Nebentypus, arXiv:1906.07410 [math.NT], 2019, p. 4, 9.
FORMULA
a(k) = 1 iff k = 2^n for n>=0.
G.f.: (1/Theta4(x)^2) * Sum_{n>=1} (-1)^(n-1)* n*x^(n*(n+1)/2) * (1 - x^n)/(1 + x^n)^2 where Theta4(x) = 1 + 2*Sum_{n>=1} (-x)^(n^2), due to an identity of Ramanujan.
Conjecture: a(n) = Sum_{k=1..n} k*A285898(n,k). - R. J. Mathar, Apr 30 2017
Conjecture: a(n) = Sum_{k=1..A003056(n)} k*A237048(n,k). - Omar E. Pol, Apr 30 2017
(The conjectures are true. See Joerg Arndt's proof in the Links section.) - Omar E. Pol, Jun 14 2017
Sum_{k=1..n} a(k) ~ 2^(3/2) * n^(3/2) / 3. - Vaclav Kotesovec, Oct 23 2024
EXAMPLE
G.f.: A(x) = x + x^2 + 3*x^3 + x^4 + 3*x^5 + 4*x^6 + 3*x^7 + x^8 + ...
follows by expanding A(x) = x/(1-x) + 2*x^3/(1-x^2) + 3*x^6/(1-x^3) + 4*x^10/(1-x^4) + ...
Also, by a Ramanujan identity:
A(x)*Theta4(x)^2 = x*(1-x)/(1+x)^2 - 2*x^3*(1-x^2)/(1+x^2)^2 + 3*x^6*(1-x^3)/(1+x^3)^2 - 4*x^10*(1-x^4)/(1+x^4)^2 + 5*x^15*(1-x^5)/(1+x^5)^2 + ...
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 total number of parts is 11, so a(15) = 11. - Omar E. Pol, Apr 23 2017
From Omar E. Pol, Nov 30 2020: (Start)
Illustration of initial terms:
Diagram
n a(n) _
1 1 _|1
2 1 _|1 _
3 3 _|1 |2
4 1 _|1 _|
5 3 _|1 |2 _
6 4 _|1 _| |3
7 3 _|1 |2 |
8 1 _|1 _| _|
9 6 _|1 |2 |3 _
10 5 |1 | | |4
...
a(n) is the total length of all vertical line segments that are below and that share one vertex with the horizontal line segments that are in the n-th level of the diagram. For more information about the diagram see A286001 and A237593. (End)
MATHEMATICA
terms = 1024; Sum[n*x^(n*(n+1)/2)/(1-x^n), {n, 1, Ceiling[Sqrt[2*terms]]}] + O[x]^(terms+1) // CoefficientList[#, x]& // Rest (* Jean-François Alcover, Jun 04 2017 *)
Table[Sum[If[n > k*(k-1)/2 && IntegerQ[n/k - (k-1)/2], k, 0], {k, Divisors[2*n]}], {n, 1, 100}] (* Vaclav Kotesovec, Oct 23 2024 *)
PROG
(PARI) {a(n)=polcoeff(sum(m=1, n, m*x^(m*(m+1)/2)/(1-x^m+x*O(x^n))), n)}
(PARI) {a(n)=local(Theta4=1+2*sum(m=1, sqrtint(n+1), (-x)^(m^2))+x*O(x^n)); polcoeff(1/Theta4^2*sum(m=1, sqrtint(2*n+1), (-1)^(m-1)*m*x^(m*(m+1)/2)*(1-x^m)/(1+x^m+x*O(x^n))^2), n)}
(PARI) a(n) = {nb = 0; forpart(v=n, nbp = #v; if ((#Set(v)==#v) && (v[nbp] - v[1] == #v-1), nb += #v); ); nb; } \\ Michel Marcus, Apr 23 2017
(PARI) a(n) = {my(i=2, t=1); n--; while(n>0, t += (i*(n%i==0)); n-=i; i++); t} \\ David A. Corneth, Apr 28 2017
KEYWORD
nonn,easy
AUTHOR
Paul D. Hanna, Jan 12 2012
STATUS
approved
A table of partitions into consecutive parts (see Comments lines for definition).
+10
37
1, 2, 3, 2, 4, 1, 5, 3, 6, 2, 3, 7, 4, 2, 8, 3, 1, 9, 5, 4, 10, 4, 3, 4, 11, 6, 2, 3, 12, 5, 5, 2, 13, 7, 4, 1, 14, 6, 3, 5, 15, 8, 6, 4, 5, 16, 7, 5, 3, 4, 17, 9, 4, 2, 3, 18, 8, 7, 6, 2, 19, 10, 6, 5, 1, 20, 9, 5, 4, 6, 21, 11, 8, 3, 5, 6, 22, 10, 7, 7, 4, 5, 23, 12, 6, 6, 3, 4, 24, 11, 9, 5, 2, 3, 25, 13, 8, 4, 7, 2
OFFSET
1,2
COMMENTS
This is a triangle read by rows: T(n,k), n>=1, k>=1, in which column k lists successive blocks of k consecutive terms in decreasing order, where the m-th block starts with k + m - 1, m>=1, and the first element of column k is in the row k*(k+1)/2.
The partitions of n into consecutive parts are represented from the row n up to row A288529(n) as maximum, exclusively in the columns where the blocks begin.
More precisely, the partition of n into exactly k consecutive parts (if such partition exists) is represented in the column k from the row n up to row n + k - 1 (see examples).
A288772(n) is the minimum number of rows that are required to represent in this table the partitions of all positive integers <= n into consecutive parts.
A288773(n) is the largest of all positive integers whose partitions into consecutive parts can be totally represented in the first n rows of this table.
A288774(n) is the largest positive integers whose partitions into consecutive parts can be totally represented in the first n rows of this table.
Theorem: the smallest part of the partition of n into exactly k consecutive parts (if such partition exists) equals the number of positive integers <= n having a partition into exactly k consecutive parts.
EXAMPLE
Table de partitions into consecutive parts (first 28 rows):
1;
2;
3, 2;
4, 1;
5, 3;
6, 2, 3;
7, 4, 2;
8, 3, 1;
9, 5, 4;
10, 4, 3, 4;
11, 6, 2, 3;
12, 5, 5, 2;
13, 7, 4, 1;
14, 6, 3, 5;
15, 8, 6, 4, 5;
16, 7, 5, 3, 4;
17, 9, 4, 2, 3;
18, 8, 7, 6, 2;
19, 10, 6, 5, 1;
20, 9, 5, 4, 6;
21, 11, 8, 3, 5, 6;
22, 10, 7, 7, 4, 5;
23, 12, 6, 6, 3, 4;
24, 11, 9, 5, 2, 3;
25, 13, 8, 4, 7, 2;
26, 12, 7, 8, 6, 1;
27, 14, 10, 7, 5, 7;
28, 13, 9, 6, 4, 6, 7;
...
Figures A..G show the location (in the columns of the table) of the partitions of n = 1..7 (respectively) into consecutive parts:
. ------------------------------------------------------------------------
Fig: A B C D E F G
. ------------------------------------------------------------------------
. n: 1 2 3 4 5 6 7
Row ------------------------------------------------------------------------
1 | [1];| 1; | 1; | 1; | 1; | 1; | 1; |
2 | | [2];| 2; | 2; | 2; | 2; | 2; |
3 | | | [3],[2];| 3; 2;| 3, 2; | 3, 2; | 3, 2; |
4 | | | 4 ,[1];| [4], 1;| 4, 1; | 4, 1; | 4, 1; |
5 | | | | | [5],[3]; | 5, 3; | 5, 3; |
6 | | | | | 6, [2], 3;| [6], 2, [3];| 6, 2, 3;|
7 | | | | | | 7, 4, [2];| [7],[4], 2;|
8 | | | | | | 8, 3, [1];| 8, [3], 1;|
. ------------------------------------------------------------------------
Figure F: for n = 6 the partitions of 6 into consecutive parts are [6] and [3, 2, 1]. These partitions have 1 and 3 consecutive parts respectively. On the other hand we can find the mentioned partitions in the columns 1 and 3 of this table, starting at the row 6.
.
Figures H..K show the location (in the columns of the table) of the partitions of 8..11 (respectively) into consecutive parts:
. --------------------------------------------------------------------
Fig: H I J K
. --------------------------------------------------------------------
. n: 8 9 10 11
Row --------------------------------------------------------------------
1 | 1; | 1; | 1; | 1; |
1 | 2; | 2; | 2; | 2; |
3 | 3, 2; | 3, 2; | 3, 2; | 3, 2; |
4 | 4, 1; | 4, 1; | 4, 1; | 4, 1; |
5 | 5, 3; | 5, 3; | 5, 3; | 5, 3; |
6 | 6, 2, 3;| 6, 2, 3; | 6, 2, 3; | 6, 2, 3; |
7 | 7, 4, 2;| 7, 4, 2; | 7, 4, 2; | 7, 4, 2; |
8 | [8], 3, 1;| 8, 3, 1; | 8, 3, 1; | 8, 3, 1; |
9 | | [9],[5],[4]; | 9, 5, 4; | 9, 5, 4; |
10 | | 10, [4],[3], 4;| [10], 4, 3, [4];| 10, 4, 3; 4;|
11 | | 11, 6, [2], 3;| 11, 6, 2; [3];| [11],[6], 2, 3;|
12 | | | 12, 5, 5, [2];| 12, [5], 5, 2;|
13 | | | 13, 7, 4, [1];| 13, 7, 4, 1;|
. --------------------------------------------------------------------
Figure J: For n = 10 the partitions of 10 into consecutive parts are [10] and [4, 3, 2, 1]. These partitions have 1 and 4 consecutive parts respectively. On the other hand we can find the mentioned partitions in the columns 1 and 4 of this table, starting at the row 10.
Illustration of initial terms arranged into the diagram of the triangle A237591:
. _
. _|1|
. _|2 _|
. _|3 |2|
. _|4 _|1|
. _|5 |3 _|
. _|6 _|2|3|
. _|7 |4 |2|
. _|8 _|3 _|1|
. _|9 |5 |4 _|
. _|10 _|4 |3|4|
. _|11 |6 _|2|3|
. _|12 _|5 |5 |2|
. _|13 |7 |4 _|1|
. _|14 _|6 _|3|5 _|
. _|15 |8 |6 |4|5|
. _|16 _|7 |5 |3|4|
. _|17 |9 _|4 _|2|3|
. _|18 _|8 |7 |6 |2|
. _|19 |10 |6 |5 _|1|
. _|20 _|9 _|5 |4|6 _|
. _|21 |11 |8 _|3|5|6|
. _|22 _|10 |7 |7 |4|5|
. _|23 |12 _|6 |6 |3|4|
. _|24 _|11 |9 |5 _|2|3|
. _|25 |13 |8 _|4|7 |2|
. _|26 _|12 _|7 |8 |6 _|1|
. _|27 |14 |10 |7 |5|7 _|
. |28 |13 |9 |6 |4|6|7|
...
The number of horizontal line segments in the n-th row of the diagram equals A001227(n), the number of partitions of n into consecutive parts.
CROSSREFS
Row n has length A003056(n).
The first element of column k is in row A000217(k).
For another version see A286001.
KEYWORD
nonn,tabf
AUTHOR
Omar E. Pol, Apr 30 2017
STATUS
approved
Numbers having no more than one 0 in their binary representation.
+10
36
0, 1, 2, 3, 5, 6, 7, 11, 13, 14, 15, 23, 27, 29, 30, 31, 47, 55, 59, 61, 62, 63, 95, 111, 119, 123, 125, 126, 127, 191, 223, 239, 247, 251, 253, 254, 255, 383, 447, 479, 495, 503, 507, 509, 510, 511, 767, 895, 959, 991, 1007, 1015, 1019, 1021, 1022, 1023
OFFSET
0,3
COMMENTS
Complement of A158582. - Reinhard Zumkeller, Apr 16 2009
Also union of A168604 and A030130. - Douglas Latimer, Jul 19 2012
Numbers of the form 2^t - 2^k - 1, 0 <= k < t.
n is in the sequence if and only if 2*n+1 is in the sequence. - Robert Israel, Dec 14 2018
Also the least binary rank of a strict integer partition of n, where the binary rank of a partition y is given by Sum_i 2^(y_i-1). - Gus Wiseman, May 24 2024
LINKS
Vladimir Shevelev, On the Basis Polynomials in the Theory of Permutations with Prescribed Up-Down Structure, arXiv:0801.0072 [math.CO], 2007-201. See Section 14.
Vladimir Shevelev, Binomial Coefficient Predictors, Journal of Integer Sequences, Vol. 14 (2011), Article 11.2.8.
FORMULA
A023416(a(n)) <= 1; A023416(a(n)) = A023532(n-2) for n>1;
A000120(a(u)) <= A000120(a(v)) for u<v; A000120(a(n)) = A003056(n).
a(0)=0, n>0: a(n+1) = Min{m>n: BinOnes(a(n))<=BinOnes(m)} with BinOnes=A000120.
If m = floor((sqrt(8*n+1) - 1) / 2), then a(n) = 2^(m+1) - 2^(m*(m+3)/2 - n) - 1. - Carl R. White, Feb 10 2009
A029931(a(n)) = n and A029931(m) != n for m < a(n). - Reinhard Zumkeller, Feb 28 2014
A265705(a(n),k) = A265705(a(n),a(n)-k), k = 0 .. a(n). - Reinhard Zumkeller, Dec 15 2015
a(A014132(n)-1) = 2*a(n-1)+1 for n >= 1. - Robert Israel, Dec 14 2018
Sum_{n>=1} 1/a(n) = A065442 + A160502 = 3.069285887459... . - Amiram Eldar, Jan 09 2024
A019565(a(n)) = A077011(n). - Gus Wiseman, May 24 2024
EXAMPLE
From Tilman Piesk, May 09 2012: (Start)
This may also be viewed as a triangle: In binary:
0 0
1 2 01 10
3 5 6 011 101 110
7 11 13 14 0111 1011 1101 1110
15 23 27 29 30 01111 10111 11011 11101 11110
31 47 55 59 61 62
63 95 111 119 123 125 126
Left three diagonals are A000225, A055010, A086224. Right diagonal is A000918. Central column is A129868. Numbers in row n (counted from 0) have n binary 1s. (End)
From Gus Wiseman, May 24 2024: (Start)
The terms together with their binary expansions and binary indices begin:
0: 0 ~ {}
1: 1 ~ {1}
2: 10 ~ {2}
3: 11 ~ {1,2}
5: 101 ~ {1,3}
6: 110 ~ {2,3}
7: 111 ~ {1,2,3}
11: 1011 ~ {1,2,4}
13: 1101 ~ {1,3,4}
14: 1110 ~ {2,3,4}
15: 1111 ~ {1,2,3,4}
23: 10111 ~ {1,2,3,5}
27: 11011 ~ {1,2,4,5}
29: 11101 ~ {1,3,4,5}
30: 11110 ~ {2,3,4,5}
31: 11111 ~ {1,2,3,4,5}
47: 101111 ~ {1,2,3,4,6}
55: 110111 ~ {1,2,3,5,6}
59: 111011 ~ {1,2,4,5,6}
61: 111101 ~ {1,3,4,5,6}
62: 111110 ~ {2,3,4,5,6}
(End)
MAPLE
seq(seq(2^a-1-2^b, b=a-1..0, -1), a=1..11); # Robert Israel, Dec 14 2018
MATHEMATICA
fQ[n_] := DigitCount[n, 2, 0] < 2; Select[ Range[0, 2^10], fQ] (* Robert G. Wilson v, Aug 02 2012 *)
PROG
(Haskell)
a089633 n = a089633_list !! (n-1)
a089633_list = [2 ^ t - 2 ^ k - 1 | t <- [1..], k <- [t-1, t-2..0]]
-- Reinhard Zumkeller, Feb 23 2012
(PARI) {insq(n) = local(dd, hf, v); v=binary(n); hf=length(v); dd=sum(i=1, hf, v[i]); if(dd<=hf-2, -1, 1)}
{for(w=0, 1536, if(insq(w)>=0, print1(w, ", ")))}
\\ Douglas Latimer, May 07 2013
(PARI) isoka(n) = #select(x->(x==0), binary(n)) <= 1; \\ Michel Marcus, Dec 14 2018
(Python)
from itertools import count, islice
def A089633_gen(): # generator of terms
return ((1<<t)-(1<<k)-1 for t in count(1) for k in range(t-1, -1, -1))
A089633_list = list(islice(A089633_gen(), 30)) # Chai Wah Wu, Feb 10 2023
CROSSREFS
Cf. A181741 (primes), union of A081118 and A000918, apart from initial -1.
For least binary index (instead of rank) we have A001511.
Applying A019565 (Heinz number of binary indices) gives A077011.
For greatest binary index we have A029837 or A070939, opposite A070940.
Row minima of A118462 (binary ranks of strict partitions).
For sum instead of minimum we have A372888, non-strict A372890.
A000009 counts strict partitions, ranks A005117.
A048675 gives binary rank of prime indices, distinct A087207.
A048793 lists binary indices, product A096111, reverse A272020.
A277905 groups all positive integers by binary rank of prime indices.
KEYWORD
nonn,base
AUTHOR
Reinhard Zumkeller, Jan 01 2004
STATUS
approved
Triangle read by rows: T(n,k), n >= 1, k >= 1, in which column k lists positive terms interleaved with k-1 zeros, starting in row k(k+1)/2. If k is odd the positive terms of column k are k's, otherwise if k is even the positive terms of column k are the odd numbers greater than k in increasing order.
+10
35
1, 1, 1, 3, 1, 0, 1, 5, 1, 0, 3, 1, 7, 0, 1, 0, 0, 1, 9, 3, 1, 0, 0, 5, 1, 11, 0, 0, 1, 0, 3, 0, 1, 13, 0, 0, 1, 0, 0, 7, 1, 15, 3, 0, 5, 1, 0, 0, 0, 0, 1, 17, 0, 0, 0, 1, 0, 3, 9, 0, 1, 19, 0, 0, 0, 1, 0, 0, 0, 5, 1, 21, 3, 0, 0, 7, 1, 0, 0, 11, 0, 0, 1, 23, 0, 0, 0, 0, 1, 0, 3, 0, 0, 0, 1, 25, 0, 0, 5, 0, 1, 0, 0, 13, 0, 0
OFFSET
1,4
COMMENTS
Conjecture: the positive terms in row n are the odd divisors of n.
Note that the elements appear with an unusual ordering, for example; row 45 is 1, 45, 3, 0, 5, 15, 0, 0, 9.
The positive terms give A261697.
Row n has length A003056(n) hence column k starts in row A000217(k).
The number of positive terms in row n is A001227(n).
The sum of row n is A000593(n).
The connection with the symmetric representation of sigma is as follows: A237048 --> A235791 --> A237591 --> A237593.
Proof of the conjecture: let n = 2^m*s*t with s and t odd. The property stated in A237048 verifies the conjecture with odd divisor k <= A003056(n) of n in position k and odd divisor t > A003056(n) in position 2^(m+1)*s. Therefore reading in row n the nonzero odd positions from left to right and then the nonzero even positions from right to left gives all odd divisors of n in increasing order. - Hartmut F. W. Hoft, Oct 25 2015
A237048 gives the signum function (A057427) of this sequence. - Omar E. Pol, Nov 14 2016
From Peter Munn, Jul 30 2017: (Start)
Each odd divisor d of n corresponds to n written as a sum of consecutive integers (n/d - (d-1)/2) .. (n/d + (d-1)/2). After canceling any corresponding negative and positive terms and deleting any zero term, the lower bound becomes abs(n/d - d/2) + 1/2, leaving k terms where k = n/d + d/2 - abs(n/d - d/2). It can be shown T(n,k) = d.
This sequence thereby defines a one to one relationship between odd divisors of n and partitions of n into k consecutive parts.
The relationship is expressed below using 4 sequences (with matching row lengths), starting with this one:
A261699(n,k) = d, the odd divisor.
A211343(n,k) = abs(n/d - d/2) + 1/2, smallest part.
A285914(n,k) = k, number of parts.
A286013(n,k) = n/d + (d-1)/2, largest part.
If no partition of n into k consecutive parts exists, the corresponding sequence terms are 0.
(End)
FORMULA
From Hartmut F. W. Hoft, Oct 25 2015: (Start)
T(n, k) = 2n/k, if A237048(n, k) = 1 and k even,
and in accordance with the definition:
T(n, k) = k, if A237048(n, k) = 1 and k odd,
T(n, k) = 0 otherwise; for k <= A003056(n).
(End)
For m >= 1, d >= 1 and odd, T(m*d, m + d/2 - abs(m - d/2)) = d. - Peter Munn, Jul 24 2017
EXAMPLE
Triangle begins:
1;
1;
1, 3;
1, 0;
1, 5;
1, 0, 3;
1, 7, 0;
1, 0, 0;
1, 9, 3;
1, 0, 0, 5;
1, 11, 0, 0;
1, 0, 3, 0;
1, 13, 0, 0;
1, 0, 0, 7;
1, 15, 3, 0, 5;
1, 0, 0, 0, 0;
1, 17, 0, 0, 0;
1, 0, 3, 9, 0;
1, 19, 0, 0, 0;
1, 0, 0, 0, 5;
1, 21, 3, 0, 0, 7;
1, 0, 0, 11, 0, 0;
1, 23, 0, 0, 0, 0;
1, 0, 3, 0, 0, 0;
1, 25, 0, 0, 5, 0;
1, 0, 0, 13, 0, 0;
1, 27, 3, 0, 0, 9;
1, 0, 0, 0, 0, 0, 7;
...
From Omar E. Pol, Dec 19 2016: (Start)
Illustration of initial terms in a right triangle whose structure is the same as the structure of A237591:
Row _
1 _|1|
2 _|1 _|
3 _|1 |3|
4 _|1 _|0|
5 _|1 |5 _|
6 _|1 _|0|3|
7 _|1 |7 |0|
8 _|1 _|0 _|0|
9 _|1 |9 |3 _|
10 _|1 _|0 |0|5|
11 _|1 |11 _|0|0|
12 _|1 _|0 |3 |0|
13 _|1 |13 |0 _|0|
14 _|1 _|0 _|0|7 _|
15 _|1 |15 |3 |0|5|
16 _|1 _|0 |0 |0|0|
17 _|1 |17 _|0 _|0|0|
18 _|1 _|0 |3 |9 |0|
19 _|1 |19 |0 |0 _|0|
20 _|1 _|0 _|0 |0|5 _|
21 _|1 |21 |3 _|0|0|7|
22 _|1 _|0 |0 |11 |0|0|
23 _|1 |23 _|0 |0 |0|0|
24 _|1 _|0 |3 |0 _|0|0|
25 _|1 |25 |0 _|0|5 |0|
26 _|1 _|0 _|0 |13 |0 _|0|
27 _|1 |27 |3 |0 |0|9 _|
28 |1 |0 |0 |0 |0|0|7|
... (End)
MATHEMATICA
T[n_, k_?OddQ] /; n == k (k + 1)/2 := k; T[n_, k_?OddQ] /; Mod[n - k (k + 1)/2, k] == 0 := k; T[n_, k_?EvenQ] /; n == k (k + 1)/2 := k + 1; T[n_, k_?EvenQ] /; Mod[n - k (k + 1)/2, k] == 0 := T[n - k, k] + 2; T[_, _] = 0; Table[T[n, k], {n, 1, 26}, {k, 1, Floor[(Sqrt[1 + 8 n] - 1)/2]}] // Flatten (* Jean-François Alcover, Sep 21 2015 *)
(* alternate definition using function a237048 *)
T[n_, k_] := If[a237048[n, k] == 1, If[OddQ[k], k, 2n/k], 0] (* Hartmut F. W. Hoft, Oct 25 2015 *)
KEYWORD
nonn,tabf
AUTHOR
Omar E. Pol, Sep 20 2015
STATUS
approved

Search completed in 0.224 seconds