A118462 Decimal equivalent of binary encoding of partitions into distinct parts.
0, 1, 2, 3, 4, 5, 8, 6, 9, 16, 7, 10, 17, 32, 11, 12, 18, 33, 64, 13, 19, 20, 34, 65, 128, 14, 21, 24, 35, 36, 66, 129, 256, 15, 22, 25, 37, 40, 67, 68, 130, 257, 512, 23, 26, 38, 41, 48, 69, 72, 131, 132, 258, 513, 1024, 27, 28, 39, 42, 49, 70, 73, 80, 133, 136, 259, 260, 514
Offset: 0
Examples
Partition 11 is [4,2], which gives binary 1010 (2^(4-1)+2^(2-1)), or 10, so a(11)=10. Triangle begins: 0; 1; 2; 3, 4; 5, 8; 6, 9, 16; 7, 10, 17, 32; 11, 12, 18, 33, 64; 13, 19, 20, 34, 65, 128; 14, 21, 24, 35, 36, 66, 129, 256; 15, 22, 25, 37, 40, 67, 68, 130, 257, 512; ... From _Gus Wiseman_, May 21 2024: (Start) The tetrangle of strict partitions (A118457) begins: (1) (2) (2,1) (3,1) (3,2) (3,2,1) (4,2,1) (4,3,1) (4,3,2) (3) (4) (4,1) (4,2) (4,3) (5,2,1) (5,3,1) (5) (5,1) (5,2) (5,3) (5,4) (6) (6,1) (6,2) (6,2,1) (7) (7,1) (6,3) (8) (7,2) (8,1) (9) (End)
Links
- Alois P. Heinz, Rows n = 0..42, flattened
- V. Shevelev, A recursion for divisor function over divisors belonging to a prescribed finite sequence of positive integers and a solution of the Lahiri problem for divisor function sigma_x(n), arXiv:0903.1743 [math.NT], 2009. [From _Vladimir Shevelev_, Mar 17 2009]
- Index entries for sequences that are permutations of the natural numbers
Programs
-
Maple
b:= proc(n, i) option remember; `if`(n=0, [0], `if`(i<1, [], [seq( map(p->p+2^(i-1)*j, b(n-i*j, i-1))[], j=0..min(1, n/i))])) end: T:= n-> sort(b(n$2))[]: seq(T(n), n=0..14); # Alois P. Heinz, Sep 06 2014
-
Mathematica
b[n_, i_] := b[n, i] = If[n==0, {0}, If[i<1, {}, Flatten[Table[b[n-i*j, i-1 ] + 2^(i-1)*j, {j, 0, Min[1, n/i]}]]]]; T[n_] := Sort[b[n, n]]; Table[ T[n], {n, 0, 14}] // Flatten (* Jean-François Alcover, Dec 27 2015, after Alois P. Heinz *) Table[Total[2^(#-1)]&/@Select[Reverse[IntegerPartitions[n]],UnsameQ@@#&],{n,0,10}] (* Gus Wiseman, May 21 2024 *)
Comments