cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-6 of 6 results.

A018819 Binary partition function: number of partitions of n into powers of 2.

Original entry on oeis.org

1, 1, 2, 2, 4, 4, 6, 6, 10, 10, 14, 14, 20, 20, 26, 26, 36, 36, 46, 46, 60, 60, 74, 74, 94, 94, 114, 114, 140, 140, 166, 166, 202, 202, 238, 238, 284, 284, 330, 330, 390, 390, 450, 450, 524, 524, 598, 598, 692, 692, 786, 786, 900, 900, 1014, 1014, 1154, 1154, 1294, 1294
Offset: 0

Views

Author

Keywords

Comments

First differences of A000123; also A000123 with terms repeated. See the relevant proof that follows the first formula below.
Among these partitions there is exactly one partition with all distinct terms, as every number can be expressed as the sum of the distinct powers of 2.
Euler transform of A036987 with offset 1.
a(n) is the number of "non-squashing" partitions of n, that is, partitions n = p_1 + p_2 + ... + p_k with 1 <= p_1 <= p_2 <= ... <= p_k and p_1 + p_2 + ... + p_i <= p_{i+1} for all 1 <= i < k. - N. J. A. Sloane, Nov 30 2003
Normally the OEIS does not include sequences like this where every term is repeated, but an exception was made for this one because of its importance. The unrepeated sequence A000123 is the main entry.
Number of different partial sums from 1 + [1, *2] + [1, *2] + ..., where [1, *2] means we can either add 1 or multiply by 2. E.g., a(6) = 6 because we have 6 = 1 + 1 + 1 + 1 + 1 + 1 = (1+1) * 2 + 1 + 1 = 1 * 2 * 2 + 1 + 1 = (1+1+1) * 2 = 1 * 2 + 1 + 1 + 1 + 1 = (1*2+1) * 2 where the connection is defined via expanding each bracket; e.g., this is 6 = 1 + 1 + 1 + 1 + 1 + 1 = 2 + 2 + 1 + 1 = 4 + 1 + 1 = 2 + 2 + 2 = 2 + 1 + 1 + 1 + 1 = 4 + 2. - Jon Perry, Jan 01 2004
Number of partitions p of n such that the number of compositions generated by p is odd. For proof see the Alekseyev and Adams-Watters link. - Vladeta Jovovic, Aug 06 2007
Differs from A008645 first at a(64). - R. J. Mathar, May 28 2008
Appears to be row sums of A155077. - Mats Granvik, Jan 19 2009
Number of partitions (p_1, p_2, ..., p_k) of n, with p_1 >= p_2 >= ... >= p_k, such that for each i, p_i >= p_{i+1} + ... + p_k. - John MCKAY (mckay(AT)encs.concordia.ca), Mar 06 2009 (these are the "non-squashing" partitions as nonincreasing lists).
Equals rightmost diagonal of triangle of A168261. Starting with offset 1 = eigensequence of triangle A115361 and row sums of triangle A168261. - Gary W. Adamson, Nov 21 2009
Equals convolution square root of A171238: (1, 2, 5, 8, 16, 24, 40, 56, 88, ...). - Gary W. Adamson, Dec 05 2009
Let B = the n-th convolution power of the sequence and C = the aerated variant of B. It appears that B/C = the binomial sequence beginning (1, n, ...). Example: Third convolution power of the sequence is (1, 3, 9, 19, 42, 78, 146, ...), with C = (1, 0, 3, 0, 9, 0, 19, ...). Then B/C = (1, 3, 6, 10, 15, 21, ...). - Gary W. Adamson, Aug 15 2016
From Gary W. Adamson, Sep 08 2016: (Start)
The limit of the matrix power M^k as n-->inf results in a single column vector equal to the sequence, where M is the following production matrix:
1, 0, 0, 0, 0, ...
1, 0, 0, 0, 0, ...
1, 1, 0, 0, 0, ...
1, 1, 0, 0, 0, ...
1, 1, 1, 0, 0, ...
1, 1, 1, 0, 0, ...
1, 1, 1, 1, 0, ...
1, 1, 1, 1, 0, ...
1, 1, 1, 1, 1, ...
... (End)
a(n) is the number of "non-borrowing" partitions of n, meaning binary subtraction of a smaller part from a larger part will never require place-value borrowing. - David V. Feldman, Jan 29 2020
From Gus Wiseman, May 25 2024: (Start)
Also the number of multisets of positive integers whose binary rank is n, where the binary rank of a multiset m is given by Sum_i 2^(m_i-1). For example, the a(1) = 1 through a(8) = 10 multisets are:
{1} {2} {12} {3} {13} {23} {123} {4}
{11} {111} {22} {122} {113} {1113} {33}
{112} {1112} {222} {1222} {223}
{1111} {11111} {1122} {11122} {1123}
{11112} {111112} {2222}
{111111} {1111111} {11113}
{11222}
{111122}
{1111112}
{11111111}
(End)

Examples

			G.f. = 1 + x + 2*x^2 + 2*x^3 + 4*x^4 + 4*x^5 + 6*x^6 + 6*x^7 + 10*x^8 + ...
a(4) = 4: the partitions are 4, 2 + 2, 2 + 1 + 1, 1 + 1 + 1 + 1.
a(7) = 6: the partitions are 4 + 2 + 1, 4 + 1 + 1 + 1, 2 + 2 + 2 + 1, 2 + 2 + 1 + 1 + 1, 2 + 1 + 1 + 1 + 1 + 1, 1 + 1 + 1 + 1 + 1 + 1 + 1.
From _Joerg Arndt_, Dec 17 2012: (Start)
The a(10) = 14 binary partitions of 10 are (in lexicographic order)
[ 1]  [ 1 1 1 1 1 1 1 1 1 1 ]
[ 2]  [ 2 1 1 1 1 1 1 1 1 ]
[ 3]  [ 2 2 1 1 1 1 1 1 ]
[ 4]  [ 2 2 2 1 1 1 1 ]
[ 5]  [ 2 2 2 2 1 1 ]
[ 6]  [ 2 2 2 2 2 ]
[ 7]  [ 4 1 1 1 1 1 1 ]
[ 8]  [ 4 2 1 1 1 1 ]
[ 9]  [ 4 2 2 1 1 ]
[10]  [ 4 2 2 2 ]
[11]  [ 4 4 1 1 ]
[12]  [ 4 4 2 ]
[13]  [ 8 1 1 ]
[14]  [ 8 2 ]
The a(11) = 14 binary partitions of 11 are obtained by appending 1 to each partition in the list.
The a(10) = 14 non-squashing partitions of 10 are (in lexicographic order)
[ 1]  [ 6 3 1 1 ]
[ 2]  [ 6 3 2 ]
[ 3]  [ 6 4 1 ]
[ 4]  [ 6 5 ]
[ 5]  [ 7 2 1 1 ]
[ 6]  [ 7 2 2 ]
[ 7]  [ 7 3 1 ]
[ 8]  [ 7 4 ]
[ 9]  [ 8 2 1 ]
[10]  [ 8 3 ]
[11]  [ 9 1 1 ]
[12]  [ 9 2 ]
[13]  [ 10 1 ]
[14]  [ 11 ]
The a(11) = 14 non-squashing partitions of 11 are obtained by adding 1 to the first part in each partition in the list.
(End)
From _David V. Feldman_, Jan 29 2020: (Start)
The a(10) = 14 non-borrowing partitions of 10 are (in lexicographic order)
[ 1] [1 1 1 1 1 1 1 1 1 1]
[ 2] [2 2 2 2 2]
[ 3] [3 1 1 1 1 1 1 1]
[ 4] [3 3 1 1 1 1]
[ 5] [3 3 2 2]
[ 6] [3 3 3 1]
[ 7] [5 1 1 1 1 1]
[ 8] [5 5]
[ 9] [6 2 2]
[10] [6 4]
[11] [7 1 1 1]
[12] [7 3]
[13] [9 1]
[14] [10]
The a(11) = 14 non-borrowing partitions of 11 are obtained either by adding 1 to the first even part in each partition (if any) or else appending a 1 after the last part.
(End)
For example, the five partitions of 4, written in nonincreasing order, are [1, 1, 1, 1], [2, 1, 1], [2, 2], [3, 1], [4]. The last four satisfy the condition, and a(4) = 4. The Maple program below verifies this for small values of n.
		

Crossrefs

A000123 is the main entry for the binary partition function and gives many more properties and references.
Cf. A115625 (labeled binary partitions), A115626 (labeled non-squashing partitions).
Convolution inverse of A106400.
Multiplicity of n in A048675, for distinct prime indices A087207.
Row lengths of A277905.
A118462 lists binary ranks of strict integer partitions, row sums A372888.
A372890 adds up binary ranks of integer partitions.

Programs

  • Haskell
    a018819 n = a018819_list !! n
    a018819_list = 1 : f (tail a008619_list) where
       f (x:xs) = (sum $ take x a018819_list) : f xs
    -- Reinhard Zumkeller, Jan 28 2012
    
  • Haskell
    import Data.List (intersperse)
    a018819 = (a018819_list !!)
    a018819_list = 1 : 1 : (<*>) (zipWith (+)) (intersperse 0) (tail a018819_list)
    -- Johan Wiltink, Nov 08 2018
    
  • Maple
    with(combinat); N:=8; a:=array(1..N); c:=array(1..N);
    for n from 1 to N do p:=partition(n); np:=nops(p); t:=0;
    for s to np do r:=p[s]; r:=sort(r,`>`); nr:=nops(r); j:=1;
    # while jsum(r[k],k=j+1..nr) do j:=j+1;od; # gives A040039
    while j= sum(r[k],k=j+1..nr) do j:=j+1;od; # gives A018819
    if j=nr then t:=t+1;fi od; a[n]:=t; od; # John McKay
  • Mathematica
    max = 59; a[0] = a[1] = 1; a[n_?OddQ] := a[n] = a[n-1]; a[n_?EvenQ] := a[n] = a[n-1] + a[n/2]; Table[a[n], {n, 0, max}]
    (* or *) CoefficientList[Series[1/Product[(1-x^(2^j)), {j, 0, Log[2, max] // Ceiling}], {x, 0, max}], x] (* Jean-François Alcover, May 17 2011, updated Feb 17 2014 *)
    a[ n_] := If[n<1, Boole[n==0], a[n] = a[n-1] + If[EvenQ@n, a[Quotient[n,2]], 0]]; (* Michael Somos, May 04 2022 *)
    Table[Count[IntegerPartitions[n],?(AllTrue[Log2[#],IntegerQ]&)],{n,0,60}] (* _Harvey P. Dale, Jun 20 2024 *)
  • PARI
    { n=15; v=vector(n); for (i=1,n,v[i]=vector(2^(i-1))); v[1][1]=1; for (i=2,n, k=length(v[i-1]); for (j=1,k, v[i][j]=v[i-1][j]+1; v[i][j+k]=v[i-1][j]*2)); c=vector(n); for (i=1,n, for (j=1,2^(i-1), if (v[i][j]<=n, c[v[i][j]]++))); c } /* Jon Perry */
    
  • PARI
    {a(n) = my(A, m); if( n<1, n==0, m=1; A = 1 + O(x); while(m<=n, m*=2; A = subst(A, x, x^2) / (1 - x)); polcoeff(A, n))}; /* Michael Somos, Aug 25 2003 */
    
  • PARI
    {a(n) = if( n<1, n==0, if( n%2, a(n-1), a(n/2)+a(n-1)))}; /* Michael Somos, Aug 25 2003 */
    
  • Python
    from functools import lru_cache
    @lru_cache(maxsize=None)
    def A018819(n): return 1 if n == 0 else A018819(n-1) + (0 if n % 2 else A018819(n//2)) # Chai Wah Wu, Jan 18 2022

Formula

a(2m+1) = a(2m), a(2m) = a(2m-1) + a(m). Proof: If n is odd there is a part of size 1; removing it gives a partition of n - 1. If n is even either there is a part of size 1, whose removal gives a partition of n - 1, or else all parts have even sizes and dividing each part by 2 gives a partition of n/2.
G.f.: 1 / Product_{j>=0} (1-x^(2^j)).
a(n) = (1/n)*Sum_{k = 1..n} A038712(k)*a(n-k), n > 1, a(0) = 1. - Vladeta Jovovic, Aug 22 2002
a(2*n) = a(2*n + 1) = A000123(n). - Michael Somos, Aug 25 2003
a(n) = 1 if n = 0, Sum_{j = 0..floor(n/2)} a(j) if n > 0. - David W. Wilson, Aug 16 2007
G.f. A(x) satisfies A(x^2) = (1-x) * A(x). - Michael Somos, Aug 25 2003
G.f. A(x) satisfies 0 = f(A(x), A(x^2), A(x^4)) where f(u, v, w) = u^2*w - 2*u*v^2 + v^3. - Michael Somos, Apr 10 2005
G.f. A(x) satisfies 0 = f(A(x), A(x^2), A(x^3), A(x^6)) where f(u1, u2, u3, u6) = u6 * u1^3 - 3*u3*u2*u1^2 + 3*u3*u2^2*u1 - u3*u2^3. - Michael Somos, Oct 15 2006
G.f.: 1/( Sum_{n >= 0} x^evil(n) - x^odious(n) ), where evil(n) = A001969(n) and odious(n) = A000069(n). - Paul D. Hanna, Jan 23 2012
Let A(x) by the g.f. and B(x) = A(x^k), then 0 = B*((1-A)^k - (-A)^k) + (-A)^k, see fxtbook link. - Joerg Arndt, Dec 17 2012
G.f.: Product_{n>=0} (1+x^(2^n))^(n+1), see the fxtbook link. - Joerg Arndt, Feb 28 2014
G.f.: 1 + Sum_{i>=0} x^(2^i) / Product_{j=0..i} (1 - x^(2^j)). - Ilya Gutkovskiy, May 07 2017

A089633 Numbers having no more than one 0 in their binary representation.

Original entry on oeis.org

0, 1, 2, 3, 5, 6, 7, 11, 13, 14, 15, 23, 27, 29, 30, 31, 47, 55, 59, 61, 62, 63, 95, 111, 119, 123, 125, 126, 127, 191, 223, 239, 247, 251, 253, 254, 255, 383, 447, 479, 495, 503, 507, 509, 510, 511, 767, 895, 959, 991, 1007, 1015, 1019, 1021, 1022, 1023
Offset: 0

Views

Author

Reinhard Zumkeller, Jan 01 2004

Keywords

Comments

Complement of A158582. - Reinhard Zumkeller, Apr 16 2009
Also union of A168604 and A030130. - Douglas Latimer, Jul 19 2012
Numbers of the form 2^t - 2^k - 1, 0 <= k < t.
n is in the sequence if and only if 2*n+1 is in the sequence. - Robert Israel, Dec 14 2018
Also the least binary rank of a strict integer partition of n, where the binary rank of a partition y is given by Sum_i 2^(y_i-1). - Gus Wiseman, May 24 2024

Examples

			From _Tilman Piesk_, May 09 2012: (Start)
This may also be viewed as a triangle:             In binary:
                  0                                         0
               1     2                                 01       10
             3    5    6                          011      101      110
           7   11   13   14                  0111     1011     1101     1110
        15   23   27   29   30          01111    10111    11011    11101    11110
      31  47   55   59   61   62
   63   95  111  119  123  125  126
Left three diagonals are A000225,  A055010, A086224. Right diagonal is A000918. Central column is A129868. Numbers in row n (counted from 0) have n binary 1s. (End)
From _Gus Wiseman_, May 24 2024: (Start)
The terms together with their binary expansions and binary indices begin:
   0:      0 ~ {}
   1:      1 ~ {1}
   2:     10 ~ {2}
   3:     11 ~ {1,2}
   5:    101 ~ {1,3}
   6:    110 ~ {2,3}
   7:    111 ~ {1,2,3}
  11:   1011 ~ {1,2,4}
  13:   1101 ~ {1,3,4}
  14:   1110 ~ {2,3,4}
  15:   1111 ~ {1,2,3,4}
  23:  10111 ~ {1,2,3,5}
  27:  11011 ~ {1,2,4,5}
  29:  11101 ~ {1,3,4,5}
  30:  11110 ~ {2,3,4,5}
  31:  11111 ~ {1,2,3,4,5}
  47: 101111 ~ {1,2,3,4,6}
  55: 110111 ~ {1,2,3,5,6}
  59: 111011 ~ {1,2,4,5,6}
  61: 111101 ~ {1,3,4,5,6}
  62: 111110 ~ {2,3,4,5,6}
(End)
		

Crossrefs

Cf. A181741 (primes), union of A081118 and A000918, apart from initial -1.
For least binary index (instead of rank) we have A001511.
Applying A019565 (Heinz number of binary indices) gives A077011.
For greatest binary index we have A029837 or A070939, opposite A070940.
Row minima of A118462 (binary ranks of strict partitions).
For sum instead of minimum we have A372888, non-strict A372890.
A000009 counts strict partitions, ranks A005117.
A048675 gives binary rank of prime indices, distinct A087207.
A048793 lists binary indices, product A096111, reverse A272020.
A277905 groups all positive integers by binary rank of prime indices.

Programs

  • Haskell
    a089633 n = a089633_list !! (n-1)
    a089633_list = [2 ^ t - 2 ^ k - 1 | t <- [1..], k <- [t-1,t-2..0]]
    -- Reinhard Zumkeller, Feb 23 2012
    
  • Maple
    seq(seq(2^a-1-2^b,b=a-1..0,-1),a=1..11); # Robert Israel, Dec 14 2018
  • Mathematica
    fQ[n_] := DigitCount[n, 2, 0] < 2; Select[ Range[0, 2^10], fQ] (* Robert G. Wilson v, Aug 02 2012 *)
  • PARI
    {insq(n) = local(dd, hf, v); v=binary(n);hf=length(v);dd=sum(i=1,hf,v[i]);if(dd<=hf-2,-1,1)}
    {for(w=0,1536,if(insq(w)>=0,print1(w,", ")))}
    \\ Douglas Latimer, May 07 2013
    
  • PARI
    isoka(n) = #select(x->(x==0), binary(n)) <= 1; \\ Michel Marcus, Dec 14 2018
    
  • Python
    from itertools import count, islice
    def A089633_gen(): # generator of terms
        return ((1<A089633_list = list(islice(A089633_gen(),30)) # Chai Wah Wu, Feb 10 2023
    
  • Python
    from math import isqrt, comb
    def A089633(n): return (1<<(a:=(isqrt((n<<3)+1)-1>>1)+1))-(1<Chai Wah Wu, Dec 19 2024

Formula

A023416(a(n)) <= 1; A023416(a(n)) = A023532(n-2) for n>1;
A000120(a(u)) <= A000120(a(v)) for uA000120(a(n)) = A003056(n).
a(0)=0, n>0: a(n+1) = Min{m>n: BinOnes(a(n))<=BinOnes(m)} with BinOnes=A000120.
If m = floor((sqrt(8*n+1) - 1) / 2), then a(n) = 2^(m+1) - 2^(m*(m+3)/2 - n) - 1. - Carl R. White, Feb 10 2009
A029931(a(n)) = n and A029931(m) != n for m < a(n). - Reinhard Zumkeller, Feb 28 2014
A265705(a(n),k) = A265705(a(n),a(n)-k), k = 0 .. a(n). - Reinhard Zumkeller, Dec 15 2015
a(A014132(n)-1) = 2*a(n-1)+1 for n >= 1. - Robert Israel, Dec 14 2018
Sum_{n>=1} 1/a(n) = A065442 + A160502 = 3.069285887459... . - Amiram Eldar, Jan 09 2024
A019565(a(n)) = A077011(n). - Gus Wiseman, May 24 2024

A277905 Irregular table: Each row n (n >= 0) lists in ascending order all A018819(n) numbers k for which A048675(k) = n.

Original entry on oeis.org

1, 2, 3, 4, 6, 8, 5, 9, 12, 16, 10, 18, 24, 32, 15, 20, 27, 36, 48, 64, 30, 40, 54, 72, 96, 128, 7, 25, 45, 60, 80, 81, 108, 144, 192, 256, 14, 50, 90, 120, 160, 162, 216, 288, 384, 512, 21, 28, 75, 100, 135, 180, 240, 243, 320, 324, 432, 576, 768, 1024, 42, 56, 150, 200, 270, 360, 480, 486, 640, 648, 864, 1152, 1536, 2048, 35, 63, 84, 112, 125, 225, 300, 400
Offset: 1

Views

Author

Antti Karttunen, Nov 14 2016

Keywords

Comments

Each row beginning with an odd number (rows with even index) is followed by a row of the same length, with the same terms, but multiplied by 2. See also comments in the Formula section of A018819.
Note that although the indexing of rows start from zero, the indexing of this sequence starts from 1, with a(1) = 1.
Also Heinz numbers of integer partitions whose binary rank is n, where the binary rank of a partition y is given by Sum_i 2^(y_i-1). For example, row n = 6 is 15, 20, 27, 36, 48, 64, corresponding to the partitions (3,2), (3,1,1), (2,2,2), (2,2,1,1), (2,1,1,1,1), (1,1,1,1,1,1). - Gus Wiseman, May 25 2024
Also, row n lists in ascending order all A018819(n) numbers k for which A097248(k) = A019565(n). - Flávio V. Fernandes, Jul 19 2025

Examples

			The irregular table begins as:
  row terms
   0   1;
   1   2;
   2   3,  4;
   3   6,  8;
   4   5,  9,  12,  16;
   5  10, 18,  24,  32;
   6  15, 20,  27,  36,  48,  64;
   7  30, 40,  54,  72,  96, 128;
   8   7, 25,  45,  60,  80,  81, 108, 144, 192, 256;
   9  14, 50,  90, 120, 160, 162, 216, 288, 384, 512;
  10  21, 28,  75, 100, 135, 180, 240, 243, 320, 324, 432,  576,  768, 1024;
  11  42, 56, 150, 200, 270, 360, 480, 486, 640, 648, 864, 1152, 1536, 2048;
...
		

Crossrefs

Cf. A019565 (the left edge, the only terms that are squarefree).
Cf. A000079 (the trailing edge).
Row lengths are A018819 (number of partitions of binary rank n).
A000009 counts strict partitions, ranks A005117.
A029837 stc_sum or A070939 bin_len, opposite A070940 binexp_lastpos_1.
A048675 gives binary rank of prime indices, distinct A087207.
A048793 lists binary indices, product A096111, reverse A272020.
A061395 gives greatest prime index, least A055396.
A112798 lists prime indices, cf. A001222, A003963, A056239, A296150.
A372890 adds up binary ranks of partitions, strict A372888.

Programs

  • Mathematica
    prix[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n], {p_,k_}:>Table[PrimePi[p],{k}]]]];
    Table[Select[Range[0,2^k],Total[2^(prix[#]-1)]==k&],{k,0,10}] (* Gus Wiseman, May 25 2024 *)
  • Scheme
    (definec (A277905 n) (A277905bi (A277903 n) (A277904 n)))
    (define (A277905bi row col) (let outloop ((k (A019565 row)) (col col)) (if (zero? col) k (let inloop ((j (+ 1 k))) (if (= (A048675 j) row) (outloop j (- col 1)) (inloop (+ 1 j))))))) ;; Very slow implementation.
    ;; Implementation based on a naive recurrence:
    (definec (A277905 n) (if (= 1 n) n (let ((maybe_next (A277896 (A277905 (- n 1))))) (if (not (zero? maybe_next)) maybe_next (A019565 (A277903 n))))))

Formula

a(1) = 1; for n > 1, if A277896(a(n-1)) > 0, then a(n) = A277896(a(n-1)), otherwise a(n) = A019565(A277903(n)). [A naive recurrence for a one-dimensional version.]
Other identities. For all n >= 1:
A048675(a(n)) = A277903(n).

A118462 Decimal equivalent of binary encoding of partitions into distinct parts.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

A part of size k in the partition makes the 2^(k-1) bit of the number be 1. The partitions of n are in reverse Mathematica ordering, so that each row is in ascending order. This is a permutation of the nonnegative integers.
The sequence is the concatenation of the sets: e_n={j>=0: A029931(j)=n}, n=0,1,...: e_0={0}, e_1={1}, e_2={2}, e_3={3,4}, e_4={5,8}, e_5={6,9,16}, e_6={7,10,17,32}, e_7={11,12,18.33.64}, ... . - Vladimir Shevelev, Mar 16 2009
This permutation of the nonnegative integers A001477 has fixed points 0, 1, 2, 3, 4, 5, 325, 562, 800, 4449, ... and inverse permutation A118463. - Alois P. Heinz, Sep 06 2014
Row n lists in increasing order the binary ranks of all strict integer partitions of n, where the binary rank of a partition y is given by Sum_i 2^(y_i-1). - Gus Wiseman, May 21 2024

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)
		

Crossrefs

Cf. A118463, A118457, A000009 (row lengths).
Cf. A089633 (first column), A000079 (last in each column). - Franklin T. Adams-Watters, Mar 16 2009
Cf. A246867.
A variation encoding all partitions is A225620.
Row sums are A372888.
A048793 lists binary indices, sum A029931, length A000120.

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 *)

A372890 Sum of binary ranks of all integer partitions of n, where the binary rank of a partition y is given by Sum_i 2^(y_i-1).

Original entry on oeis.org

0, 1, 4, 10, 25, 52, 115, 228, 471, 931, 1871, 3687, 7373, 14572, 29049, 57694, 115058, 229101, 457392, 912469, 1822945, 3640998, 7277426, 14544436, 29079423, 58137188, 116254386, 232465342, 464889800, 929691662, 1859302291, 3718428513, 7436694889, 14873042016
Offset: 0

Views

Author

Gus Wiseman, May 23 2024

Keywords

Examples

			The partitions of 4 are (4), (3,1), (2,2), (2,1,1), (1,1,1,1), with respective binary ranks 8, 5, 4, 4, 4 with sum 25, so a(4) = 25.
		

Crossrefs

For Heinz number (not binary rank) we have A145519, row sums of A215366.
For Heinz number the strict version is A147655, row sums of A246867.
The strict version is A372888, row sums of A118462.
A005117 gives Heinz numbers of strict integer partitions.
A048675 gives binary rank of prime indices, distinct A087207.
A061395 gives greatest prime index, least A055396.
A118457 lists strict partitions in Mathematica order.
A277905 groups all positive integers by binary rank of prime indices.
Binary indices (A048793):
- length A000120, complement A023416
- min A001511, opposite A000012
- max A029837 or A070939, opposite A070940
- sum A029931, product A096111
- reverse A272020
- complement A368494, sum A359400
- opposite complement A371571, sum A359359
- opposite A371572, sum A230877

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0 or i=1, [1, n],
          b(n, i-1)+(p->[0, p[1]*2^(i-1)]+p)(b(n-i, min(n-i, i))))
        end:
    a:= n-> b(n$2)[2]:
    seq(a(n), n=0..33);  # Alois P. Heinz, May 23 2024
  • Mathematica
    Table[Total[Total[2^(#-1)]&/@IntegerPartitions[n]],{n,0,10}]

Formula

From Alois P. Heinz, May 23 2024: (Start)
a(n) = Sum_{k=1..n} 2^(k-1) * A066633(n,k).
a(n) mod 2 = A365410(n-1) for n>=1. (End)

A373120 Number of distinct possible binary ranks of integer partitions of n, where the binary rank of a partition y is given by Sum_i 2^(y_i-1).

Original entry on oeis.org

1, 1, 1, 2, 3, 4, 6, 8, 11, 15, 20, 26, 33, 43, 55, 70, 89, 109, 136, 167, 206, 251, 306, 371, 445, 535, 639, 759, 904, 1069, 1262, 1489, 1747, 2047, 2390, 2784, 3237, 3754, 4350, 5027, 5798, 6680, 7671, 8808, 10091, 11543, 13190, 15040, 17128, 19477, 22118
Offset: 0

Views

Author

Gus Wiseman, May 26 2024

Keywords

Examples

			The partitions of 4 are (4), (3,1), (2,2), (2,1,1), (1,1,1,1), with respective binary ranks 8, 5, 4, 4, 4, so a(4) = 3.
		

Crossrefs

The strict case is A000009.
A048675 gives binary rank of prime indices, distinct A087207.
A118462 lists binary ranks of strict integer partitions, row sums A372888.
A277905 groups all positive integers by binary rank of prime indices.
A372890 adds up binary ranks of integer partitions.
Binary indices (A048793):
- length A000120, complement A023416
- min A001511, opposite A000012
- max A029837 or A070939, opposite A070940
- sum A029931, product A096111
- reverse A272020
- complement A368494, sum A359400
- opposite complement A371571, sum A359359
- opposite A371572, sum A230877

Programs

  • Mathematica
    Table[Length[Union[Total[2^(#-1)]&/@IntegerPartitions[n]]],{n,0,15}]
Showing 1-6 of 6 results.