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-9 of 9 results.

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

A087207 A binary representation of the primes that divide a number, shown in decimal.

Original entry on oeis.org

0, 1, 2, 1, 4, 3, 8, 1, 2, 5, 16, 3, 32, 9, 6, 1, 64, 3, 128, 5, 10, 17, 256, 3, 4, 33, 2, 9, 512, 7, 1024, 1, 18, 65, 12, 3, 2048, 129, 34, 5, 4096, 11, 8192, 17, 6, 257, 16384, 3, 8, 5, 66, 33, 32768, 3, 20, 9, 130, 513, 65536, 7, 131072, 1025, 10, 1, 36, 19, 262144, 65, 258
Offset: 1

Views

Author

Mitch Cervinka (puritan(AT)planetkc.com), Oct 26 2003

Keywords

Comments

The binary representation of a(n) shows which prime numbers divide n, but not the multiplicities. a(2)=1, a(3)=10, a(4)=1, a(5)=100, a(6)=11, a(10)=101, a(30)=111, etc.
For n > 1, a(n) gives the (one-based) index of the column where n is located in array A285321. A008479 gives the other index. - Antti Karttunen, Apr 17 2017
From Antti Karttunen, Jun 18 & 20 2017: (Start)
A268335 gives all n such that a(n) = A248663(n); the squarefree numbers (A005117) are all the n such that a(n) = A285330(n) = A048675(n).
For all n > 1 for which the value of A285331(n) is well-defined, we have A285331(a(n)) <= floor(A285331(n)/2), because then n is included in the binary tree A285332 and a(n) is one of its ancestors (in that tree), and thus must be at least one step nearer to its root than n itself.
Conjecture: Starting at any n and iterating the map n -> a(n), we will always reach 0 (see A288569). This conjecture is equivalent to the conjecture that at any n that is neither a prime nor a power of two, we will eventually hit a prime number (which then becomes a power of two in the next iteration). If this conjecture is false then sequence A285332 cannot be a permutation of natural numbers. On the other hand, if the conjecture is true, then A285332 must be a permutation of natural numbers, because all primes and powers of 2 occur in definite positions in that tree. This conjecture also implies the conjectures made in A019565 and A285320 that essentially claim that there are neither finite nor infinite cycles in A019565.
If there are any 2-cycles in this sequence, then both terms of the cycle should be present in A286611 and the larger one should be present in A286612.
(End)
Binary rank of the distinct prime indices of n, where the binary rank of an integer partition y is given by Sum_i 2^(y_i-1). For all prime indices (with multiplicity) we have A048675. - Gus Wiseman, May 25 2024

Examples

			a(38) = 129 because 38 = 2*19 = prime(1)*prime(8) and 129 = 2^0 + 2^7 (in binary 10000001).
a(140) = 13, binary 1101 because 140 is divisible by the first, third and fourth primes and 2^(1-1) + 2^(3-1) + 2^(4-1) = 13.
		

Crossrefs

For partial sums see A288566.
Sequences with related definitions: A007947, A008472, A027748, A048675, A248663, A276379 (same sequence shown in base 2), A288569, A289271, A297404.
Cf. A286608 (numbers n for which a(n) < n), A286609 (n for which a(n) > n), and also A286611, A286612.
A003986, A003961, A059896 are used to express relationship between terms of this sequence.
Related to A267116 via A225546.
Positions of particular values are: A000079\{1} (1), A000244\{1} (2), A033845 (3), A000351\{1} (4), A033846 (5), A033849 (6), A143207 (7), A000420\{1} (8), A033847 (9), A033850 (10), A033851 (12), A147576 (14), A147571 (15), A001020\{1} (16), A033848 (17).
A048675 gives binary rank of prime indices.
A061395 gives greatest prime index, least A055396.
A112798 lists prime indices, length A001222, reverse A296150, sum A056239.
Binary indices (listed A048793):
- length A000120, complement A023416
- min A001511, opposite A000012
- sum A029931, product A096111
- max A029837 or A070939, opposite A070940
- complement A368494, sum A359400
- opposite complement A371571, sum A359359
- opposite A371572, sum A230877

Programs

  • Haskell
    a087207 = sum . map ((2 ^) . (subtract 1) . a049084) . a027748_row
    -- Reinhard Zumkeller, Jul 16 2013
    
  • Mathematica
    a[n_] := Total[ 2^(PrimePi /@ FactorInteger[n][[All, 1]] - 1)]; a[1] = 0; Table[a[n], {n, 1, 69}] (* Jean-François Alcover, Dec 12 2011 *)
  • PARI
    a(n) = {if (n==1, 0, my(f=factor(n), v = []); forprime(p=2, vecmax(f[,1]), v = concat(v, vecsearch(f[,1], p)!=0);); fromdigits(Vecrev(v), 2));} \\ Michel Marcus, Jun 05 2017
    
  • PARI
    A087207(n)=vecsum(apply(p->1<M. F. Hasler, Jun 23 2017
    
  • Python
    from sympy import factorint, primepi
    def a(n):
        return sum(2**primepi(i - 1) for i in factorint(n))
    print([a(n) for n in range(1, 101)]) # Indranil Ghosh, Jun 06 2017
    
  • Scheme
    (definec (A087207 n) (if (= 1 n) 0 (+ (A000079 (+ -1 (A055396 n))) (A087207 (A028234 n))))) ;; This uses memoization-macro definec
    (define (A087207 n) (A048675 (A007947 n))) ;; Needs code from A007947 and A048675. - Antti Karttunen, Jun 19 2017

Formula

Additive with a(p^e) = 2^(i-1) where p is the i-th prime. - Vladeta Jovovic, Oct 29 2003
a(n) gives the m such that A019565(m) = A007947(n). - Naohiro Nomoto, Oct 30 2003
A000120(a(n)) = A001221(n); a(n) = Sum(2^(A049084(p)-1): p prime-factor of n). - Reinhard Zumkeller, Nov 30 2003
G.f.: Sum_{k>=1} 2^(k-1)*x^prime(k)/(1-x^prime(k)). - Franklin T. Adams-Watters, Sep 01 2009
From Antti Karttunen, Apr 17 2017, Jun 19 2017 & Dec 06 2018: (Start)
a(n) = A048675(A007947(n)).
a(1) = 0; for n > 1, a(n) = 2^(A055396(n)-1) + a(A028234(n)).
A000035(a(n)) = 1 - A000035(n). [a(n) and n are of opposite parity.]
A248663(n) <= a(n) <= A048675(n). [XOR-, OR- and +-variants.]
a(A293214(n)) = A218403(n).
a(A293442(n)) = A267116(n).
A069010(a(n)) = A287170(n).
A007088(a(n)) = A276379(n).
A038374(a(n)) = A300820(n) for n >= 1.
(End)
From Peter Munn, Jan 08 2020: (Start)
a(A059896(n,k)) = a(n) OR a(k) = A003986(a(n), a(k)).
a(A003961(n)) = 2*a(n).
a(n^2) = a(n).
a(n) = A267116(A225546(n)).
a(A225546(n)) = A267116(n).
(End)

Extensions

More terms from Don Reble, Ray Chandler and Naohiro Nomoto, Oct 28 2003
Name clarified by Antti Karttunen, Jun 18 2017

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}]

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]]]&]

A372687 Number of prime numbers whose binary indices sum to n. Number of strict integer partitions y of n such that Sum_i 2^(y_i-1) is prime.

Original entry on oeis.org

0, 0, 1, 1, 1, 0, 2, 1, 2, 0, 3, 3, 1, 4, 1, 6, 5, 8, 4, 12, 8, 12, 7, 20, 8, 16, 17, 27, 19, 38, 19, 46, 33, 38, 49, 65, 47, 67, 83, 92, 94, 113, 103, 130, 146, 127, 215, 224, 176, 234, 306, 270, 357, 383, 339, 393, 537, 540, 597, 683, 576, 798, 1026, 830, 1157
Offset: 0

Views

Author

Gus Wiseman, May 15 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 inverse of A048793 (binary indices) takes a set s to Sum_i 2^(s_i-1).

Examples

			The a(2) = 1 through a(17) = 8 prime numbers:
  2  3  5  .  17  11  19  .  257  131  73  137  97  521  4099  1031
              7       13     67   41       71       263  2053  523
                             37   23       43       139  1033  269
                                           29       83   193   163
                                                    53   47    149
                                                    31         101
                                                               89
                                                               79
The a(2) = 1 through a(11) = 3 strict partitions:
  (2)  (2,1)  (3,1)  .  (5,1)    (4,2,1)  (4,3,1)  .  (9,1)    (6,4,1)
                        (3,2,1)           (5,2,1)     (6,3,1)  (8,2,1)
                                                      (7,2,1)  (5,3,2,1)
		

Crossrefs

For all positive integers (not just prime) we get A000009.
Number of prime numbers p with A029931(p) = n.
For odd instead of prime we have A096765, even A025147, non-strict A087787
Number of times n appears in A372429.
Number of rows of A372471 with sum n.
The non-strict version is A372688 (or A372887), ranks A277319 (or A372850).
These (strict) partitions have Heinz numbers A372851.
A014499 lists binary indices of prime numbers.
A019565 gives Heinz number of binary indices, adjoint A048675.
A038499 counts partitions of prime length, strict A085756.
A048793 lists binary indices:
- length A000120
- min A001511
- sum A029931
- max A070939
- reverse A272020
A058698 counts partitions of prime numbers, strict A064688.
A096111 gives product of binary indices.
A372689 lists numbers whose binary indices sum to a prime.
A372885 lists primes whose binary indices sum to a prime, indices A372886.

Programs

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

A372850 Numbers whose distinct prime indices are the binary indices of some prime number.

Original entry on oeis.org

3, 6, 9, 10, 12, 18, 20, 22, 24, 27, 30, 36, 40, 42, 44, 46, 48, 50, 54, 60, 66, 70, 72, 80, 81, 84, 88, 90, 92, 96, 100, 102, 108, 114, 118, 120, 126, 130, 132, 140, 144, 150, 160, 162, 168, 176, 180, 182, 184, 192, 198, 200, 204, 216, 228, 236, 238, 240, 242
Offset: 1

Views

Author

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

Examples

			The distinct prime indices of 45 are {2,3}, which are the binary indices of 6, which is not prime, so 45 is not in the sequence.
The distinct prime indices of 60 are {1,2,3}, which are the binary indices of 7, which is prime, so 60 is in the sequence.
The terms together with their prime indices begin:
    3: {2}
    6: {1,2}
    9: {2,2}
   10: {1,3}
   12: {1,1,2}
   18: {1,2,2}
   20: {1,1,3}
   22: {1,5}
   24: {1,1,1,2}
   27: {2,2,2}
   30: {1,2,3}
   36: {1,1,2,2}
   40: {1,1,1,3}
   42: {1,2,4}
   44: {1,1,5}
   46: {1,9}
   48: {1,1,1,1,2}
   50: {1,3,3}
   54: {1,2,2,2}
   60: {1,1,2,3}
   66: {1,2,5}
   70: {1,3,4}
		

Crossrefs

For even instead of prime we have A005408, with multiplicity A003159.
For odd instead of prime we have A005843, with multiplicity A036554.
For prime indices with multiplicity we have A277319, counted by A372688.
The squarefree case is A372851, counted by A372687.
Partitions of this type are counted by A372887.
A014499 lists binary indices of prime numbers.
A019565 gives Heinz number of binary indices, adjoint A048675.
A038499 counts partitions of prime length, strict A085756.
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
    prix[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Select[Range[100],PrimeQ[Total[2^(Union[prix[#]]-1)]]&]

Formula

Numbers k such that Sum_{i:prime(i)|k} 2^(i-1) is prime, where the sum is over the distinct prime indices of k.

A372851 Squarefree numbers whose prime indices are the binary indices of some prime number.

Original entry on oeis.org

3, 6, 10, 22, 30, 42, 46, 66, 70, 102, 114, 118, 130, 182, 238, 246, 266, 318, 330, 354, 370, 402, 406, 434, 442, 510, 546, 646, 654, 690, 762, 770, 798, 930, 938, 946, 962, 986, 1066, 1102, 1122, 1178, 1218, 1222, 1246, 1258, 1334, 1378, 1430, 1482, 1578
Offset: 1

Views

Author

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

Examples

			The prime indices of 70 are {1,3,4}, which are the binary indices of 13, which is prime, so 70 is in the sequence.
The prime indices of 15 are {2,3}, which are the binary indices of 6, which is not prime, so 15 is not in the sequence.
The terms together with their prime indices begin:
    3: {2}
    6: {1,2}
   10: {1,3}
   22: {1,5}
   30: {1,2,3}
   42: {1,2,4}
   46: {1,9}
   66: {1,2,5}
   70: {1,3,4}
  102: {1,2,7}
  114: {1,2,8}
  118: {1,17}
  130: {1,3,6}
  182: {1,4,6}
  238: {1,4,7}
  246: {1,2,13}
  266: {1,4,8}
  318: {1,2,16}
  330: {1,2,3,5}
  354: {1,2,17}
  370: {1,3,12}
  402: {1,2,19}
		

Crossrefs

[Warning: do not confuse A372887 with the strict case A372687.]
For odd instead of prime we have A039956.
For even instead of prime we have A056911.
Strict partitions of this type are counted by A372687.
Non-strict partitions of this type are counted by A372688, ranks A277319.
The nonsquarefree version is A372850, counted by A372887.
A014499 lists binary indices of prime numbers.
A019565 gives Heinz number of binary indices, adjoint A048675.
A038499 counts partitions of prime length, strict A085756.
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
    Select[Range[100],SquareFreeQ[#] && PrimeQ[Total[2^(PrimePi/@First/@FactorInteger[#]-1)]]&]

Formula

Squarefree numbers k such that Sum_{i:prime(i)|k} 2^(i-1) is prime, where the sum is over the (distinct) prime indices of k.

A372887 Number of integer partitions of n whose distinct parts are the binary indices of some prime number.

Original entry on oeis.org

0, 0, 1, 1, 3, 3, 6, 8, 12, 14, 21, 29, 36, 48, 56, 74, 94, 123, 144, 195, 235, 301, 356, 456, 538, 679, 803, 997, 1189, 1467, 1716, 2103, 2488, 2968, 3517, 4185, 4907, 5834, 6850, 8032, 9459, 11073, 12933, 15130, 17652, 20480, 24011, 27851, 32344, 37520
Offset: 0

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.
Note the inverse of A048793 (binary indices) takes a set s to Sum_i 2^(s_i-1).

Examples

			The partition y = (4,3,1,1) has distinct parts {1,3,4}, which are the binary indices of 13, which is prime, so y is counted under a(9).
The a(2) = 1 through a(9) = 14 partitions:
  (2)  (21)  (22)   (221)   (51)     (331)     (431)      (3321)
             (31)   (311)   (222)    (421)     (521)      (4221)
             (211)  (2111)  (321)    (511)     (2222)     (4311)
                            (2211)   (2221)    (3221)     (5211)
                            (3111)   (3211)    (3311)     (22221)
                            (21111)  (22111)   (4211)     (32211)
                                     (31111)   (5111)     (33111)
                                     (211111)  (22211)    (42111)
                                               (32111)    (51111)
                                               (221111)   (222111)
                                               (311111)   (321111)
                                               (2111111)  (2211111)
                                                          (3111111)
                                                          (21111111)
		

Crossrefs

For odd instead of prime we have A000041, even A002865.
The strict case is A372687, ranks A372851.
Counting not just distinct parts gives A372688, ranks A277319.
These partitions have Heinz numbers A372850.
A014499 lists binary indices of prime numbers.
A019565 gives Heinz number of binary indices, adjoint A048675.
A058698 counts partitions of prime numbers, strict A064688.
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
    Table[Length[Select[IntegerPartitions[n], PrimeQ[Total[2^(Union[#]-1)]]&]],{n,0,30}]
Showing 1-9 of 9 results.