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

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.

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

Views

Author

Vladeta Jovovic, Jan 31 2005

Keywords

Crossrefs

Programs

  • Maple
    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
  • Mathematica
    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 *)

Formula

G.f.: Sum(prime(k)!*x^(1/2*prime(k)^2+1/2*prime(k))/Product(1-x^j, j = 1 .. prime(k)), k = 1 .. infinity).

Extensions

More terms from 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

Views

Author

Ilya Gutkovskiy, Dec 04 2020

Keywords

Examples

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

Crossrefs

Programs

  • Maple
    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
  • Mathematica
    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.