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.

Previous Showing 21-30 of 30 results.

A019507 Droll numbers: numbers > 1 whose sum of even prime factors equals the sum of odd prime factors.

Original entry on oeis.org

72, 240, 672, 800, 2240, 4224, 5184, 6272, 9984, 14080, 17280, 33280, 39424, 48384, 52224, 57600, 93184, 116736, 161280, 174080, 192000, 247808, 304128, 373248, 389120, 451584, 487424, 537600, 565248, 585728, 640000, 718848, 1013760, 1089536, 1244160, 1384448
Offset: 1

Views

Author

Mario Velucchi (mathchess(AT)velucchi.it)

Keywords

Examples

			6272 = 2*2*2*2*2*2*2*7*7 is droll since 2+2+2+2+2+2+2 = 14 = 7+7.
		

Crossrefs

For count instead of sum we have A072978.
Partitions of this type are counted by A239261, without zero terms A249914.
For prime indices instead of factors we have A366748, zeros of A366749.
The LHS is A366839 with alternating zeros, for indices A366531, triangle A113686.
The RHS is A366840, for indices A366528, triangle A113685.
A000009 counts partitions into odd parts, ranks A066208.
A035363 counts partitions into even parts, ranks A066207.
A112798 lists prime indices, length A001222, sum A056239.
A257991 counts odd prime indices, even A257992.
A300061 lists numbers with even sum of prime indices, odd A300063.

Programs

  • Maple
    f:= proc(k, m) # numbers whose sum of prime factors >= m is k; m is prime
       local S,p,j;
       option remember;
       if k = 0 then return [1]
       elif m > k then return []
       fi;
       S:= NULL:
       p:= nextprime(m);
       for j from k by -m to 0 do
         S:= S, op(map(`*`,  procname(j,p) , m^((k-j)/m)))
       od;
       [S]
    end proc:
    g:= proc(N) local m,R;
      R:= NULL;
      for m from 1 while 2^m < N do
       R:= R, op(map(`*`,select(`<=`,f(2*m,3), N/2^m),2^m));
      od;
      sort([R])
    end proc:
    g(10^8); # Robert Israel, Feb 20 2025
  • Mathematica
    Select[Range[2, 2*10^6, 2], First[#] == Total[Rest[#]] & [Times @@@ FactorInteger[#]] &] (* Paolo Xausa, Feb 19 2025 *)
  • PARI
    isok(n) = {if (n % 2, return (0)); f = factor(n); return (2*f[1,2] == sum(i=2, #f~, f[i,1]*f[i,2]));} \\ Michel Marcus, Jun 21 2013

Formula

These are even numbers k such that A366839(k/2) = A366840(k). - Gus Wiseman, Oct 25 2023 (corrected Feb 19 2025)

Extensions

Name edited by Paolo Xausa, Feb 19 2025

A352142 Numbers whose prime factorization has all odd indices and all odd exponents.

Original entry on oeis.org

1, 2, 5, 8, 10, 11, 17, 22, 23, 31, 32, 34, 40, 41, 46, 47, 55, 59, 62, 67, 73, 82, 83, 85, 88, 94, 97, 103, 109, 110, 115, 118, 125, 127, 128, 134, 136, 137, 146, 149, 155, 157, 160, 166, 167, 170, 179, 184, 187, 191, 194, 197, 205, 206, 211, 218, 227, 230
Offset: 1

Views

Author

Gus Wiseman, Mar 18 2022

Keywords

Comments

A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798, sum A056239, length A001222.
A number's prime signature is the sequence of positive exponents in its prime factorization, which is row n of A124010, length A001221, sum A001222.
These are the Heinz numbers of integer partitions with all odd parts and all odd multiplicities, counted by A117958.

Examples

			The terms together with their prime indices begin:
   1 = 1
   2 = prime(1)
   5 = prime(3)
   8 = prime(1)^3
  10 = prime(1) prime(3)
  11 = prime(5)
  17 = prime(7)
  22 = prime(1) prime(5)
  23 = prime(9)
  31 = prime(11)
  32 = prime(1)^5
  34 = prime(1) prime(7)
  40 = prime(1)^3 prime(3)
		

Crossrefs

The restriction to primes is A031368.
The first condition alone is A066208, counted by A000009.
These partitions are counted by A117958.
The squarefree case is A258116, even A258117.
The second condition alone is A268335, counted by A055922.
The even-even version is A352141 counted by A035444.
A000290 = exponents all even, counted by A035363.
A056166 = exponents all prime, counted by A055923.
A066207 = indices all even, counted by A035363 (complement A086543).
A109297 = same indices as exponents, counted by A114640.
A112798 lists prime indices, reverse A296150, length A001222, sum A056239.
A124010 gives prime signature, sorted A118914, length A001221, sum A001222.
A162641 counts even prime exponents, odd A162642.
A257991 counts odd prime indices, even A257992.
A325131 = disjoint indices from exponents, counted by A114639.
A346068 = indices and exponents all prime, counted by A351982.
A351979 = odd indices with even exponents, counted by A035457.
A352140 = even indices with odd exponents, counted by A055922 aerated.
A352143 = odd indices with odd conjugate indices, counted by A053253 aerated.

Programs

  • Mathematica
    Select[Range[100],#==1||And@@OddQ/@PrimePi/@First/@FactorInteger[#]&&And@@OddQ/@Last/@FactorInteger[#]&]
  • Python
    from itertools import count, islice
    from sympy import primepi, factorint
    def A352142_gen(startvalue=1): # generator of terms >= startvalue
        return filter(lambda k:all(map(lambda x:x[1]%2 and primepi(x[0])%2, factorint(k).items())),count(max(startvalue,1)))
    A352142_list = list(islice(A352142_gen(),30)) # Chai Wah Wu, Mar 18 2022

Formula

Intersection of A066208 and A268335.
A257991(a(n)) = A001222(a(n)).
A162642(a(n)) = A001221(a(n)).
A257992(a(n)) = A162641(a(n)) = 0.

A366749 Self-signed alternating sum of the prime indices of n.

Original entry on oeis.org

0, -1, 2, -2, -3, 1, 4, -3, 4, -4, -5, 0, 6, 3, -1, -4, -7, 3, 8, -5, 6, -6, -9, -1, -6, 5, 6, 2, 10, -2, -11, -5, -3, -8, 1, 2, 12, 7, 8, -6, -13, 5, 14, -7, 1, -10, -15, -2, 8, -7, -5, 4, 16, 5, -8, 1, 10, 9, -17, -3, 18, -12, 8, -6, 3, -4, -19, -9, -7, 0
Offset: 1

Views

Author

Gus Wiseman, Oct 23 2023

Keywords

Comments

We define the self-signed alternating sum of a multiset y to be Sum_{k in y} k*(-1)^k.
A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798.

Crossrefs

With summands of 2^(n-1) we get A048675.
With summands of (-1)^k we get A195017.
The version for alternating prime indices is A346697 - A346698 = A316524.
Positions of zeros are A366748, counted by A239261.
A112798 lists prime indices, length A001222, sum A056239, reverse A296150.
A300061 lists numbers with even sum of prime indices, odd A300063.
A366528 adds up odd prime indices, counted by A113685.
A366531 adds up even prime indices, counted by A113686.

Programs

  • Mathematica
    prix[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    asum[y_]:=Sum[x*(-1)^x,{x,y}];
    Table[asum[prix[n]],{n,100}]

Formula

a(n) = Sum_{k in A112798(n)} k*(-1)^k.
a(n) = A366531(n) - A366528(n).

A352141 Numbers whose prime factorization has all even indices and all even exponents.

Original entry on oeis.org

1, 9, 49, 81, 169, 361, 441, 729, 841, 1369, 1521, 1849, 2401, 2809, 3249, 3721, 3969, 5041, 6241, 6561, 7569, 7921, 8281, 10201, 11449, 12321, 12769, 13689, 16641, 17161, 17689, 19321, 21609, 22801, 25281, 26569, 28561, 29241, 29929, 32761, 33489, 35721
Offset: 1

Views

Author

Gus Wiseman, Mar 18 2022

Keywords

Comments

A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798, sum A056239, length A001222.
A number's prime signature is the sequence of positive exponents in its prime factorization, which is row n of A124010, length A001221, sum A001222.
These are the Heinz numbers of partitions with all even parts and all even multiplicities, counted by A035444.

Examples

			The terms together with their prime indices begin:
     1 = 1
     9 = prime(2)^2
    49 = prime(4)^2
    81 = prime(2)^4
   169 = prime(6)^2
   361 = prime(8)^2
   441 = prime(2)^2 prime(4)^2
   729 = prime(2)^6
   841 = prime(10)^2
  1369 = prime(12)^2
  1521 = prime(2)^2 prime(6)^2
  1849 = prime(14)^2
  2401 = prime(4)^4
  2809 = prime(16)^2
  3249 = prime(2)^2 prime(8)^2
  3721 = prime(18)^2
  3969 = prime(2)^4 prime(4)^2
		

Crossrefs

The second condition alone (all even exponents) is A000290, counted by A035363.
The restriction to primes is A031215.
These partitions are counted by A035444.
The first condition alone is A066207, counted by A035363, squarefree A258117.
A056166 = exponents all prime, counted by A055923.
A066208 = prime indices all odd, counted by A000009.
A109297 = same indices as exponents, counted by A114640.
A112798 lists prime indices, reverse A296150, length A001222, sum A056239.
A124010 gives prime signature, sorted A118914, length A001221, sum A001222.
A162641 counts even exponents, odd A162642.
A257991 counts odd indices, even A257992.
A325131 = disjoint indices from exponents, counted by A114639.
A346068 = indices and exponents all prime, counted by A351982.
A351979 = odd indices with even exponents, counted by A035457.
A352140 = even indices with odd exponents, counted by A055922 aerated.
A352142 = odd indices with odd exponents, counted by A117958.

Programs

  • Mathematica
    Select[Range[1000],#==1||And@@EvenQ/@PrimePi/@First/@FactorInteger[#]&&And@@EvenQ/@Last/@FactorInteger[#]&]
  • Python
    from itertools import count, islice
    from sympy import factorint, primepi
    def A352141_gen(startvalue=1): # generator of terms >= startvalue
        return filter(lambda k:all(map(lambda x: not (x[1]%2 or primepi(x[0])%2), factorint(k).items())),count(max(startvalue,1)))
    A352141_list = list(islice(A352141_gen(),30)) # Chai Wah Wu, Mar 18 2022

Formula

Intersection of A000290 and A066207.
A257991(a(n)) = A162642(a(n)) = 0.
A257992(a(n)) = A001222(a(n)).
A162641(a(n)) = A001221(a(n)).
Sum_{n>=1} 1/a(n) = 1/Product_{k>=1} (1 - 1/prime(2*k)^2) = 1.163719... . - Amiram Eldar, Sep 19 2022

A325699 Number of distinct even prime indices of n minus the number of distinct odd prime indices of n.

Original entry on oeis.org

0, -1, 1, -1, -1, 0, 1, -1, 1, -2, -1, 0, 1, 0, 0, -1, -1, 0, 1, -2, 2, -2, -1, 0, -1, 0, 1, 0, 1, -1, -1, -1, 0, -2, 0, 0, 1, 0, 2, -2, -1, 1, 1, -2, 0, -2, -1, 0, 1, -2, 0, 0, 1, 0, -2, 0, 2, 0, -1, -1, 1, -2, 2, -1, 0, -1, -1, -2, 0, -1, 1, 0, -1, 0, 0, 0
Offset: 1

Views

Author

Gus Wiseman, May 17 2019

Keywords

Comments

A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798.

Crossrefs

Programs

  • Mathematica
    Table[Total[(-1)^PrimePi/@First/@If[n==1,{},FactorInteger[n]]],{n,100}]

Formula

G.f.: Sum_{k>=1} (-1)^k * x^prime(k) / (1 - x^prime(k)). - Ilya Gutkovskiy, Feb 12 2020
Additive with a(p^e) = (-1)^primepi(p). - Amiram Eldar, Jun 17 2024

A351979 Numbers whose prime factorization has all odd prime indices and all even prime exponents.

Original entry on oeis.org

1, 4, 16, 25, 64, 100, 121, 256, 289, 400, 484, 529, 625, 961, 1024, 1156, 1600, 1681, 1936, 2116, 2209, 2500, 3025, 3481, 3844, 4096, 4489, 4624, 5329, 6400, 6724, 6889, 7225, 7744, 8464, 8836, 9409, 10000, 10609, 11881, 12100, 13225, 13924, 14641, 15376
Offset: 1

Views

Author

Gus Wiseman, Mar 11 2022

Keywords

Comments

A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798, sum A056239, length A001222.
A number's prime signature is the sequence of positive exponents in its prime factorization, which is row n of A124010, length A001221, sum A001222.
Also Heinz numbers of integer partitions with all odd parts and all even multiplicities, counted by A035457 (see Emeric Deutsch's comment there).

Examples

			The terms together with their prime indices begin:
     1: 1
     4: prime(1)^2
    16: prime(1)^4
    25: prime(3)^2
    64: prime(1)^6
   100: prime(1)^2 prime(3)^2
   121: prime(5)^2
   256: prime(1)^8
   289: prime(7)^2
   400: prime(1)^4 prime(3)^2
   484: prime(1)^2 prime(5)^2
   529: prime(9)^2
   625: prime(3)^4
   961: prime(11)^2
  1024: prime(1)^10
  1156: prime(1)^2 prime(7)^2
  1600: prime(1)^6 prime(3)^2
  1681: prime(13)^2
  1936: prime(1)^4 prime(5)^2
		

Crossrefs

The second condition alone (exponents all even) is A000290, counted by A035363.
The distinct prime factors of terms all come from A031368.
These partitions are counted by A035457 or A000009 aerated.
The first condition alone (indices all odd) is A066208, counted by A000009.
The squarefree square roots are A258116, even A258117.
A056166 = exponents all prime, counted by A055923.
A066207 = indices all even, counted by complement of A086543.
A076610 = indices all prime, counted by A000607.
A109297 = same indices as exponents, counted by A114640.
A112798 lists prime indices, reverse A296150, length A001222, sum A056239.
A124010 gives prime signature, sorted A118914, length A001221, sum A001222.
A162641 counts even exponents, odd A162642.
A257991 counts odd indices, even A257992.
A268335 = exponents all odd, counted by A055922.
A325131 = disjoint indices from exponents, counted by A114639.
A346068 = indices and exponents all prime, counted by A351982.
A352140 = even indices with odd exponents, counted by A055922 (aerated).
A352141 = even indices with even exponents, counted by A035444.
A352142 = odd indices and odd multiplicities, counted by A117958.

Programs

  • Mathematica
    Select[Range[1000],#==1||And@@OddQ/@PrimePi/@First/@FactorInteger[#]&&And@@EvenQ/@Last/@FactorInteger[#]&]
  • Python
    from sympy import factorint, primepi
    def ok(n):
        return all(primepi(p)%2==1 and e%2==0 for p, e in factorint(n).items())
    print([k for k in range(15500) if ok(k)]) # Michael S. Branicky, Mar 12 2022

Formula

Squares of elements of A066208.
Intersection of A066208 and A000290.
A257991(a(n)) = A001222(a(n)).
A162641(a(n)) = A001221(a(n)).
A162642(a(n)) = A257992(a(n)) = 0.
Sum_{n>=1} 1/a(n) = 1/Product_{k>=1} (1 - 1/prime(2*k-1)^2) = 1.4135142... . - Amiram Eldar, Sep 19 2022

A352128 Number of strict integer partitions of n with (1) as many even parts as odd parts, and (2) as many even conjugate parts as odd conjugate parts.

Original entry on oeis.org

1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 2, 0, 2, 2, 3, 0, 3, 0, 2, 2, 5, 2, 5, 4, 6, 7, 7, 8, 8, 9, 9, 13, 9, 14, 12, 20, 13, 25, 17, 33, 23, 40, 26, 50, 33, 59, 39, 68, 45, 84, 58, 92, 70, 115, 88, 132, 109, 156, 139, 182, 172, 212, 211
Offset: 0

Views

Author

Gus Wiseman, Mar 15 2022

Keywords

Examples

			The a(n) strict partitions for selected n:
n = 3      18         22          28           31              32
   -----------------------------------------------------------------------
    (2,1)  (8,5,3,2)  (8,6,5,3)   (12,7,5,4)   (10,7,5,4,3,2)  (12,8,7,5)
           (8,6,3,1)  (8,7,5,2)   (12,8,5,3)   (10,7,6,5,2,1)  (12,9,7,4)
                      (12,7,2,1)  (12,9,5,2)   (10,8,5,4,3,1)  (16,9,4,3)
                                  (16,9,2,1)   (10,9,6,3,2,1)  (12,10,7,3)
                                  (12,10,5,1)                  (12,11,7,2)
                                                               (16,11,4,1)
		

Crossrefs

The first condition is A239241, non-strict A045931 (ranked by A325698).
This is the strict version of A351977, ranked by A350946.
The second condition is A352129, non-strict A045931 (ranked by A350848).
A000041 counts integer partitions, strict A000009.
A130780 counts partitions with no more even than odd parts, strict A239243.
A171966 counts partitions with no more odd than even parts, strict A239240.
There are four statistics:
- A257991 = # of odd parts, conjugate A344616.
- A257992 = # of even parts, conjugate A350847.
There are four other pairings of statistics:
- A277579, strict A352131.
- A277103, ranked by A350944, strict A000700.
- A277579, ranked by A350943, strict A352130.
- A350948, ranked by A350945.
There are two other double-pairings of statistics:
- A351976, ranked by A350949.
- A351981, ranked by A351980.
The case of all four statistics equal is A351978, ranked by A350947.

Programs

  • Mathematica
    conj[y_]:=If[Length[y]==0,y,Table[Length[Select[y,#>=k&]],{k,1,Max[y]}]];
    Table[Length[Select[IntegerPartitions[n],UnsameQ@@#&&Count[#,?OddQ]==Count[#,?EvenQ]&&Count[conj[#],?OddQ]==Count[conj[#],?EvenQ]&]],{n,0,30}]

A352143 Numbers whose prime indices and conjugate prime indices are all odd.

Original entry on oeis.org

1, 2, 5, 8, 11, 17, 20, 23, 31, 32, 41, 44, 47, 59, 67, 68, 73, 80, 83, 92, 97, 103, 109, 124, 125, 127, 128, 137, 149, 157, 164, 167, 176, 179, 188, 191, 197, 211, 227, 233, 236, 241, 257, 268, 269, 272, 275, 277, 283, 292, 307, 313, 320, 331, 332, 347, 353
Offset: 1

Views

Author

Gus Wiseman, Mar 18 2022

Keywords

Comments

A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798, sum A056239, length A001222.
A number's prime signature is the sequence of positive exponents in its prime factorization, which is row n of A124010, length A001221, sum A001222.
These are the Heinz numbers of integer partitions whose parts and conjugate parts are all odd. They are counted by A053253.

Examples

			The terms together with their prime indices begin:
   1: {}
   2: {1}
   5: {3}
   8: {1,1,1}
  11: {5}
  17: {7}
  20: {1,1,3}
  23: {9}
  31: {11}
  32: {1,1,1,1,1}
  41: {13}
  44: {1,1,5}
  47: {15}
  59: {17}
  67: {19}
  68: {1,1,7}
  73: {21}
  80: {1,1,1,1,3}
		

Crossrefs

The restriction to primes is A031368.
These partitions appear to be counted by A053253.
The even version is A066207^2.
For even instead of odd conjugate parts we get A066208^2.
The first condition alone (all odd indices) is A066208, counted by A000009.
The second condition alone is A346635, counted by A000009.
A055922 counts partitions with odd multiplicities, ranked by A268335.
A066207 = indices all even, counted by A035363 (complement A086543).
A109297 = same indices as exponents, counted by A114640.
A112798 lists prime indices, reverse A296150, length A001222, sum A056239.
A124010 gives prime signature, sorted A118914, length A001221, sum A001222.
A162642 counts odd prime exponents, even A162641.
A238745 gives the Heinz number of the conjugate prime signature.
A257991 counts odd indices, even A257992.
A258116 ranks strict partitions with all odd parts, even A258117.
A351979 = odd indices and even multiplicities, counted by A035457.
A352140 = even indices and odd multiplicities, counted by A055922 aerated.
A352141 = even indices and even multiplicities, counted by A035444.
A352142 = odd indices and odd multiplicities, counted by A117958.

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    conj[y_]:=If[Length[y]==0,y,Table[Length[Select[y,#>=k&]],{k,1,Max[y]}]];
    Select[Range[100],And@@OddQ/@primeMS[#]&&And@@OddQ/@conj[primeMS[#]]&]

Formula

Intersection of A066208 and A346635.

A366748 Numbers k such that (sum of odd prime indices of k) = (sum of even prime indices of k).

Original entry on oeis.org

1, 12, 70, 90, 112, 144, 286, 325, 462, 520, 525, 594, 646, 675, 832, 840, 1045, 1080, 1326, 1334, 1344, 1666, 1672, 1728, 1900, 2142, 2145, 2294, 2465, 2622, 2695, 2754, 3040, 3432, 3465, 3509, 3526, 3900, 3944, 4186, 4255, 4312, 4455, 4845, 4864, 4900, 4982
Offset: 1

Views

Author

Gus Wiseman, Oct 23 2023

Keywords

Comments

A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798.

Examples

			The terms together with their prime indices begin:
     1: {}
    12: {1,1,2}
    70: {1,3,4}
    90: {1,2,2,3}
   112: {1,1,1,1,4}
   144: {1,1,1,1,2,2}
   286: {1,5,6}
   325: {3,3,6}
   462: {1,2,4,5}
   520: {1,1,1,3,6}
   525: {2,3,3,4}
   594: {1,2,2,2,5}
   646: {1,7,8}
   675: {2,2,2,3,3}
   832: {1,1,1,1,1,1,6}
   840: {1,1,1,2,3,4}
For example, 525 has prime indices {2,3,3,4}, and 3+3 = 2+4, so 525 is in the sequence.
		

Crossrefs

For prime factors instead of indices we have A019507.
Partitions of this type are counted by A239261.
For count instead of sum we have A325698, distinct A325700.
The LHS (sum of odd prime indices) is A366528, triangle A113685.
The RHS (sum of even prime indices) is A366531, triangle A113686.
These are the positions of zeros in A366749.
A000009 counts partitions into odd parts, ranked by A066208.
A035363 counts partitions into even parts, ranked by A066207.
A112798 lists prime indices, reverse A296150, length A001222, sum A056239.
A257991 counts odd prime indices, even A257992.
A300061 lists numbers with even sum of prime indices, odd A300063.

Programs

  • Mathematica
    prix[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n], {p_,k_}:>Table[PrimePi[p],{k}]]]];
    Select[Range[1000], Total[Select[prix[#],OddQ]]==Total[Select[prix[#],EvenQ]]&]

Formula

These are numbers k such that A346697(k) = A346698(k).

A355321 Numbers k such that the k-th composition in standard order has the same number of even parts as odd.

Original entry on oeis.org

0, 5, 6, 17, 18, 20, 24, 43, 45, 46, 53, 54, 58, 65, 66, 68, 72, 80, 96, 139, 141, 142, 149, 150, 154, 163, 165, 166, 169, 172, 177, 178, 180, 184, 197, 198, 202, 209, 210, 212, 216, 226, 232, 257, 258, 260, 264, 272, 288, 320, 343, 347, 349, 350, 363, 365
Offset: 1

Views

Author

Gus Wiseman, Jun 28 2022

Keywords

Comments

The k-th composition in standard order (graded reverse-lexicographic, A066099) is obtained by taking the set of positions of 1's in the reversed binary expansion of k, prepending 0, taking first differences, and reversing again. This gives a bijective correspondence between nonnegative integers and integer compositions.

Examples

			The terms together with their corresponding compositions begin:
   0: ()
   5: (2,1)
   6: (1,2)
  17: (4,1)
  18: (3,2)
  20: (2,3)
  24: (1,4)
  43: (2,2,1,1)
  45: (2,1,2,1)
  46: (2,1,1,2)
  53: (1,2,2,1)
  54: (1,2,1,2)
  58: (1,1,2,2)
  65: (6,1)
  66: (5,2)
  68: (4,3)
  72: (3,4)
  80: (2,5)
  96: (1,6)
		

Crossrefs

A subset of A001969 (evil numbers), complement A000069.
These compositions are counted by A098123, without multiplicity A242821.
The version for partitions is A325698, counted by A045931.
For partitions without multiplicity we have A325700, counted by A241638.
A047993 counts balanced partitions, ranked by A106529.
A108950/A108949 count partitions with more odd/even parts.
A130780/A171966 count partitions with more or as many odd/even parts.

Programs

  • Mathematica
    stc[n_]:=Differences[Prepend[Join@@ Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    Select[Range[0,100],Count[stc[#],?EvenQ]==Count[stc[#],?OddQ]&]
Previous Showing 21-30 of 30 results.