VOOZH about

URL: https://oeis.org/A382255

⇱ A382255 - OEIS


login
A382255
Heinz number of the partition corresponding to run lengths in the bits of n.
4
1, 2, 4, 3, 6, 8, 6, 5, 10, 12, 16, 12, 9, 12, 10, 7, 14, 20, 24, 18, 24, 32, 24, 20, 15, 18, 24, 18, 15, 20, 14, 11, 22, 28, 40, 30, 36, 48, 36, 30, 40, 48, 64, 48, 36, 48, 40, 28, 21, 30, 36, 27, 36, 48, 36, 30, 25, 30, 40, 30, 21, 28, 22, 13, 26, 44, 56, 42
OFFSET
0,2
COMMENTS
The run lengths (number of consecutive bits that are equal) in the binary numbers in [2^(L-1), 2^L-1], i.e., of bit length L, yield all possible compositions of L, i.e., the partitions with any possible order of the parts.
Associated to any composition (p1, ..., pK) is their Heinz number prime(p1)*...*prime(pK) which depends only on the partition, i.e., not on the order of the parts.
The sequence can also be read as a table with row lengths 1, 1, 2, 4, 8, 16, 32, ... (= A011782), where row L = 0, 1, 2, 3, ... lists the 2^(L-1) compositions of L through their Heinz numbers (which will appear more than once if they contain at least two distinct parts).
LINKS
FORMULA
a(2^n) = A001747(n+1).
a(2^n-1) = A008578(n+1).
a(2^n+1) = A001749(n-1) for n>=2.
EXAMPLE
n | binary | partition | a(n) = Heinz number
---+--------+-----------+--------------------
0 | (0) | empty sum | 1 = empty product
1 | 1 | 1 | 2 = prime(1)
2 | 10 | 1+1 | 4 = prime(1) * prime(1)
3 | 11 | 2 | 3 = prime(2)
4 | 100 | 1+2 | 6 = prime(1) * prime(2)
5 | 101 | 1+1+1 | 8 = 2^3 = prime(1) * prime(1) * prime(1)
6 | 110 | 2+1 | 6 = prime(2) * prime(1)
7 | 111 | 3 | 5 = prime(3)
8 | 1000 | 1+3 | 10 = 2*5 = prime(1) * prime(3)
9 | 1001 | 1+2+1 | 12 = 2^2*3 = prime(1) * prime(2) * prime(1)
...| ... | ... | ...
For example, n = 4 = 100[2] (in binary) has run lengths (1, 2), namely: one bit 1 followed by two bits 0. This gives a(4) = prime(1)*prime(2) = 6.
Next, n = 5 = 101[2] (in binary) has run lengths (1, 1, 1): one bit 1, followed by one bit 0, followed by one bit 1. This gives a(4) = prime(1)^3 = 8.
Then, n = 6 = 110[2] (in binary) has run lengths (2, 1): first two bits 1, then one bit 0. This is the same as for 4, just in reverse order, so it yields the same Heinz number a(6) = prime(2)*prime(1) = 6.
Then, n = 7 = 111[2] (in binary) has run lengths (3), namely: three bits 1. This gives a(5) = prime(3) = 5.
Sequence written as irregular triangle:
1;
2;
4, 3;
6, 8, 6, 5;
10, 12, 16, 12, 9, 12, 10, 7;
14, 20, 24, 18, 24, 32, 24, 20, 15, 18, 24, 18, 15, 20, 14, 11;
...
MAPLE
a:= proc(n) option remember; `if`(n<2, 1+n, (p->
a(iquo(n, 2^p))*ithprime(p))(padic[ordp](n+(n mod 2), 2)))
end:
seq(a(n), n=0..100); # Alois P. Heinz, Mar 20 2025
PROG
(PARI)
Heinz(p)=vecprod([ prime(k) | k <- p ])
RL(v) = if(#v, v=Vec(select(t->t, concat([1, v[^1]-v[^-1], 1]), 1)); v[^1]-v[^-1])
apply( {A382255(n) = Heinz(RL(binary(n)))}, [0..99] )
CROSSREFS
Cf. A112798 and A296150 (partitions sorted by Heinz number).
Cf. A185974, A334433, A334435, A334438, A334434, A129129, A334436 (partitions given as Heinz numbers, in Abramowitz-Stegun, Maple, Mathematica order).
For "constructive" lists of partitions see A036036 (Abramowitz and Stegun order), A036036 (reversed), A080576 (Maple order), A080577 (Mathematica order).
Row sums of triangle give A030017(n+1).
Cf. A007088 (the binary numbers).
Cf. A101211 (the run lengths as rows of a table).
Sequence in context: A280864 A364884 A369825 * A384064 A266411 A264740
KEYWORD
nonn,look,base
AUTHOR
M. F. Hasler and Ali Sada, Mar 19 2025
STATUS
approved