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

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
Showing 1-1 of 1 results.