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 21-24 of 24 results.

A326032 a(2^x + ... + 2^z) = w(x) + ... + w(z), where x...z are distinct nonnegative integers and w = A000120.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Jul 22 2019

Keywords

Comments

From Robert Israel, Jul 23 2019: (Start)
a(2*n+1)=a(2*n).
a(n)=1 if and only if n > 1 is in A283526. (End)

Examples

			For example, a(6) = a(2^2 + 2^1) = w(2) + w(1) = 2.
		

Crossrefs

Other sequences that are built by replacing 2^k in the binary representation with other numbers: A022290 (Fibonacci), A059590 (factorials), A073642, A089625 (primes), A116549, A326031.

Programs

  • Maple
    Bwt:= proc(n) option remember; convert(convert(n,base,2),`+`) end proc:
    f:= proc(n) local L,i;
      L:= convert(n,base,2);
      add(L[i]*Bwt(i-1),i=1..nops(L))
    end proc:
    map(f, [$0..100]); # Robert Israel, Jul 23 2019
  • Mathematica
    bpe[n_]:=Join@@Position[Reverse[IntegerDigits[n,2]],1];
    Table[Total[Length/@bpe/@(bpe[n]-1)],{n,0,100}]

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

Original entry on oeis.org

1, 2, 4, 8, 16, 32, 64, 128, 130, 256, 257, 512, 1024, 2048, 2084, 2316, 4096, 8192, 16384, 32768, 32776, 32777, 65536, 131072, 131074, 131200, 131457, 131462, 133390, 165920, 262144, 524288, 1048576, 2097152, 4194304, 8388608, 8388640, 8388897, 8390688, 8519840
Offset: 1

Views

Author

Gus Wiseman, Sep 27 2019

Keywords

Examples

			The sequence of terms together with their binary indices begins:
  2      {2}
  4      {3}
  8      {4}
  16     {5}
  32     {6}
  64     {7}
  128    {8}
  130    {2,8}
  256    {9}
  257    {1,9}
  512    {10}
  1024   {11}
  2048   {12}
  2084   {3,6,12}
  2316   {3,4,9,12}
  4096   {13}
  8192   {14}
  16384  {15}
  32768  {16}
  32776  {4,16}
		

Crossrefs

A superset of A327777.
Numbers whose binary indices have integer mean: A326669
Numbers whose binary indices have integer geometric mean: A326673

Programs

  • Mathematica
    bpe[n_]:=Join@@Position[Reverse[IntegerDigits[n,2]],1];
    Select[Range[1000],IntegerQ[Mean[bpe[#]]]&&IntegerQ[GeometricMean[bpe[#]]]&]
  • PARI
    ok(n)={my(s=0,p=1,k=0); for(i=0, logint(n,2), if(bittest(n,i), s+=i+1; p*=i+1; k++)); s%k==0 && ispower(p,k)}
    { for(n=1, 10^7, if(ok(n), print1(n, ", "))) } \\ Andrew Howroyd, Sep 29 2019

Extensions

a(33)-a(40) from Andrew Howroyd, Sep 29 2019

A327777 Prime numbers whose binary indices have integer mean and integer geometric mean.

Original entry on oeis.org

2, 257, 8519971, 36574494881, 140739702949921, 140773995710729, 140774004099109
Offset: 1

Views

Author

Gus Wiseman, Sep 27 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.
Conjecture: This sequence is infinite.

Examples

			The initial terms together with their binary indices:
                2: {2}
              257: {1,9}
          8519971: {1,2,6,9,18,24}
      36574494881: {1,6,8,16,18,27,32,36}
  140739702949921: {1,6,12,27,32,48}
  140773995710729: {1,4,9,12,18,32,36,48}
  140774004099109: {1,3,6,12,18,24,32,36,48}
		

Crossrefs

A subset of A327368.
The binary weight of prime(n) is A014499(n), with binary length A035100(n).
Heinz numbers of partitions with integer mean: A316413.
Heinz numbers of partitions with integer geometric mean: A326623.
Heinz numbers with both: A326645.
Subsets with integer mean: A051293
Subsets with integer geometric mean: A326027
Subsets with both: A326643
Partitions with integer mean: A067538
Partitions with integer geometric mean: A067539
Partitions with both: A326641
Strict partitions with integer mean: A102627
Strict partitions with integer geometric mean: A326625
Strict partitions with both: A326029
Factorizations with integer mean: A326622
Factorizations with integer geometric mean: A326028
Factorizations with both: A326647
Numbers whose binary indices have integer mean: A326669
Numbers whose binary indices have integer geometric mean: A326673
Numbers whose binary indices have both: A327368

Programs

  • Mathematica
    bpe[n_]:=Join@@Position[Reverse[IntegerDigits[n,2]],1];
    Select[Prime[Range[1000]],IntegerQ[Mean[bpe[#]]]&&IntegerQ[GeometricMean[bpe[#]]]&]

Extensions

a(4)-a(7) from Giovanni Resta, Dec 01 2019

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)).
Previous Showing 21-24 of 24 results.