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

A326674 GCD of the set of positions of 1's in the reversed binary expansion of n.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Jul 17 2019

Keywords

Comments

a(n) is even if and only if n is in A062880. - Robert Israel, Oct 13 2020

Examples

			The reversed binary expansion of 40 is (0,0,0,1,0,1), with positions of 1's being {4,6}, so a(40) = GCD(4,6) = 2.
		

Crossrefs

Positions of 1's are A291166, and non-1's are A291165.
GCDs of prime indices are A289508.
GCDs of strict partitions encoded by FDH numbers are A319826.
Numbers whose binary positions are pairwise coprime are A326675.

Programs

  • Maple
    f:= proc(n) local B;
      B:= convert(n,base,2);
      igcd(op(select(t -> B[t]=1, [$1..ilog2(n)+1])))
    end proc:
    map(f, [$1..100]); # Robert Israel, Oct 13 2020
  • Mathematica
    Table[GCD@@Join@@Position[Reverse[IntegerDigits[n,2]],1],{n,100}]

Formula

Trivially, a(n) <= log_2(n). - Charles R Greathouse IV, Nov 15 2022

A326669 Numbers k such that the average position of the ones in the binary expansion of k is an integer.

Original entry on oeis.org

1, 2, 4, 5, 7, 8, 10, 14, 16, 17, 20, 21, 27, 28, 31, 32, 34, 35, 39, 40, 42, 49, 54, 56, 57, 62, 64, 65, 68, 70, 73, 78, 80, 84, 85, 93, 98, 99, 107, 108, 112, 114, 119, 124, 127, 128, 130, 133, 136, 140, 141, 146, 147, 155, 156, 160, 161, 167, 168, 170, 175
Offset: 1

Views

Author

Gus Wiseman, Jul 17 2019

Keywords

Comments

These are numbers whose exponents in their representation as a sum of distinct powers of 2 have integer average.

Examples

			42 is in the sequence because 42 = 2^1 + 2^3 + 2^5 and the average of {1,3,5} is 3, an integer.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[100],IntegerQ[Mean[Join@@Position[IntegerDigits[#,2],1]]]&]
  • PARI
    isok(m) = my(b=binary(m)); denominator(vecsum(Vec(select(x->(x==1), b, 1)))/hammingweight(m)) == 1; \\ Michel Marcus, Jul 02 2021

A326667 Number of factorizations of 2^n into factors > 1 with integer average.

Original entry on oeis.org

1, 2, 3, 4, 5, 7, 8, 11, 15, 19, 21, 29, 37, 44, 58, 67, 86, 105, 136, 146, 219, 236, 295, 327, 473, 469, 694, 707, 932, 1020, 1398, 1340, 2023, 2059, 2636, 2816, 3887, 3855, 5377, 5467, 7095, 7611, 9924, 9992, 13795, 14205, 17728, 19315, 24803, 25452, 33026
Offset: 1

Views

Author

Gus Wiseman, Jul 17 2019

Keywords

Comments

Also the number of integer partitions y of n such that the average of the multiset {2^s: s in y} is an integer.

Examples

			The a(1) = 1 through a(8) = 11 partitions:
  (1)  (2)   (3)    (4)     (5)      (6)       (7)        (8)
       (11)  (21)   (22)    (32)     (33)      (43)       (44)
             (111)  (31)    (41)     (42)      (52)       (53)
                    (1111)  (311)    (51)      (61)       (62)
                            (11111)  (222)     (331)      (71)
                                     (2211)    (511)      (422)
                                     (111111)  (3211)     (2222)
                                               (1111111)  (3311)
                                                          (4211)
                                                          (311111)
                                                          (11111111)
		

Crossrefs

The strict case is A326668.
Factorizations with integer average are A326622.
Partitions with integer average are A067538.
Subsets with integer average are A051293.

Programs

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

A326671 Number of factorizations of 2^n into factors > 1 with even integer average.

Original entry on oeis.org

1, 2, 2, 3, 4, 5, 7, 8, 11, 14, 14, 20, 27, 31, 41, 47, 57, 75, 95, 102, 155, 170, 195, 239, 327, 331, 483, 517, 617, 740, 952, 942, 1406, 1484, 1742, 2023, 2652, 2688, 3680, 3892, 4729, 5375, 6689, 6911, 9437, 9938, 11754, 13529, 16710, 17419, 22346, 24230
Offset: 1

Views

Author

Gus Wiseman, Jul 17 2019

Keywords

Comments

Also the number of integer partitions y of n such that the average of the multiset {2^(s - 1): s in y} is an integer.

Examples

			The a(1) = 1 through a(8) = 8 partitions:
  (1)  (2)   (3)    (4)     (5)      (6)       (7)        (8)
       (11)  (111)  (22)    (32)     (33)      (43)       (44)
                    (1111)  (311)    (42)      (52)       (53)
                            (11111)  (222)     (331)      (62)
                                     (111111)  (511)      (422)
                                               (3211)     (2222)
                                               (1111111)  (4211)
                                                          (11111111)
		

Crossrefs

The strict case is A326670.
Factorizations with integer average are A326622.
Partitions with integer average are A067538.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],IntegerQ[Mean[2^(#-1)]]&]],{n,30}]

A326670 Number of strict integer partitions y of n such that the average of the set {2^(s - 1): s in y} is an integer.

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 3, 3, 5, 4, 6, 6, 8, 7, 10, 9, 13, 12, 15, 16, 23, 22, 27, 31, 41, 41, 50, 57, 74, 75, 90, 99, 133, 127, 158, 167, 226, 203, 278, 262, 371, 325, 457, 387, 622, 484, 715, 606, 969, 672, 1178, 866, 1428, 1050, 1776, 1142, 2276, 1459, 2514, 1792
Offset: 1

Views

Author

Gus Wiseman, Jul 17 2019

Keywords

Examples

			The a(1) = 1 through a(12) = 6 partitions (A = 10, B = 11, C = 12):
  (1)  (2)  (3)  (4)  (5)   (6)   (7)   (8)   (9)    (A)   (B)    (C)
                      (32)  (42)  (43)  (53)  (54)   (64)  (65)   (75)
                                  (52)  (62)  (63)   (73)  (74)   (84)
                                              (72)   (82)  (83)   (93)
                                              (531)        (92)   (A2)
                                                           (731)  (642)
		

Crossrefs

The non-strict case is A326671.
Strict factorizations with integer average are A326668.
Strict partitions with integer average are A102627.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],UnsameQ@@#&&IntegerQ[Mean[2^(#-1)]]&]],{n,30}]
Showing 1-5 of 5 results.