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
The binary indices of 89 = prime(24) are {1,4,5,7}, with sum 17, which is prime, so 24 is in the sequence.
Numbers k such that
A029931(prime(k)) is prime.
Indices of primes that belong to
A372689.
The indexed prime numbers themselves are
A372885.
Binary indices:
A372687 counts strict partitions of prime binary rank, counted by
A372851.
A372688 counts partitions of prime binary rank, with Heinz numbers
A277319.
-
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
-
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
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)
For all positive integers (not just prime) we get
A000009.
Number of prime numbers p with
A029931(p) = n.
Number of times n appears in
A372429.
Number of rows of
A372471 with sum n.
These (strict) partitions have Heinz numbers
A372851.
A014499 lists binary indices of prime numbers.
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.
Cf.
A000040,
A005940,
A023506,
A029837,
A035100,
A071814,
A230877,
A231204,
A359359,
A372436,
A372441.
-
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
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}
For prime indices with multiplicity we have
A277319, counted by
A372688.
Partitions of this type are counted by
A372887.
A014499 lists binary indices of prime numbers.
A372885 lists primes whose binary indices sum to a prime, indices
A372886.
Cf.
A000040,
A005940,
A023506,
A029837,
A035100,
A071814,
A096111,
A372429,
A372436,
A372441,
A372471,
A372689.
-
prix[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
Select[Range[100],PrimeQ[Total[2^(Union[prix[#]]-1)]]&]
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
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}
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.
A014499 lists binary indices of prime numbers.
A372885 lists primes whose binary indices sum to a prime, indices
A372886.
Cf.
A000040,
A005940,
A025147,
A035100,
A071814,
A096111,
A096765,
A231204,
A372429,
A372471,
A372689.
A102623
Number of compositions into a prime number of distinct parts.
Original entry on oeis.org
0, 0, 2, 2, 4, 10, 12, 18, 26, 32, 40, 52, 60, 72, 206, 218, 352, 490, 744, 1002, 1382, 1760, 2380, 3004, 3864, 4728, 5954, 12218, 13804, 20554, 27660, 39930, 52682, 75632, 99184, 132940, 172332, 227088, 287606, 373562, 465280, 587602, 725880, 899802, 1094846
Offset: 1
-
b:= proc(n, i) option remember; `if`(n=0, [1],
`if`(n>i*(i+1)/2, [], zip((x, y)->x+y, b(n, i-1),
`if`(i>n, [], [0, b(n-i, i-1)[]]), 0)))
end:
a:= proc(n) local l; l:= b(n$2);
add(`if`(isprime(i), l[i+1]*i!, 0), i=2..nops(l)-1)
end:
seq(a(n), n=1..50); # Alois P. Heinz, Nov 20 2012
-
CoefficientList[ Series[ Sum[ Prime[k]!* x^(Prime[k]^2/2 + Prime[k]/2)/Product[1 - x^j, {j, Prime[k]}], {k, 44}], {x, 0, 44}], x] (* Robert G. Wilson v, Feb 04 2005 *)
A339434
Number of compositions (ordered partitions) of n into a prime number of distinct prime parts.
Original entry on oeis.org
0, 0, 0, 0, 0, 2, 0, 2, 2, 2, 8, 0, 8, 2, 8, 8, 10, 0, 16, 8, 16, 14, 16, 12, 18, 14, 22, 18, 136, 18, 138, 26, 22, 26, 258, 30, 266, 30, 266, 158, 492, 36, 506, 158, 510, 278, 744, 174, 748, 290, 758, 528, 990, 306, 1228, 668, 1116, 780, 6384, 678, 6630, 800, 1720, 1274
Offset: 0
a(10) = 8 because we have [7, 3], [3, 7], [5, 3, 2], [5, 2, 3], [3, 5, 2], [3, 2, 5], [2, 5, 3] and [2, 3, 5].
-
s:= proc(n) option remember; `if`(n<1, 0, ithprime(n)+s(n-1)) end:
b:= proc(n, i, t) option remember; `if`(s(i)`if`(p>n, 0,
b(n-p, i-1, t+1)))(ithprime(i))+b(n, i-1, t)))
end:
a:= n-> b(n, numtheory[pi](n), 0):
seq(a(n), n=0..70); # Alois P. Heinz, Dec 04 2020
-
s[n_] := s[n] = If[n < 1, 0, Prime[n] + s[n - 1]];
b[n_, i_, t_] := b[n, i, t] = If[s[i] < n, 0,
If[n == 0, If[PrimeQ[t], t!, 0], Function[p, If[p > n, 0,
b[n - p, i - 1, t + 1]]][Prime[i]] + b[n, i - 1, t]]];
a[n_] := b[n, PrimePi[n], 0];
Table[a[n], {n, 0, 70}] (* Jean-François Alcover, Mar 01 2022, after Alois P. Heinz *)
Showing 1-6 of 6 results.
Comments