login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A228367 n-th element of the ruler function plus the highest power of 2 dividing n. 9
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, 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, 71, 2, 4, 2, 7, 2, 4, 2, 12, 2, 4, 2, 7, 2, 4, 2, 21, 2, 4, 2, 7 (list; graph; refs; listen; history; text; internal format)
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
FORMULA
a(n) = A001511(n) + A006519(n).
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
n A001511(n) compositions A006519(n) a(n)
---------------------------------------------------------
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;
...
Row lengths is A011782. Right border gives A005126.
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
Sequence in context: A021416 A094756 A307667 * A110925 A214789 A207631
KEYWORD
nonn,tabf
AUTHOR
Omar E. Pol, Aug 22 2013
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 11 21:32 EDT 2024. Contains 372421 sequences. (Running on oeis4.)