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 11-20 of 24 results. Next

A326673 The positions of ones in the reversed binary expansion of n have integer geometric mean.

Original entry on oeis.org

1, 2, 4, 8, 9, 11, 16, 32, 64, 128, 130, 138, 256, 257, 261, 264, 296, 388, 420, 512, 1024, 2048, 2052, 2084, 2306, 2316, 2338, 2348, 4096, 8192, 16384, 32768, 32769, 32776, 32777, 32899, 32904, 32907, 33024, 35072, 65536, 131072, 131074, 131084, 131106
Offset: 1

Views

Author

Gus Wiseman, Jul 17 2019

Keywords

Examples

			The reversed binary expansion of 11 is (1,1,0,1) and {1,2,4} has integer geometric mean, so 11 is in the sequence.
		

Crossrefs

Partitions with integer geometric mean are A067539.
Subsets with integer geometric mean are A326027.
Factorizations with integer geometric mean are A326028.
Numbers whose binary digit positions have integer mean are A326669.
Numbers whose binary digit positions are relatively prime are A326674.
Numbers whose binary digit positions have integer geometric mean are A326672.

Programs

  • Mathematica
    Select[Range[1000],IntegerQ[GeometricMean[Join@@Position[Reverse[IntegerDigits[#,2]],1]]]&]
  • PARI
    ok(n)={ispower(prod(i=0, logint(n,2), if(bittest(n,i), i+1, 1)), hammingweight(n))}
    { for(n=1, 10^7, if(ok(n), print1(n, ", "))) } \\ Andrew Howroyd, Sep 29 2019

A359495 Sum of positions of 1's in binary expansion minus sum of positions of 1's in reversed binary expansion, where positions in a sequence are read starting with 1 from the left.

Original entry on oeis.org

0, 0, -1, 0, -2, 0, -2, 0, -3, 0, -2, 1, -4, -1, -3, 0, -4, 0, -2, 2, -4, 0, -2, 2, -6, -2, -4, 0, -6, -2, -4, 0, -5, 0, -2, 3, -4, 1, -1, 4, -6, -1, -3, 2, -5, 0, -2, 3, -8, -3, -5, 0, -7, -2, -4, 1, -9, -4, -6, -1, -8, -3, -5, 0, -6, 0, -2, 4, -4, 2, 0, 6
Offset: 0

Views

Author

Gus Wiseman, Jan 05 2023

Keywords

Comments

Also the sum of partial sums of reversed binary expansion minus sum of partial sums of binary expansion.

Examples

			The binary expansion of 158 is (1,0,0,1,1,1,1,0), with positions of 1's {1,4,5,6,7} with sum 23, reversed {2,3,4,5,8} with sum 22, so a(158) = 1.
		

Crossrefs

Indices of positive terms are A359401.
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.

Programs

  • Maple
    a:= n-> (l-> add(i*(l[-i]-l[i]), i=1..nops(l)))(Bits[Split](n)):
    seq(a(n), n=0..127);  # Alois P. Heinz, Jan 09 2023
  • Mathematica
    sap[q_]:=Sum[q[[i]]*(2i-Length[q]-1),{i,Length[q]}];
    Table[sap[IntegerDigits[n,2]],{n,0,100}]
  • Python
    def A359495(n):
        k = n.bit_length()-1
        return sum((i<<1)-k for i, j in enumerate(bin(n)[2:]) if j=='1') # Chai Wah Wu, Jan 09 2023

Formula

a(n) = A029931(n) - A230877(n).
If n = Sum_{i=1..k} q_i * 2^(i-1), then a(n) = Sum_{i=1..k} q_i * (2i-k-1).

A359906 Number of integer partitions of n with integer mean and integer median.

Original entry on oeis.org

1, 2, 2, 4, 2, 8, 2, 10, 9, 14, 2, 39, 2, 24, 51, 49, 2, 109, 2, 170, 144, 69, 2, 455, 194, 116, 381, 668, 2, 1378, 2, 985, 956, 316, 2043, 4328, 2, 511, 2293, 6656, 2, 8634, 2, 8062, 14671, 1280, 2, 26228, 8035, 15991, 11614, 25055, 2, 47201, 39810, 65092
Offset: 1

Views

Author

Gus Wiseman, Jan 21 2023

Keywords

Comments

The median of a multiset is either the middle part (for odd length), or the average of the two middle parts (for even length).

Examples

			The a(1) = 1 through a(9) = 9 partitions:
  1  2   3    4     5      6       7        8         9
     11  111  22    11111  33      1111111  44        333
              31           42               53        432
              1111         51               62        441
                           222              71        522
                           321              2222      531
                           411              3221      621
                           111111           3311      711
                                            5111      111111111
                                            11111111
		

Crossrefs

For just integer mean we have A067538, strict A102627, ranked by A316413.
For just integer median we have A325347, strict A359907, ranked by A359908.
These partitions are ranked by A360009.
A000041 counts partitions, strict A000009.
A058398 counts partitions by mean, see also A008284, A327482.
A051293 counts subsets with integer mean, median A000975.
A326567/A326568 gives mean of prime indices.
A326622 counts factorizations with integer mean, strict A328966.
A359893/A359901/A359902 count partitions by median.
A360005(n)/2 gives median of prime indices.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n], IntegerQ[Mean[#]]&&IntegerQ[Median[#]]&]],{n,1,30}]

A360069 Number of integer partitions of n whose multiset of multiplicities has integer mean.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 9, 9, 13, 16, 25, 26, 39, 42, 62, 67, 95, 107, 147, 168, 225, 245, 327, 381, 471, 565, 703, 823, 1038, 1208, 1443, 1743, 2088, 2439, 2937, 3476, 4163, 4921, 5799, 6825, 8109, 9527, 11143, 13122, 15402, 17887, 20995, 24506, 28546, 33234, 38661
Offset: 0

Views

Author

Gus Wiseman, Jan 27 2023

Keywords

Examples

			The a(1) = 1 through a(8) = 13 partitions:
  (1)  (2)   (3)    (4)     (5)      (6)       (7)        (8)
       (11)  (21)   (22)    (32)     (33)      (43)       (44)
             (111)  (31)    (41)     (42)      (52)       (53)
                    (1111)  (2111)   (51)      (61)       (62)
                            (11111)  (222)     (421)      (71)
                                     (321)     (2221)     (431)
                                     (2211)    (4111)     (521)
                                     (3111)    (211111)   (2222)
                                     (111111)  (1111111)  (3311)
                                                          (5111)
                                                          (221111)
                                                          (311111)
                                                          (11111111)
For example,  the partition (3,2,1,1,1,1) has multiplicities (1,1,4) with mean 2, so is counted under a(9). On the other hand, the partition (3,2,2,1,1) has multiplicities (1,2,2) with mean 5/3, so is not counted under a(9).
		

Crossrefs

These partitions are ranked by A067340 (prime signature has integer mean).
Parts instead of multiplicities: A067538, strict A102627, ranked by A316413.
The case where the parts have integer mean also is ranked by A359905.
A000041 counts integer partitions, strict A000009.
A051293 counts subsets with integer mean, median A000975.
A058398 counts partitions by mean, see also A008284, A327482.
A088529/A088530 gives mean of prime signature (A124010).
A326622 counts factorizations with integer mean, strict A328966.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n], IntegerQ[Mean[Length/@Split[#]]]&]],{n,0,30}]

A326672 The positions of ones in the binary expansion of n have integer geometric mean.

Original entry on oeis.org

1, 2, 4, 8, 9, 13, 16, 18, 26, 32, 36, 52, 64, 72, 104, 128, 144, 208, 256, 257, 288, 321, 416, 512, 514, 576, 642, 832, 1024, 1028, 1152, 1284, 1664, 2048, 2056, 2304, 2568, 3328, 4096, 4112, 4608, 5136, 6656, 8192, 8224, 9216, 10272, 13312, 16384, 16448
Offset: 1

Views

Author

Gus Wiseman, Jul 17 2019

Keywords

Crossrefs

Partitions with integer geometric mean are A067539.
Subsets with integer geometric mean are A326027.
Factorizations with integer geometric mean are A326028.
Numbers whose binary expansion positions have integer mean are A326669.
Numbers whose binary expansion positions are relatively prime are A326674.
Numbers whose reversed binary expansion positions have integer geometric mean are A326673.

Programs

  • Mathematica
    Select[Range[100],IntegerQ[GeometricMean[Join@@Position[IntegerDigits[#,2],1]]]&]

A059519 Number of partitions of n all of whose subpartitions sum to distinct values. Partition(n) = [a, b, c...] where 2n = 2^a + 2^b + 2^c + ...

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 8, 9, 10, 11, 12, 14, 16, 17, 18, 19, 20, 21, 24, 26, 28, 32, 33, 34, 35, 36, 37, 38, 40, 41, 44, 48, 50, 52, 56, 64, 65, 66, 67, 68, 69, 70, 72, 73, 74, 80, 81, 84, 88, 96, 98, 100, 104, 112, 116, 128, 129, 130, 131, 132, 133, 134, 136, 137, 138, 139, 140
Offset: 1

Views

Author

Marc LeBrun, Jan 19 2001

Keywords

Comments

Partition encoding as in A029931. Complement of A059520.
From Gus Wiseman, Jul 22 2019: (Start)
These are numbers whose positions of 1's in their reversed binary expansion form a strict knapsack partition (A275972). The initial terms together with their corresponding partitions are:
1: (1)
2: (2)
3: (2,1)
4: (3)
5: (3,1)
6: (3,2)
8: (4)
9: (4,1)
10: (4,2)
11: (4,2,1)
12: (4,3)
14: (4,3,2)
16: (5)
17: (5,1)
18: (5,2)
19: (5,2,1)
20: (5,3)
(End)

Examples

			14=2+4+8 so Partition(14) = [2,3,4], whose sub-sums are 0,2,3,4,5,6,7 and 14.
		

Crossrefs

Other sequences classifying numbers by their binary indices: A291166 (relatively prime), A295235 (arithmetic progression), A326669 (integer average), A326675 (pairwise coprime).

Programs

  • Mathematica
    bpe[n_]:=Join@@Position[Reverse[IntegerDigits[n,2]],1];
    Select[Range[100],UnsameQ@@Total/@Subsets[bpe[#]]&] (* Gus Wiseman, Jul 22 2019 *)

A359401 Nonnegative integers whose sum of positions of 1's in their binary expansion is greater 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

11, 19, 23, 35, 37, 39, 43, 47, 55, 67, 69, 71, 75, 77, 79, 83, 87, 91, 95, 103, 111, 131, 133, 134, 135, 137, 139, 141, 142, 143, 147, 149, 151, 155, 157, 158, 159, 163, 167, 171, 173, 175, 179, 183, 187, 191, 199, 203, 207, 215, 223, 239, 259, 261, 262, 263
Offset: 1

Views

Author

Gus Wiseman, Jan 05 2023

Keywords

Comments

First differs from A161601 in having 134, with binary expansion (1,0,0,0,0,1,1,0), positions of 1's 1 + 6 + 7 = 14, reversed 2 + 3 + 8 = 13.

Crossrefs

Indices of positive 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.

Programs

  • Mathematica
    sap[q_]:=Sum[q[[i]]*(2i-Length[q]-1),{i,Length[q]}];
    Select[Range[0,100],sap[IntegerDigits[#,2]]>0&]

Formula

A230877(a(n)) > A029931(a(n)).

A326699 Numerator of the average position of a 1 in the reversed binary expansion of n.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Jul 20 2019

Keywords

Examples

			The sequence of fractions begins: 1, 2, 3/2, 3, 2, 5/2, 2, 4, 5/2, 3, 7/3, 7/2, 8/3, 3, 5/2, 5, 3, 7/2, 8/3, 4.
For example, the reversed binary expansion of 18 is (0,1,0,0,1), and the average of {2,5} is 7/2, so a(18) = 7.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local L;
      L:= convert(n,base,2);
      L:= select(t -> L[t]=1, [$1..nops(L)]);
      numer(convert(L,`+`)/nops(L))
    end proc:
    map(f, [$1..100]); # Robert Israel, Oct 07 2019
  • Mathematica
    Table[Numerator[Mean[Join@@Position[Reverse[IntegerDigits[n,2]],1]]],{n,100}]

A326700 Denominator of the average position of a 1 in the reversed binary expansion of n.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Jul 20 2019

Keywords

Comments

The sequence of fractions begins: 1, 2, 3/2, 3, 2, 5/2, 2, 4, 5/2, 3, 7/3, 7/2, 8/3, 3, 5/2, 5, 3, 7/2, 8/3, 4.
For example, the reversed binary expansion of 18 is (0,1,0,0,1), and the average of {2,5} is 7/2, so a(18) = 2.
a(n) divides A000120(n). - Robert Israel, Oct 07 2019

Crossrefs

Positions of 1's are A326669.

Programs

  • Maple
    f:= proc(n) local L;
      L:= convert(n,base,2);
      L:= select(t -> L[t]=1, [$1..nops(L)]);
      denom(convert(L,`+`)/nops(L))
    end proc:
    map(f, [$1..100]); # Robert Israel, Oct 07 2019
  • Mathematica
    Table[Denominator[Mean[Join@@Position[Reverse[IntegerDigits[n,2]],1]]],{n,100}]

A327478 Numbers whose average binary index is also a binary index.

Original entry on oeis.org

1, 2, 4, 7, 8, 14, 16, 21, 28, 31, 32, 39, 42, 56, 57, 62, 64, 73, 78, 84, 93, 107, 112, 114, 124, 127, 128, 141, 146, 155, 156, 168, 175, 177, 186, 214, 217, 224, 228, 245, 248, 254, 256, 267, 273, 282, 287, 292, 310, 312, 313, 336, 341, 350, 354, 371, 372
Offset: 1

Views

Author

Gus Wiseman, Sep 13 2019

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.

Examples

			The sequence of terms together with their binary indices begins:
   1: 1
   2: 2
   4: 3
   7: 1 2 3
   8: 4
  14: 2 3 4
  16: 5
  21: 1 3 5
  28: 3 4 5
  31: 1 2 3 4 5
  32: 6
  39: 1 2 3 6
  42: 2 4 6
  56: 4 5 6
  57: 1 4 5 6
  61: 2 3 4 5 6
		

Crossrefs

Numbers whose binary indices have integer mean are A326669.

Programs

  • Mathematica
    bpe[n_]:=Join@@Position[Reverse[IntegerDigits[n,2]],1];
    Select[Range[100],MemberQ[bpe[#],Mean[bpe[#]]]&]
Previous Showing 11-20 of 24 results. Next