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 18 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

A372429 Sum of binary indices of prime(n). Sum of positions of ones in the reversed binary expansion of prime(n).

Original entry on oeis.org

2, 3, 4, 6, 7, 8, 6, 8, 11, 13, 15, 10, 11, 13, 16, 15, 18, 19, 10, 13, 12, 17, 15, 17, 14, 17, 19, 20, 21, 19, 28, 11, 13, 15, 17, 19, 21, 17, 20, 22, 22, 23, 29, 16, 19, 21, 23, 30, 24, 25, 26, 31, 27, 33, 10, 15, 17, 19, 18, 19, 21, 19, 23, 26, 25, 28, 23
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.
Do 2, 3, 4, 7, 12, 14 appear just once?
Are 1, 5, 9 missing?
The above questions hold true up to n = 10^6. - John Tyler Rascoe, May 21 2024

Examples

			The primes together with their binary expansions and binary indices begin:
   2:      10 ~ {2}
   3:      11 ~ {1,2}
   5:     101 ~ {1,3}
   7:     111 ~ {1,2,3}
  11:    1011 ~ {1,2,4}
  13:    1101 ~ {1,3,4}
  17:   10001 ~ {1,5}
  19:   10011 ~ {1,2,5}
  23:   10111 ~ {1,2,3,5}
  29:   11101 ~ {1,3,4,5}
  31:   11111 ~ {1,2,3,4,5}
  37:  100101 ~ {1,3,6}
  41:  101001 ~ {1,4,6}
  43:  101011 ~ {1,2,4,6}
  47:  101111 ~ {1,2,3,4,6}
  53:  110101 ~ {1,3,5,6}
  59:  111011 ~ {1,2,4,5,6}
  61:  111101 ~ {1,3,4,5,6}
  67: 1000011 ~ {1,2,7}
  71: 1000111 ~ {1,2,3,7}
  73: 1001001 ~ {1,4,7}
  79: 1001111 ~ {1,2,3,4,7}
		

Crossrefs

The number instead of sum of binary indices is A014499.
Restriction of A029931 (sum of binary indices) to the primes A000040.
The maximum instead of sum of binary indices is A035100, see also A023506.
Row-sums of A372471.
A019565 gives Heinz number of binary indices, adjoint A048675.
A029837 gives greatest binary index, least A001511.
A048793 lists binary indices, length A000120, reverse A272020.
A056239 adds up prime indices.
A070939 gives length of binary expansion.
A096111 gives product of binary indices.
A326031 gives weight of the set-system with BII-number n.
A372427 lists numbers whose binary and prime indices have the same sum.

Programs

  • Mathematica
    bix[n_]:=Join@@Position[Reverse[IntegerDigits[n,2]],1];
    Table[Total[bix[Prime[n]]],{n,100}]

Formula

a(n) = A029931(prime(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))

A372688 Number of integer partitions y of n whose rank Sum_i 2^(y_i-1) is prime.

Original entry on oeis.org

0, 0, 2, 2, 1, 3, 3, 6, 3, 6, 9, 20, 13, 22, 22, 45, 47, 70, 75, 100, 107, 132, 157, 202, 229, 302, 396, 495, 536, 699, 820, 962, 1193, 1507, 1699, 2064, 2455, 2945, 3408, 4026, 4691, 5749, 6670, 7614, 9127, 10930, 12329, 14370, 16955, 19961, 22950, 26574, 30941
Offset: 0

Views

Author

Gus Wiseman, May 16 2024

Keywords

Comments

Note the function taking a set s to Sum_i 2^(s_i-1) is the inverse of A048793 (binary indices).

Examples

			The partition (3,2,1) has rank 2^(3-1) + 2^(2-1) + 2^(1-1) = 7, which is prime, so (3,2,1) is counted under a(6).
The a(2) = 2 through a(10) = 9 partitions:
(2)   (21)   (31)  (221)    (51)    (421)      (431)   (441)     (91)
(11)  (111)        (2111)   (321)   (2221)     (521)   (3321)    (631)
                   (11111)  (3111)  (4111)     (5111)  (4221)    (721)
                                    (22111)            (33111)   (3331)
                                    (211111)           (42111)   (7111)
                                    (1111111)          (411111)  (32221)
                                                                 (322111)
                                                                 (3211111)
                                                                 (31111111)
		

Crossrefs

For all positive integers (not just prime) we get A000041.
For even instead of prime we have A087787, strict A025147, odd A096765.
These partitions have Heinz numbers A277319.
The strict case is A372687, ranks A372851.
The version counting only distinct parts is A372887, ranks A372850.
A014499 lists binary indices of prime numbers.
A019565 gives Heinz number of binary indices, adjoint A048675.
A048793 and A272020 (reverse) list binary indices:
- length A000120
- min A001511
- sum A029931
- max A070939
A058698 counts partitions of prime numbers, strict A064688.
A372885 lists primes whose binary indices sum to a prime, indices A372886.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n], PrimeQ[Total[2^#]/2]&]],{n,0,30}]

A372689 Positive integers whose binary indices (positions of ones in reversed binary expansion) sum to a prime number.

Original entry on oeis.org

2, 3, 4, 6, 9, 11, 12, 16, 18, 23, 26, 29, 33, 38, 41, 43, 44, 48, 50, 55, 58, 61, 64, 69, 71, 72, 74, 79, 81, 86, 89, 91, 92, 96, 101, 103, 104, 106, 111, 113, 118, 121, 131, 132, 134, 137, 142, 144, 149, 151, 152, 154, 159, 163, 164, 166, 169, 174, 176, 181
Offset: 1

Views

Author

Gus Wiseman, May 18 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.
Note the function taking a set s to its binary rank Sum_i 2^(s_i-1) is the inverse of A048793 (binary indices).

Examples

			The terms together with their binary expansions and binary indices begin:
   2:      10 ~ {2}
   3:      11 ~ {1,2}
   4:     100 ~ {3}
   6:     110 ~ {2,3}
   9:    1001 ~ {1,4}
  11:    1011 ~ {1,2,4}
  12:    1100 ~ {3,4}
  16:   10000 ~ {5}
  18:   10010 ~ {2,5}
  23:   10111 ~ {1,2,3,5}
  26:   11010 ~ {2,4,5}
  29:   11101 ~ {1,3,4,5}
  33:  100001 ~ {1,6}
  38:  100110 ~ {2,3,6}
  41:  101001 ~ {1,4,6}
  43:  101011 ~ {1,2,4,6}
  44:  101100 ~ {3,4,6}
  48:  110000 ~ {5,6}
  50:  110010 ~ {2,5,6}
  55:  110111 ~ {1,2,3,5,6}
  58:  111010 ~ {2,4,5,6}
  61:  111101 ~ {1,3,4,5,6}
		

Crossrefs

Numbers k such that A029931(k) is prime.
Union of prime-indexed rows of A118462.
For even instead of prime we have A158704, odd A158705.
For prime indices instead of binary indices we have A316091.
The prime case is A372885, indices A372886.
A000040 lists the prime numbers, A014499 their binary indices.
A019565 gives Heinz number of binary indices, adjoint A048675.
A058698 counts partitions of prime numbers, strict A064688.
A372471 lists binary indices of primes, row-sums A372429.
A372687 counts strict partitions of prime binary rank, counted by A372851.
A372689 lists numbers whose binary indices sum to a prime.
A372885 lists primes whose binary indices sum to a prime, indices A372886.
Binary indices:
- listed A048793, sum A029931
- reversed A272020
- opposite A371572, sum A230877
- length A000120, complement A023416
- min A001511, opposite A000012
- max A070939, opposite A070940
- complement A368494, sum A359400
- opposite complement A371571, sum A359359

Programs

  • Mathematica
    Select[Range[100],PrimeQ[Total[First /@ Position[Reverse[IntegerDigits[#,2]],1]]]&]

A372885 Prime numbers whose binary indices (positions of ones in reversed binary expansion) sum to another prime number.

Original entry on oeis.org

2, 3, 11, 23, 29, 41, 43, 61, 71, 79, 89, 101, 103, 113, 131, 137, 149, 151, 163, 181, 191, 197, 211, 239, 269, 271, 281, 293, 307, 331, 349, 353, 373, 383, 401, 433, 457, 491, 503, 509, 523, 541, 547, 593, 641, 683, 701, 709, 743, 751, 761, 773, 827, 863, 887
Offset: 1

Views

Author

Gus Wiseman, May 19 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.
The indices of these primes are A372886.

Examples

			The binary indices of 89 are {1,4,5,7}, with sum 17, which is prime, so 89 is in the sequence.
The terms together with their binary expansions and binary indices begin:
    2:         10 ~ {2}
    3:         11 ~ {1,2}
   11:       1011 ~ {1,2,4}
   23:      10111 ~ {1,2,3,5}
   29:      11101 ~ {1,3,4,5}
   41:     101001 ~ {1,4,6}
   43:     101011 ~ {1,2,4,6}
   61:     111101 ~ {1,3,4,5,6}
   71:    1000111 ~ {1,2,3,7}
   79:    1001111 ~ {1,2,3,4,7}
   89:    1011001 ~ {1,4,5,7}
  101:    1100101 ~ {1,3,6,7}
  103:    1100111 ~ {1,2,3,6,7}
  113:    1110001 ~ {1,5,6,7}
  131:   10000011 ~ {1,2,8}
  137:   10001001 ~ {1,4,8}
  149:   10010101 ~ {1,3,5,8}
  151:   10010111 ~ {1,2,3,5,8}
  163:   10100011 ~ {1,2,6,8}
  181:   10110101 ~ {1,3,5,6,8}
  191:   10111111 ~ {1,2,3,4,5,6,8}
  197:   11000101 ~ {1,3,7,8}
		

Crossrefs

For prime instead of binary indices we have A006450, prime case of A316091.
Prime numbers p such that A029931(p) is also prime.
Prime case of A372689.
The indices of these primes are A372886.
A000040 lists the prime numbers, A014499 their binary indices.
A019565 gives Heinz number of binary indices, adjoint A048675.
A058698 counts partitions of prime numbers, strict A064688.
A372687 counts strict partitions of prime binary rank, counted by A372851.
A372688 counts partitions of prime binary rank, with Heinz numbers A277319.
Binary indices:
- listed A048793, sum A029931
- reversed A272020
- opposite A371572, sum A230877
- length A000120, complement A023416
- min A001511, opposite A000012
- max A070939, opposite A070940
- complement A368494, sum A359400
- opposite complement A371571, sum A359359

Programs

  • Maple
    filter:= proc(p)
      local L,i,t;
      L:= convert(p,base,2);
      isprime(add(i*L[i],i=1..nops(L)))
    end proc:
    select(filter, [seq(ithprime(i),i=1..200)]); # Robert Israel, Jun 19 2025
  • Mathematica
    Select[Range[100],PrimeQ[#] && PrimeQ[Total[First/@Position[Reverse[IntegerDigits[#,2]],1]]]&]

A372886 Indices of prime numbers whose binary indices (positions of ones in reversed binary expansion) sum to another prime number.

Original entry on oeis.org

1, 2, 5, 9, 10, 13, 14, 18, 20, 22, 24, 26, 27, 30, 32, 33, 35, 36, 38, 42, 43, 45, 47, 52, 57, 58, 60, 62, 63, 67, 70, 71, 74, 76, 79, 84, 88, 94, 96, 97, 99, 100, 101, 108, 116, 124, 126, 127, 132, 133, 135, 137, 144, 150, 154, 156, 160, 161, 162, 164, 172
Offset: 1

Views

Author

Gus Wiseman, May 19 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.
The prime numbers themselves are A372885(n).

Examples

			The binary indices of 89 = prime(24) are {1,4,5,7}, with sum 17, which is prime, so 24 is in the sequence.
		

Crossrefs

Numbers k such that A029931(prime(k)) is prime.
Indices of primes that belong to A372689.
The indexed prime numbers themselves are A372885.
A000040 lists the prime numbers, A014499 their binary indices
A006450 lists primes of prime index, prime case of A316091.
A019565 gives Heinz number of binary indices, adjoint A048675.
A038499 counts partitions of prime length, strict A085756.
Binary indices:
- listed A048793, sum A029931
- reversed A272020
- opposite A371572, sum A230877
- length A000120, complement A023416
- min A001511, opposite A000012
- max A070939, opposite A070940
- complement A368494, sum A359400
- opposite complement A371571, sum A359359
A058698 counts partitions of prime numbers, strict A064688.
A372687 counts strict partitions of prime binary rank, counted by A372851.
A372688 counts partitions of prime binary rank, with Heinz numbers A277319.

Programs

  • Maple
    filter:= proc(p)
      local L,i,t;
      L:= convert(p,base,2);
      isprime(add(i*L[i],i=1..nops(L)))
    end proc:
    select(t -> filter(ithprime(t)), [$1..1000]); # Robert Israel, Jun 19 2025
  • Mathematica
    Select[Range[100],PrimeQ[Total[First /@ Position[Reverse[IntegerDigits[Prime[#],2]],1]]]&]

A372439 Numbers k such that the least binary index of k plus the least prime index of k is odd.

Original entry on oeis.org

2, 3, 6, 7, 8, 9, 10, 13, 14, 15, 18, 19, 21, 22, 24, 26, 27, 29, 30, 32, 33, 34, 37, 38, 39, 40, 42, 43, 45, 46, 49, 50, 51, 53, 54, 56, 57, 58, 61, 62, 63, 66, 69, 70, 71, 72, 74, 75, 77, 78, 79, 81, 82, 86, 87, 88, 89, 90, 91, 93, 94, 96, 98, 99, 101, 102
Offset: 1

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.

Examples

			The terms (center), their binary indices (left), and their prime indices (right) begin:
        {2}   2  (1)
      {1,2}   3  (2)
      {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,3,4}  13  (6)
    {2,3,4}  14  (4,1)
  {1,2,3,4}  15  (3,2)
      {2,5}  18  (2,2,1)
    {1,2,5}  19  (8)
    {1,3,5}  21  (4,2)
    {2,3,5}  22  (5,1)
      {4,5}  24  (2,1,1,1)
    {2,4,5}  26  (6,1)
  {1,2,4,5}  27  (2,2,2)
  {1,3,4,5}  29  (10)
  {2,3,4,5}  30  (3,2,1)
        {6}  32  (1,1,1,1,1)
      {1,6}  33  (5,2)
      {2,6}  34  (7,1)
		

Crossrefs

Positions of odd terms in A372437.
The complement is 1 followed by A372440.
For sum (A372428, zeros A372427) we have A372586, complement A372587.
For maximum (A372442, zeros A372436) we have A372588, complement A372589.
For length (A372441, zeros A071814) we have A372590, complement A372591.
A003963 gives product of prime indices, binary A096111.
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}]]]];
    Select[Range[100],OddQ[Min[bix[#]]+Min[prix[#]]]&]

A372440 Numbers k such that the least binary index of k plus the least prime index of k is even.

Original entry on oeis.org

4, 5, 11, 12, 16, 17, 20, 23, 25, 28, 31, 35, 36, 41, 44, 47, 48, 52, 55, 59, 60, 64, 65, 67, 68, 73, 76, 80, 83, 84, 85, 92, 95, 97, 100, 103, 108, 109, 112, 115, 116, 121, 124, 125, 127, 132, 137, 140, 143, 144, 145, 148, 149, 155, 156, 157, 164, 167, 172
Offset: 1

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.

Examples

			The terms (center), their binary indices (left), and their prime indices (right) begin:
          {3}   4  (1,1)
        {1,3}   5  (3)
      {1,2,4}  11  (5)
        {3,4}  12  (2,1,1)
          {5}  16  (1,1,1,1)
        {1,5}  17  (7)
        {3,5}  20  (3,1,1)
    {1,2,3,5}  23  (9)
      {1,4,5}  25  (3,3)
      {3,4,5}  28  (4,1,1)
  {1,2,3,4,5}  31  (11)
      {1,2,6}  35  (4,3)
        {3,6}  36  (2,2,1,1)
      {1,4,6}  41  (13)
      {3,4,6}  44  (5,1,1)
  {1,2,3,4,6}  47  (15)
        {5,6}  48  (2,1,1,1,1)
      {3,5,6}  52  (6,1,1)
  {1,2,3,5,6}  55  (5,3)
  {1,2,4,5,6}  59  (17)
    {3,4,5,6}  60  (3,2,1,1)
          {7}  64  (1,1,1,1,1,1)
		

Crossrefs

For sum (A372428, zeros A372427) we have A372587, complement A372586.
Positions of even terms in A372437.
The complement is 1 followed by A372439.
For length (A372441, zeros A071814) we have A372591, complement A372590.
For maximum (A372442, zeros A372436) we have A372589, complement A372588.
A003963 gives product of prime indices, binary A096111.
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}]]]];
    Select[Range[100],EvenQ[Min[bix[#]]+Min[prix[#]]]&]
Showing 1-10 of 18 results. Next