OFFSET
1,1
COMMENTS
a(n) is also the length of the n-th pair of orthogonal line segments in a diagram of compositions, see example.
a(n) is also the largest part plus the number of parts of the n-th region of the mentioned diagram (if the axes both "x" and "y" are included in the diagram).
a(n) is also the number of toothpicks added at n-th stage to the structure of A228366. Essentially the first differences of A228366.
The equivalent sequence for partitions is A207779.
LINKS
EXAMPLE
Illustration of initial terms (n = 1..16) using a diagram of compositions in which A001511(n) is the length of the horizontal line segment in row n and A006519(n) is the length of the vertical line segment ending in row n. Hence a(n) is the length of the n-th pair of orthogonal line segments. Also counting both the x-axis and the y-axis we have that A001511(n) is also the largest part of the n-th region of the diagram and A006519(n) is also the number of parts of the n-th region of the diagram, see below.
---------------------------------------------------------
. Diagram of
---------------------------------------------------------
1 1 _| | | | | 1 2
2 2 _ _| | | | 2 4
3 1 _| | | | 1 2
4 3 _ _ _| | | 4 7
5 1 _| | | | 1 2
6 2 _ _| | | 2 4
7 1 _| | | 1 2
8 4 _ _ _ _| | 8 12
9 1 _| | | | 1 2
10 2 _ _| | | 2 4
11 1 _| | | 1 2
12 3 _ _ _| | 4 7
13 1 _| | | 1 2
14 2 _ _| | 2 4
15 1 _| | 1 2
16 5 _ _ _ _ _| 16 21
...
If written as an irregular triangle the sequence begins:
2;
4;
2, 7;
2, 4, 2, 12;
2, 4, 2, 7, 2, 4, 2, 21;
2, 4, 2, 7, 2, 4, 2, 12, 2, 4, 2, 7, 2, 4, 2, 38;
...
Counting both the x-axis and the y-axis we have that A038712(n) is the area (or the number of cells) of the n-th region of the diagram. Note that adding only the x-axis to the diagram we have a tree. - Omar E. Pol, Nov 07 2018
MATHEMATICA
Array[1 + # + 2^# &[IntegerExponent[#, 2]] &, 84] (* Michael De Vlieger, Nov 06 2018 *)
PROG
(PARI) A228367(n) = (1 + valuation(n, 2) + 2^valuation(n, 2)); \\ Antti Karttunen, Nov 06 2018
(Python)
def A228367(n): return (m:=n&-n)+m.bit_length() # Chai Wah Wu, Jul 14 2022
CROSSREFS
KEYWORD
nonn,tabf
AUTHOR
Omar E. Pol, Aug 22 2013
STATUS
approved