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

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

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

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

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

A372430 Positive integers k such that the distinct prime indices of k are a subset of the binary indices of k.

Original entry on oeis.org

1, 3, 5, 15, 27, 39, 55, 63, 85, 121, 125, 135, 169, 171, 175, 209, 243, 247, 255, 299, 375, 399, 437, 459, 507, 539, 605, 637, 725, 735, 783, 841, 867, 891, 1085, 1215, 1323, 1331, 1375, 1519, 1767, 1815, 1863, 2079, 2125, 2187, 2223, 2295, 2299, 2331, 2405
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.
Conjecture: The only number whose binary indices are a subset of its prime indices is 4100, with binary indices {3,13} and prime indices {1,1,3,3,13}. Verified up to 10,000,000.

Examples

			The prime indices of 135 are {2,2,2,3}, and the binary indices are {1,2,3,8}. Since {2,3} is a subset of {1,2,3,8}, 135 is in the sequence.
The terms together with their prime indices begin:
     1: {}
     3: {2}
     5: {3}
    15: {2,3}
    27: {2,2,2}
    39: {2,6}
    55: {3,5}
    63: {2,2,4}
    85: {3,7}
   121: {5,5}
   125: {3,3,3}
The terms together with their binary expansions and binary indices begin:
     1:              1 ~ {1}
     3:             11 ~ {1,2}
     5:            101 ~ {1,3}
    15:           1111 ~ {1,2,3,4}
    27:          11011 ~ {1,2,4,5}
    39:         100111 ~ {1,2,3,6}
    55:         110111 ~ {1,2,3,5,6}
    63:         111111 ~ {1,2,3,4,5,6}
    85:        1010101 ~ {1,3,5,7}
   121:        1111001 ~ {1,4,5,6,7}
   125:        1111101 ~ {1,3,4,5,6,7}
		

Crossrefs

The version for equal lengths is A071814, zeros of A372441.
The version for equal sums is A372427, zeros of A372428.
For disjoint instead of subset we have A372431, complement A372432.
The version for equal maxima is A372436, zeros of A372442.
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
    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[1000],SubsetQ[bix[#],prix[#]]&]

Formula

Row k of A304038 is a subset of row k of A048793.

A372431 Positive integers k such that the prime indices of k are disjoint from the binary indices of k.

Original entry on oeis.org

1, 2, 4, 7, 8, 9, 10, 11, 12, 13, 16, 17, 19, 21, 23, 24, 25, 26, 29, 31, 32, 33, 34, 35, 36, 37, 38, 40, 41, 43, 44, 46, 47, 48, 49, 50, 53, 57, 58, 59, 61, 62, 64, 65, 67, 69, 71, 72, 73, 74, 76, 79, 80, 81, 82, 83, 84, 86, 89, 92, 93, 94, 96, 97, 98, 101
Offset: 1

Views

Author

Gus Wiseman, May 03 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 65 is in the sequence.
The terms together with their prime indices begin:
     1: {}
     2: {1}
     4: {1,1}
     7: {4}
     8: {1,1,1}
     9: {2,2}
    10: {1,3}
    11: {5}
    12: {1,1,2}
    13: {6}
    16: {1,1,1,1}
The terms together with their binary expansions and binary indices begin:
   1:       1 ~ {1}
   2:      10 ~ {2}
   4:     100 ~ {3}
   7:     111 ~ {1,2,3}
   8:    1000 ~ {4}
   9:    1001 ~ {1,4}
  10:    1010 ~ {2,4}
  11:    1011 ~ {1,2,4}
  12:    1100 ~ {3,4}
  13:    1101 ~ {1,3,4}
  16:   10000 ~ {5}
		

Crossrefs

For subset instead of disjoint we have A372430.
The complement is A372432.
Equal lengths: A071814, zeros of A372441.
Equal sums: A372427, zeros of A372428.
Equal maxima: A372436, zeros of A372442.
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],Intersection[bix[#],prix[#]]=={}&]
Showing 1-8 of 8 results.