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-10 of 33 results. Next

A029931 If 2n = Sum 2^e_i, a(n) = Sum e_i.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Write n in base 2, n = sum b(i)*2^(i-1), then a(n) = sum b(i)*i. - Benoit Cloitre, Jun 09 2002
May be regarded as a triangular array read by rows, giving weighted sum of compositions in standard order. The standard order of compositions is given by A066099. - Franklin T. Adams-Watters, Nov 06 2006
Sum of all positive integer roots m_i of polynomial {m,k} - see link [Shevelev]; see also A264613. - Vladimir Shevelev, Dec 13 2015
Also the sum of binary indices of n, where a binary index of n (A048793) is any position of a 1 in its reversed binary expansion. For example, the binary indices of 11 are {1,2,4}, so a(11) = 7. - Gus Wiseman, May 22 2024

Examples

			14 = 8+4+2 so a(7) = 3+2+1 = 6.
Composition number 11 is 2,1,1; 1*2+2*1+3*1 = 7, so a(11) = 7.
The triangle starts:
  0
  1
  2 3
  3 4 5 6
The reversed binary expansion of 18 is (0,1,0,0,1) with 1's at positions {2,5}, so a(18) = 2 + 5 = 7. - _Gus Wiseman_, Jul 22 2019
		

Crossrefs

Other sequences that are built by replacing 2^k in the binary representation with other numbers: A022290 (Fibonacci), A059590 (factorials), A073642, A089625 (primes), A116549, A326031.
Cf. A001793 (row sums), A011782 (row lengths), A059867, A066099, A124757.
Row sums of A048793 and A272020.
Contains exactly A000009(n) copies of n.
For length instead of sum we have A000120, complement A023416.
For minimum instead of sum we have A001511, opposite A000012.
For maximum instead of sum we have A029837 or A070939, opposite A070940.
For product instead of sum we have A096111.
The reverse version is A230877, row sums of A371572.
The reverse complement is A359359, row sums of A371571.
The complement is A359400, row sums of A368494.
Numbers k such that a(k) is prime are A372689.
A014499 lists binary indices of prime numbers.
A019565 gives Heinz number of binary indices, inverse A048675.
A372471 lists binary indices of primes, row-sums A372429.

Programs

  • Haskell
    a029931 = sum . zipWith (*) [1..] . a030308_row
    -- Reinhard Zumkeller, Feb 28 2014
    
  • Maple
    HammingWeight := n -> add(i, i = convert(n, base, 2)):
    a := proc(n) option remember; `if`(n = 0, 0,
    ifelse(n::even, a(n/2) + HammingWeight(n/2), a(n-1) + 1)) end:
    seq(a(n), n = 0..78); # Peter Luschny, Oct 30 2021
  • Mathematica
    a[n_] := (b = IntegerDigits[n, 2]).Reverse @ Range[Length @ b]; Array[a,78,0] (* Jean-François Alcover, Apr 28 2011, after B. Cloitre *)
  • PARI
    for(n=0,100,l=length(binary(n)); print1(sum(i=1,l, component(binary(n),i)*(l-i+1)),","))
    
  • PARI
    a(n) = my(b=binary(n)); b*-[-#b..-1]~; \\ Ruud H.G. van Tol, Oct 17 2023
    
  • Python
    def A029931(n): return sum(i if j == '1' else 0 for i, j in enumerate(bin(n)[:1:-1],1)) # Chai Wah Wu, Dec 20 2022
    (C#)
    ulong A029931(ulong n) {
        ulong result = 0, counter = 1;
        while(n > 0) {
            if (n % 2 == 1)
              result += counter;
            counter++;
            n /= 2;
        }
        return result;
    } // Frank Hollstein, Jan 07 2023

Formula

a(n) = a(n - 2^L(n)) + L(n) + 1 [where L(n) = floor(log_2(n)) = A000523(n)] = sum of digits of A048794 [at least for n < 512]. - Henry Bottomley, Mar 09 2001
a(0) = 0, a(2n) = a(n) + e1(n), a(2n+1) = a(2n) + 1, where e1(n) = A000120(n). a(n) = log_2(A029930(n)). - Ralf Stephan, Jun 19 2003
G.f.: (1/(1-x)) * Sum_{k>=0} (k+1)*x^2^k/(1+x^2^k). - Ralf Stephan, Jun 23 2003
a(n) = Sum_{k>=0} A030308(n,k)*A000027(k+1). - Philippe Deléham, Oct 15 2011
a(n) = sum of n-th row of the triangle in A213629. - Reinhard Zumkeller, Jun 17 2012
From Reinhard Zumkeller, Feb 28 2014: (Start)
a(A089633(n)) = n and a(m) != n for m < A089633(n).
a(n) = Sum_{k=1..A070939(n)} k*A030308(n,k-1). (End)
a(n) = A073642(n) + A000120(n). - Peter Kagey, Apr 04 2016

Extensions

More terms from Erich Friedman

A372441 Number of binary indices (binary weight) of n minus number of prime indices (bigomega) of n.

Original entry on oeis.org

1, 0, 1, -1, 1, 0, 2, -2, 0, 0, 2, -1, 2, 1, 2, -3, 1, -1, 2, -1, 1, 1, 3, -2, 1, 1, 1, 0, 3, 1, 4, -4, 0, 0, 1, -2, 2, 1, 2, -2, 2, 0, 3, 0, 1, 2, 4, -3, 1, 0, 2, 0, 3, 0, 3, -1, 2, 2, 4, 0, 4, 3, 3, -5, 0, -1, 2, -1, 1, 0, 3, -3, 2, 1, 1, 0, 2, 1, 4, -3, -1
Offset: 1

Views

Author

Gus Wiseman, May 07 2024

Keywords

Comments

A binary index of n is any position of a 1 in its reversed binary expansion. The binary indices of n are row n of A048793.
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

Positions of zeros are A071814.
For sum instead of length we have A372428, zeros A372427.
For minimum instead of length we have A372437, zeros {}.
For maximum instead of length we have A372442, zeros A372436.
Positions of odd terms are A372590, even A372591.
A003963 gives product of prime indices.
A019565 gives Heinz number of binary indices, adjoint A048675.
A029837 gives greatest binary index, least A001511.
A048793 lists binary indices, length A000120, reverse A272020, sum A029931.
A061395 gives greatest prime index, least A055396.
A070939 gives length of binary expansion.
A112798 lists prime indices, length A001222, reverse A296150, sum A056239.

Programs

  • Maple
    f:= proc(n) convert(convert(n,base,2),`+`)-numtheory:-bigomega(n) end proc:
    map(f, [$1..100]); # Robert Israel, May 22 2024
  • Mathematica
    bix[n_]:=Join@@Position[Reverse[IntegerDigits[n,2]],1];
    prix[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Table[Length[bix[n]]-Length[prix[n]],{n,100}]

Formula

a(n) = A000120(n) - A001222(n).

A372427 Numbers whose binary indices and prime indices have the same sum.

Original entry on oeis.org

19, 33, 34, 69, 74, 82, 130, 133, 305, 412, 428, 436, 533, 721, 755, 808, 917, 978, 1036, 1058, 1062, 1121, 1133, 1143, 1341, 1356, 1630, 1639, 1784, 1807, 1837, 1990, 2057, 2115, 2130, 2133, 2163, 2260, 2324, 2328, 2354, 2358, 2512, 2534, 2627, 2771, 2825
Offset: 1

Views

Author

Gus Wiseman, May 01 2024

Keywords

Comments

A binary index of n is any position of a 1 in its reversed binary expansion. The binary indices of n are row n of A048793.
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 binary indices of 130 are {2,8}, and the prime indices are {1,3,6}. Both sum to 10, so 130 is in the sequence.
The terms together with their prime indices begin:
   19: {8}
   33: {2,5}
   34: {1,7}
   69: {2,9}
   74: {1,12}
   82: {1,13}
  130: {1,3,6}
  133: {4,8}
  305: {3,18}
  412: {1,1,27}
  428: {1,1,28}
The terms together with their binary expansions and binary indices begin:
   19:      10011 ~ {1,2,5}
   33:     100001 ~ {1,6}
   34:     100010 ~ {2,6}
   69:    1000101 ~ {1,3,7}
   74:    1001010 ~ {2,4,7}
   82:    1010010 ~ {2,5,7}
  130:   10000010 ~ {2,8}
  133:   10000101 ~ {1,3,8}
  305:  100110001 ~ {1,5,6,9}
  412:  110011100 ~ {3,4,5,8,9}
  428:  110101100 ~ {3,4,6,8,9}
		

Crossrefs

For length instead of sum we get A071814.
Positions of zeros in A372428.
For maximum instead of sum we have A372436.
A003963 gives product of prime indices.
A019565 gives Heinz number of binary indices, adjoint A048675.
A029837 gives greatest binary index, least A001511.
A048793 lists binary indices, length A000120, reverse A272020, sum A029931.
A061395 gives greatest prime index, least A055396.
A070939 gives length of binary expansion.
A096111 gives product of binary indices.
A112798 lists prime indices, length A001222, reverse A296150, sum A056239.
A326031 gives weight of the set-system with BII-number n.

Programs

  • Mathematica
    prix[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    bix[n_]:=Join@@Position[Reverse[IntegerDigits[n,2]],1];
    Select[Range[100],Total[prix[#]]==Total[bix[#]]&]

A372428 Sum of binary indices of n minus sum of prime indices of n.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 2, 1, 1, 2, 2, 3, 2, 4, 5, 1, -1, 2, 0, 3, 3, 4, 2, 4, 4, 4, 6, 6, 3, 8, 4, 1, 0, 0, 2, 3, -2, 2, 4, 4, -2, 5, -1, 6, 7, 5, 1, 5, 4, 6, 5, 6, -1, 9, 9, 8, 6, 6, 1, 11, 1, 8, 13, 1, -1, 1, -9, 1, 0, 4, -7, 4, -9, 0, 6, 4, 6, 7, -5, 5, 5, 0, -8
Offset: 1

Views

Author

Gus Wiseman, May 02 2024

Keywords

Comments

A binary index of n is any position of a 1 in its reversed binary expansion. The binary indices of n are row n of A048793.
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 binary indices of 65 are {1,7}, and the prime indices are {3,6}, so a(65) = 8 - 9 = -1.
		

Crossrefs

Positions of zeros are A372427.
For minimum instead of sum we have A372437.
For length instead of sum we have A372441, zeros A071814.
For maximum instead of sum we have A372442, zeros A372436.
Positions of odd terms are A372586, even A372587.
A003963 gives product of prime indices.
A019565 gives Heinz number of binary indices, adjoint A048675.
A029837 gives greatest binary index, least A001511.
A048793 lists binary indices, length A000120, reverse A272020, sum A029931.
A061395 gives greatest prime index, least A055396.
A070939 gives length of binary expansion.
A096111 gives product of binary indices.
A112798 lists prime indices, length A001222, reverse A296150, sum A056239.
A326031 gives weight of the set-system with BII-number n.

Programs

  • Mathematica
    prix[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    bix[n_]:=Join@@Position[Reverse[IntegerDigits[n,2]],1];
    Table[Total[bix[n]]-Total[prix[n]],{n,100}]
  • Python
    from itertools import count, islice
    from sympy import sieve, factorint
    def a_gen():
        for n in count(1):
            b = sum((i+1) for i, x in enumerate(bin(n)[2:][::-1]) if x =='1')
            p = sum(sieve.search(i)[0] for i in factorint(n, multiple=True))
            yield(b-p)
    A372428_list = list(islice(a_gen(), 83)) # John Tyler Rascoe, May 04 2024
    
  • Python
    from sympy import primepi, factorint
    def A372428(n): return int(sum(i for i, j in enumerate(bin(n)[:1:-1],1) if j=='1')-sum(primepi(p)*e for p, e in factorint(n).items())) # Chai Wah Wu, Oct 18 2024

Formula

a(n) = A029931(n) - A056239(n).

A372471 Irregular triangle read by rows where row n lists the binary indices of the n-th prime number.

Original entry on oeis.org

2, 1, 2, 1, 3, 1, 2, 3, 1, 2, 4, 1, 3, 4, 1, 5, 1, 2, 5, 1, 2, 3, 5, 1, 3, 4, 5, 1, 2, 3, 4, 5, 1, 3, 6, 1, 4, 6, 1, 2, 4, 6, 1, 2, 3, 4, 6, 1, 3, 5, 6, 1, 2, 4, 5, 6, 1, 3, 4, 5, 6, 1, 2, 7, 1, 2, 3, 7, 1, 4, 7, 1, 2, 3, 4, 7, 1, 2, 5, 7, 1, 4, 5, 7, 1, 6, 7
Offset: 1

Views

Author

Gus Wiseman, May 07 2024

Keywords

Comments

A binary index of n is any position of a 1 in its reversed binary expansion. The binary indices of n are row n of A048793.

Examples

			We have prime(12) = (2^1 + 2^3 + 2^6)/2, so row 12 is (1,3,6).
Each prime followed by its binary indices:
   2: 2
   3: 1 2
   5: 1 3
   7: 1 2 3
  11: 1 2 4
  13: 1 3 4
  17: 1 5
  19: 1 2 5
  23: 1 2 3 5
  29: 1 3 4 5
  31: 1 2 3 4 5
  37: 1 3 6
  41: 1 4 6
  43: 1 2 4 6
  47: 1 2 3 4 6
		

Crossrefs

Row lengths are A014499.
Second column is A023506(n) + 1.
Final column is A035100.
Prime-indexed rows of A048793.
Row-sums are A372429, restriction of A029931 (sum of binary indices).
A019565 gives Heinz number of binary indices, adjoint A048675.
A029837 gives greatest binary index, least A001511.
A048793 lists binary indices, length A000120, reverse A272020.
A070939 gives length of binary expansion.

Programs

  • Mathematica
    Table[Join@@Position[Reverse[IntegerDigits[Prime[n],2]],1],{n,15}]

A372442 (Greatest binary index of n) minus (greatest prime index of n).

Original entry on oeis.org

1, 0, 2, 0, 1, -1, 3, 2, 1, -1, 2, -2, 0, 1, 4, -2, 3, -3, 2, 1, 0, -4, 3, 2, -1, 3, 1, -5, 2, -6, 5, 1, -1, 2, 4, -6, -2, 0, 3, -7, 2, -8, 1, 3, -3, -9, 4, 2, 3, -1, 0, -10, 4, 1, 2, -2, -4, -11, 3, -12, -5, 2, 6, 1, 2, -12, 0, -2, 3, -13, 5, -14, -5, 4, -1
Offset: 2

Views

Author

Gus Wiseman, May 07 2024

Keywords

Comments

A binary index of n is any position of a 1 in its reversed binary expansion. The binary indices of n are row n of A048793.
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

For sum instead of maximum we have A372428, zeros A372427.
Positions of zeros are A372436.
For minimum instead of maximum we have A372437, zeros {}.
For length instead of maximum we have A372441, zeros A071814.
Positions of odd terms are A372588, even A372589.
A019565 gives Heinz number of binary indices, adjoint A048675.
A029837 gives greatest binary index, least A001511.
A048793 lists binary indices, length A000120, reverse A272020, sum A029931.
A061395 gives greatest prime index, least A055396.
A070939 gives length of binary expansion.
A112798 lists prime indices, length A001222, reverse A296150, sum A056239.

Programs

  • Mathematica
    bix[n_]:=Join@@Position[Reverse[IntegerDigits[n,2]],1];
    prix[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Table[Max[bix[n]]-Max[prix[n]],{n,2,100}]

Formula

a(n) = A070939(n) - A061395(n) = A029837(n) - A061395(n) for n > 1.

A372437 (Least binary index of n) minus (least prime index of n).

Original entry on oeis.org

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

Views

Author

Gus Wiseman, May 06 2024

Keywords

Comments

A binary index of n is any position of a 1 in its reversed binary expansion. The binary indices of n are row n of A048793.
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.
Is 0 the only integer not appearing in the data?

Crossrefs

Positions of first appearances are A174090.
For sum instead of minimum we have A372428, zeros A372427.
For maximum instead of minimum we have A372442, zeros A372436.
For length instead of minimum we have A372441, zeros A071814.
A003963 gives product of prime indices.
A019565 gives Heinz number of binary indices, adjoint A048675.
A029837 gives greatest binary index, least A001511.
A048793 lists binary indices, length A000120, reverse A272020, sum A029931.
A061395 gives greatest prime index, least A055396.
A070939 gives length of binary expansion.
A112798 lists prime indices, length A001222, reverse A296150, sum A056239.

Programs

  • Mathematica
    bix[n_]:=Join@@Position[Reverse[IntegerDigits[n,2]],1];
    prix[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Table[Min[bix[n]]-Min[prix[n]],{n,2,100}]

Formula

a(2n) = A001511(n).
a(2n + 1) = -A038802(n).
a(n) = A001511(n) - A055396(n).

A372517 Least k such that the k-th prime number has exactly n ones in its binary expansion.

Original entry on oeis.org

1, 2, 4, 9, 11, 64, 31, 76, 167, 309, 502, 801, 1028, 7281, 6363, 12079, 12251, 43237, 43390, 146605, 291640, 1046198, 951351, 2063216, 3957778, 11134645, 14198321, 28186247, 54387475, 249939829, 105097565, 393248783, 751545789, 1391572698, 2182112798, 8242984130
Offset: 1

Views

Author

Gus Wiseman, May 12 2024

Keywords

Comments

In other words, the a(n)-th prime is the least with binary weight n. The sorted version is A372686.

Examples

			The primes A000040(a(n)) together with their binary expansions and binary indices begin:
        2:                     10 ~ {2}
        3:                     11 ~ {1,2}
        7:                    111 ~ {1,2,3}
       23:                  10111 ~ {1,2,3,5}
       31:                  11111 ~ {1,2,3,4,5}
      311:              100110111 ~ {1,2,3,5,6,9}
      127:                1111111 ~ {1,2,3,4,5,6,7}
      383:              101111111 ~ {1,2,3,4,5,6,7,9}
      991:             1111011111 ~ {1,2,3,4,5,7,8,9,10}
     2039:            11111110111 ~ {1,2,3,5,6,7,8,9,10,11}
     3583:           110111111111 ~ {1,2,3,4,5,6,7,8,9,11,12}
     6143:          1011111111111 ~ {1,2,3,4,5,6,7,8,9,10,11,13}
     8191:          1111111111111 ~ {1,2,3,4,5,6,7,8,9,10,11,12,13}
    73727:      10001111111111111 ~ {1,2,3,4,5,6,7,8,9,10,11,12,13,17}
    63487:       1111011111111111 ~ {1,2,3,4,5,6,7,8,9,10,11,13,14,15,16}
		

Crossrefs

Positions firsts of first appearances in A014499.
Taking primes gives A061712.
Counting zeros (weight) gives A372474, firsts of A035103.
For binary length we have A372684 (take primes A104080), firsts of A035100.
The sorted version is A372686, taking primes A372685.
A000120 counts ones in binary expansion (binary weight), zeros A080791.
A029837 gives greatest binary index, least A001511.
A030190 gives binary expansion, reversed A030308.
A048793 lists binary indices, reverse A272020, sum A029931.
A372471 lists binary indices of primes.

Programs

  • Mathematica
    spsm[y_]:=Max@@NestWhile[Most,y,Union[#]!=Range[Max@@#]&];
    j=DigitCount[#,2,1]&/@Select[Range[1000],PrimeQ];
    Table[Position[j,k][[1,1]],{k,spsm[j]}]
  • PARI
    a(n) = my(k=1, p=2); while(hammingweight(p) !=n, p = nextprime(p+1); k++); k; \\ Michel Marcus, May 13 2024
    
  • Python
    from itertools import count
    from sympy import isprime, primepi
    from sympy.utilities.iterables import multiset_permutations
    def A372517(n):
        for l in count(n-1):
            m = 1<Chai Wah Wu, May 13 2024

Formula

A000040(a(n)) = A061712(n).

Extensions

a(32)-a(36) from Pontus von Brömssen, May 13 2024

A372516 Number of ones minus number of zeros in the binary expansion of the n-th prime number.

Original entry on oeis.org

0, 2, 1, 3, 2, 2, -1, 1, 3, 3, 5, 0, 0, 2, 4, 2, 4, 4, -1, 1, -1, 3, 1, 1, -1, 1, 3, 3, 3, 1, 7, -2, -2, 0, 0, 2, 2, 0, 2, 2, 2, 2, 6, -2, 0, 2, 2, 6, 2, 2, 2, 6, 2, 6, -5, -1, -1, 1, -1, -1, 1, -1, 1, 3, 1, 3, 1, -1, 3, 3, -1, 3, 5, 3, 5, 7, -1, 1, -1, 1, 1
Offset: 1

Views

Author

Gus Wiseman, May 13 2024

Keywords

Comments

Absolute value is A177718.

Examples

			The binary expansion of 83 is (1,0,1,0,0,1,1), and 83 is the 23rd prime, so a(23) = 4 - 3 = 1.
		

Crossrefs

The sum instead of difference is A035100, firsts A372684 (primes A104080).
The negative version is A037861(A000040(n)).
Restriction of A145037 to the primes.
The unsigned version is A177718.
- Positions of zeros are A177796, indices of the primes A066196.
- Positions of positive terms are indices of the primes A095070.
- Positions of negative terms are indices of the primes A095071.
- Positions of negative ones are A372539, indices of the primes A095072.
- Positions of ones are A372538, indices of the primes A095073.
- Positions of nonnegative terms are indices of the primes A095074.
- Positions of nonpositive terms are indices of the primes A095075.
A000120 counts ones in binary expansion (binary weight), zeros A080791.
A030190 gives binary expansion, reversed A030308.
A035103 counts zeros in binary expansion of primes, firsts A372474.
A048793 lists binary indices, reverse A272020, sum A029931.
A070939 gives length of binary expansion.
A101211 lists run-lengths in binary expansion, row-lengths A069010.
A372471 lists the binary indices of each prime.

Programs

  • Mathematica
    Table[DigitCount[Prime[n],2,1]-DigitCount[Prime[n],2,0],{n,100}]
    DigitCount[#,2,1]-DigitCount[#,2,0]&/@Prime[Range[100]] (* Harvey P. Dale, May 09 2025 *)

Formula

a(n) = A000120(A000040(n)) - A080791(A000040(n)).
a(n) = A014499(n) - A035103(n).
a(n) = A145037(A000040(n))

A372591 Numbers whose binary weight (A000120) plus bigomega (A001222) is even.

Original entry on oeis.org

2, 6, 7, 8, 9, 10, 11, 13, 15, 19, 24, 28, 31, 32, 33, 34, 36, 37, 39, 40, 41, 42, 44, 46, 47, 50, 51, 52, 54, 57, 58, 59, 60, 61, 65, 67, 70, 73, 76, 77, 79, 85, 86, 90, 95, 96, 97, 98, 103, 106, 107, 109, 110, 111, 112, 117, 119, 123, 124, 126, 127, 128, 129
Offset: 1

Views

Author

Gus Wiseman, May 14 2024

Keywords

Comments

The odd version is A372590.

Examples

			The terms (center), their binary indices (left), and their weakly decreasing prime indices (right) begin:
          {2}   2  (1)
        {2,3}   6  (2,1)
      {1,2,3}   7  (4)
          {4}   8  (1,1,1)
        {1,4}   9  (2,2)
        {2,4}  10  (3,1)
      {1,2,4}  11  (5)
      {1,3,4}  13  (6)
    {1,2,3,4}  15  (3,2)
      {1,2,5}  19  (8)
        {4,5}  24  (2,1,1,1)
      {3,4,5}  28  (4,1,1)
  {1,2,3,4,5}  31  (11)
          {6}  32  (1,1,1,1,1)
        {1,6}  33  (5,2)
        {2,6}  34  (7,1)
        {3,6}  36  (2,2,1,1)
      {1,3,6}  37  (12)
    {1,2,3,6}  39  (6,2)
        {4,6}  40  (3,1,1,1)
      {1,4,6}  41  (13)
      {2,4,6}  42  (4,2,1)
		

Crossrefs

For sum (A372428, zeros A372427) we have A372587, complement A372586.
For minimum (A372437) we have A372440, complement A372439.
Positions of even terms in A372441, zeros A071814.
For maximum (A372442, zeros A372436) we have A372589, complement A372588.
The complement is A372590.
For just binary indices:
- length: A001969, complement A000069
- sum: A158704, complement A158705
- minimum: A036554, complement A003159
- maximum: A053754, complement A053738
For just prime indices:
- length: A026424 A028260 (count A027187), complement (count A027193)
- sum: A300061 (count A058696), complement A300063 (count A058695)
- minimum: A340933 (count A026805), complement A340932 (count A026804)
- maximum: A244990 (count A027187), complement A244991 (count A027193)
A019565 gives Heinz number of binary indices, adjoint A048675.
A029837 gives greatest binary index, least A001511.
A031215 lists even-indexed primes, odd A031368.
A048793 lists binary indices, length A000120, reverse A272020, sum A029931.
A070939 gives length of binary expansion.
A112798 lists prime indices, length A001222, reverse A296150, sum A056239.

Programs

  • Mathematica
    Select[Range[100],EvenQ[DigitCount[#,2,1]+PrimeOmega[#]]&]
Showing 1-10 of 33 results. Next