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

A036215 Binary reversal of 3^n.

Original entry on oeis.org

1, 3, 9, 27, 69, 207, 621, 3345, 4275, 25497, 38247, 229173, 589185, 1669443, 5205897, 14045019, 34319397, 102566511, 307313949, 1843835217, 2312645619, 13776780249, 20417442711, 112792132341, 290155405761, 847524815523, 2611222884297, 7627711248315
Offset: 0

Views

Author

Keywords

Comments

Compute 3^n in binary, reverse the bits, from 0 to the most significant bit of the power.

Crossrefs

Cf. A036213 and A036214.

Programs

  • Mathematica
    Table[FromDigits[Reverse[IntegerDigits[3^n, 2]], 2], {n, 0, 30}] (* Vincenzo Librandi, Sep 09 2013 *)
  • PARI
    a(n) = subst(Polrev(binary(3^n)), x, 2); \\ Michel Marcus, Sep 08 2013

Formula

a(n) = A030101(A000244(n)). - Michel Marcus, Sep 08 2013

Extensions

More terms from Michel Marcus, Sep 08 2013

A036213 Duplicating binary multipliers; i.e., n+1 1-bits placed 2n bits from each other.

Original entry on oeis.org

1, 5, 273, 266305, 4311810305, 1127000493261825, 4723519685917965029377, 316931994050834867150735294465, 340287559297026369749534115703797383169, 5846028850153881119687907085637645039610972340225, 1606939576755992644461949257743820820735113393327883823349761
Offset: 0

Views

Author

Keywords

Comments

A 2n-bit binary number can be reversed by multiplying it first by 2 and the n-th element of this sequence, masking it (bit and) with n-th element of A036214 and taking remainder of the division by (2^(2n + 2) - 1).

References

  • R. Schroeppel: DECsystem-10/20 Processor Reference Manual AA-H391A-TK, Chapter 2, User Operations, section 2.15: Programming Examples: Reversing Order of Digits.

Programs

  • Magma
    [1] cat [((2^((2*(n^2))+2*(n)))-1)/((2^(2*n))-1): n in [1..10]]; // Vincenzo Librandi, Aug 03 2017
  • Mathematica
    Join[{1}, Table[((2^((2 (n^2)) + 2 (n))) - 1) / ((2^(2 n)) - 1), {n, 20}]] (* Vincenzo Librandi, Aug 03 2017 *)
  • PARI
    a(n) = if (n==0, 1, ((2^((2*(n^2))+2*(n)))-1)/((2^(2*n))-1)) \\ Michel Marcus, Jun 07 2013
    

Formula

a(0) = 1, a(n) = (2^(2*n^2+2*n)-1) / (2^(2*n)-1).
Showing 1-2 of 2 results.