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.

Previous Showing 31-37 of 37 results.

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.

A372515 Irregular triangle read by rows where row n lists the positions of zeros in the reversed binary expansion of n.

Original entry on oeis.org

1, 1, 2, 2, 1, 1, 2, 3, 2, 3, 1, 3, 3, 1, 2, 2, 1, 1, 2, 3, 4, 2, 3, 4, 1, 3, 4, 3, 4, 1, 2, 4, 2, 4, 1, 4, 4, 1, 2, 3, 2, 3, 1, 3, 3, 1, 2, 2, 1, 1, 2, 3, 4, 5, 2, 3, 4, 5, 1, 3, 4, 5, 3, 4, 5, 1, 2, 4, 5, 2, 4, 5, 1, 4, 5, 4, 5, 1, 2, 3, 5, 2, 3, 5, 1, 3, 5
Offset: 1

Views

Author

Gus Wiseman, May 26 2024

Keywords

Examples

			The reversed binary expansion of 100 is (0,0,1,0,0,1,1), with zeros at positions {1,2,4,5}, so row 100 is (1,2,4,5).
Triangle begins:
   1:
   2: 1
   3:
   4: 1 2
   5: 2
   6: 1
   7:
   8: 1 2 3
   9: 2 3
  10: 1 3
  11: 3
  12: 1 2
  13: 2
  14: 1
  15:
  16: 1 2 3 4
		

Crossrefs

Row lengths are A023416, partial sums A059015.
For ones instead of zeros we have A048793, lengths A000120, sums A029931.
Row sums are A359400, non-reversed A359359.
Same as A368494 but with empty rows () instead of (0).
A003714 lists numbers with no successive binary indices.
A030190 gives binary expansion, reverse A030308.
A039004 lists the positions of zeros in A345927.

Programs

  • Mathematica
    Table[Join@@Position[Reverse[IntegerDigits[n,2]],0],{n,30}]

A326732 Number of iterations of A326731(x) starting at x = n to reach 0.

Original entry on oeis.org

0, 1, 1, 2, 1, 4, 2, 3, 1, 6, 4, 7, 2, 5, 3, 4, 1, 8, 6, 11, 4, 9, 7, 10, 2, 7, 5, 8, 3, 6, 4, 5, 1, 10, 8, 15, 6, 13, 11, 16, 4, 11, 9, 14, 7, 12, 10, 13, 2, 9, 7, 12, 5, 10, 8, 11, 3, 8, 6, 9, 4, 7, 5, 6, 1, 12, 10, 19, 8, 17, 15, 22, 6, 15, 13, 20, 11, 18, 16, 21, 4, 13, 11, 18, 9, 16, 14, 19, 7, 14, 12, 17, 10, 15, 13, 16, 2, 11, 9, 16, 7
Offset: 0

Views

Author

Max Alekseyev, Jul 22 2019

Keywords

Comments

The sequence is well-defined, see Problem 5 of IMO 2019.

Crossrefs

Programs

  • PARI
    A326732(n) = my(b=binary(n)); 2*sum(i=1, #b, i*b[i]) - vecsum(b)^2;

Formula

a(n) = 2*A230877(n) - A000120(n)^2.
a(n) = 1 iff n is a power of 2.

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

A329752 a(0) = 0, a(n) = a(floor(n/2)) + (n mod 2) * floor(log_2(2n))^2 for n > 0.

Original entry on oeis.org

0, 1, 1, 5, 1, 10, 5, 14, 1, 17, 10, 26, 5, 21, 14, 30, 1, 26, 17, 42, 10, 35, 26, 51, 5, 30, 21, 46, 14, 39, 30, 55, 1, 37, 26, 62, 17, 53, 42, 78, 10, 46, 35, 71, 26, 62, 51, 87, 5, 41, 30, 66, 21, 57, 46, 82, 14, 50, 39, 75, 30, 66, 55, 91, 1, 50, 37, 86
Offset: 0

Views

Author

Alois P. Heinz, Nov 20 2019

Keywords

Examples

			For n = 11 = 1011_2 we have a(11) = 1^2 + 3^2 + 4^2 = 1 + 9 + 16 = 26.
		

Crossrefs

Programs

  • Maple
    a:= n-> (l-> add(l[-i]*i^2, i=1..nops(l)))(convert(n, base, 2)):
    seq(a(n), n=0..80);
    # second Maple program:
    a:= proc(n) option remember; `if`(n=0, 0,
          a(iquo(n, 2))+`if`(n::odd, ilog2(2*n)^2, 0))
        end:
    seq(a(n), n=0..80);

Formula

If n = Sum_{i=0..m} c(i)*2^i, c(i) = 0 or 1, then a(n) = Sum_{i=0..m} c(i)*(m+1-i)^2.
a(2^n-1) = n*(n+1)*(2*n+1)/6 = A000330(n).
a(2^n) = 1.
a(2^n+1) = n^2 + 1 = A002522(n).

A359496 Nonnegative integers whose sum of positions of 1's in their binary expansion is less than the sum of positions of 1's in their reversed binary expansion, where positions in a sequence are read starting with 1 from the left.

Original entry on oeis.org

2, 4, 6, 8, 10, 12, 13, 14, 16, 18, 20, 22, 24, 25, 26, 28, 29, 30, 32, 34, 36, 38, 40, 41, 42, 44, 46, 48, 49, 50, 52, 53, 54, 56, 57, 58, 59, 60, 61, 62, 64, 66, 68, 72, 74, 76, 80, 81, 82, 84, 86, 88, 89, 90, 92, 94, 96, 97, 98, 100, 101, 102, 104, 105, 106
Offset: 1

Views

Author

Gus Wiseman, Jan 18 2023

Keywords

Comments

First differs from A161602 in lacking 70, with binary expansion (1,0,0,0,1,1,0), positions of 1's 1 + 5 + 6 = 12, reversed 2 + 3 + 7 = 12.

Examples

			The initial terms, binary expansions, and positions of 1's are:
    2:      10 ~ {2}
    4:     100 ~ {3}
    6:     110 ~ {2,3}
    8:    1000 ~ {4}
   10:    1010 ~ {2,4}
   12:    1100 ~ {3,4}
   13:    1101 ~ {1,3,4}
   14:    1110 ~ {2,3,4}
   16:   10000 ~ {5}
   18:   10010 ~ {2,5}
   20:   10100 ~ {3,5}
   22:   10110 ~ {2,3,5}
   24:   11000 ~ {4,5}
   25:   11001 ~ {1,4,5}
   26:   11010 ~ {2,4,5}
   28:   11100 ~ {3,4,5}
   29:   11101 ~ {1,3,4,5}
   30:   11110 ~ {2,3,4,5}
		

Crossrefs

The opposite version is A359401.
Indices of negative terms in A359495; indices of 0's are A359402.
A030190 gives binary expansion, reverse A030308.
A070939 counts binary digits.
A230877 adds up positions of 1's in binary expansion, reverse A029931.
A326669 lists numbers with integer mean position of a 1 in binary expansion.
A358194 counts partitions by sum of partial sums, compositions A053632.

Programs

  • Mathematica
    Select[Range[100],Total[Accumulate[IntegerDigits[#,2]]]>Total[Accumulate[Reverse[IntegerDigits[#,2]]]]&]

Formula

A230877(a(n)) < A029931(a(n)).

A373120 Number of distinct possible binary ranks of integer partitions of n, where the binary rank of a partition y is given by Sum_i 2^(y_i-1).

Original entry on oeis.org

1, 1, 1, 2, 3, 4, 6, 8, 11, 15, 20, 26, 33, 43, 55, 70, 89, 109, 136, 167, 206, 251, 306, 371, 445, 535, 639, 759, 904, 1069, 1262, 1489, 1747, 2047, 2390, 2784, 3237, 3754, 4350, 5027, 5798, 6680, 7671, 8808, 10091, 11543, 13190, 15040, 17128, 19477, 22118
Offset: 0

Views

Author

Gus Wiseman, May 26 2024

Keywords

Examples

			The partitions of 4 are (4), (3,1), (2,2), (2,1,1), (1,1,1,1), with respective binary ranks 8, 5, 4, 4, 4, so a(4) = 3.
		

Crossrefs

The strict case is A000009.
A048675 gives binary rank of prime indices, distinct A087207.
A118462 lists binary ranks of strict integer partitions, row sums A372888.
A277905 groups all positive integers by binary rank of prime indices.
A372890 adds up binary ranks of integer partitions.
Binary indices (A048793):
- length A000120, complement A023416
- min A001511, opposite A000012
- max A029837 or A070939, opposite A070940
- sum A029931, product A096111
- reverse A272020
- complement A368494, sum A359400
- opposite complement A371571, sum A359359
- opposite A371572, sum A230877

Programs

  • Mathematica
    Table[Length[Union[Total[2^(#-1)]&/@IntegerPartitions[n]]],{n,0,15}]
Previous Showing 31-37 of 37 results.