A194602 Integer partitions interpreted as binary numbers.
0, 1, 3, 5, 7, 11, 15, 21, 23, 27, 31, 43, 47, 55, 63, 85, 87, 91, 95, 111, 119, 127, 171, 175, 183, 191, 219, 223, 239, 255, 341, 343, 347, 351, 367, 375, 383, 439, 447, 479, 495, 511, 683, 687, 695, 703, 731, 735, 751, 767, 879, 887, 895, 959, 991, 1023, 1365, 1367, 1371, 1375, 1391
Offset: 0
Examples
From _Joerg Arndt_, Nov 17 2012: (Start) With leading zeros included, the first A000041(n) terms correspond to the list of partitions of n as nondecreasing compositions in lexicographic order. For example, the first A000041(10)=42 terms correspond to the partitions of 10 as follows (dots for zeros in the binary expansions): [ n] binary(a(n)) a(n) partition [ 0] .......... 0 [ 1 1 1 1 1 1 1 1 1 1 ] [ 1] .........1 1 [ 1 1 1 1 1 1 1 1 2 ] [ 2] ........11 3 [ 1 1 1 1 1 1 1 3 ] [ 3] .......1.1 5 [ 1 1 1 1 1 1 2 2 ] [ 4] .......111 7 [ 1 1 1 1 1 1 4 ] [ 5] ......1.11 11 [ 1 1 1 1 1 2 3 ] [ 6] ......1111 15 [ 1 1 1 1 1 5 ] [ 7] .....1.1.1 21 [ 1 1 1 1 2 2 2 ] [ 8] .....1.111 23 [ 1 1 1 1 2 4 ] [ 9] .....11.11 27 [ 1 1 1 1 3 3 ] [10] .....11111 31 [ 1 1 1 1 6 ] [11] ....1.1.11 43 [ 1 1 1 2 2 3 ] [12] ....1.1111 47 [ 1 1 1 2 5 ] [13] ....11.111 55 [ 1 1 1 3 4 ] [14] ....111111 63 [ 1 1 1 7 ] [15] ...1.1.1.1 85 [ 1 1 2 2 2 2 ] [16] ...1.1.111 87 [ 1 1 2 2 4 ] [17] ...1.11.11 91 [ 1 1 2 3 3 ] [18] ...1.11111 95 [ 1 1 2 6 ] [19] ...11.1111 111 [ 1 1 3 5 ] [20] ...111.111 119 [ 1 1 4 4 ] [21] ...1111111 127 [ 1 1 8 ] [22] ..1.1.1.11 171 [ 1 2 2 2 3 ] [23] ..1.1.1111 175 [ 1 2 2 5 ] [24] ..1.11.111 183 [ 1 2 3 4 ] [25] ..1.111111 191 [ 1 2 7 ] [26] ..11.11.11 219 [ 1 3 3 3 ] [27] ..11.11111 223 [ 1 3 6 ] [28] ..111.1111 239 [ 1 4 5 ] [29] ..11111111 255 [ 1 9 ] [30] .1.1.1.1.1 341 [ 2 2 2 2 2 ] [31] .1.1.1.111 343 [ 2 2 2 4 ] [32] .1.1.11.11 347 [ 2 2 3 3 ] [33] .1.1.11111 351 [ 2 2 6 ] [34] .1.11.1111 367 [ 2 3 5 ] [35] .1.111.111 375 [ 2 4 4 ] [36] .1.1111111 383 [ 2 8 ] [37] .11.11.111 439 [ 3 3 4 ] [38] .11.111111 447 [ 3 7 ] [39] .111.11111 479 [ 4 6 ] [40] .1111.1111 495 [ 5 5 ] [41] .111111111 511 [ 10 ] (End)
Links
- Tilman Piesk, Table of n, a(n) for n = 0..8348
- Tilman Piesk, Same table with binary strings and non-one addends
- Tilman Piesk, Triangle with Young diagrams (n = 2..20).
- Tilman Piesk, Integer partitions and Permutations and partitions in the OEIS
- Tilman Piesk, Python functions, keynum_to_valnum(n) = a(n), valnum_to_keynum(a(n)) = n.
- Li-yao Xia, Identities for A194602
- Index entries for sequences related to binary expansion of n
Crossrefs
Programs
-
Mathematica
lim = 12; Sort[FromDigits[Reverse@ #, 2] & /@ Map[If[Length@ # == 0, {0}, Flatten@ Most@ #] &@ Riffle[#, Table[0, Length@ #]] &, Map[Table[1, # - 1] &, Sort@ IntegerPartitions@ lim /. 1 -> Nothing, {2}]]] (* Michael De Vlieger, Feb 14 2016 *)
-
PARI
isA194602(n) = if(!n,1,if(!(n%2),0,my(prl=0,rl=0); while(n, if(0==(n%2),if((prl && rl>prl)||0==(n%4), return(0)); prl=rl; rl=0, rl++); n >>= 1); ((0==prl)||(rl<=prl)))); \\ - Antti Karttunen, Dec 06 2021
Formula
a(n) = A228354(1+n) - 1. - Antti Karttunen, Dec 06 2021
Extensions
Comments edited by Li-yao Xia, May 13 2014
Incorrect PARI-program removed by Antti Karttunen, Dec 09 2021
Comments