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.

A213542 a(n) = k AND k^k, where k=2*n+1, AND is the bitwise AND operator.

Original entry on oeis.org

1, 3, 5, 7, 9, 3, 13, 15, 17, 3, 5, 7, 25, 3, 13, 31, 33, 35, 5, 7, 41, 35, 13, 15, 49, 35, 37, 7, 57, 35, 45, 63, 65, 67, 69, 7, 9, 3, 13, 15, 81, 67, 5, 7, 25, 3, 77, 31, 97, 35, 5, 7, 41, 99, 77, 15, 113, 35, 37, 7, 57, 99, 109, 127, 129, 131, 133, 7, 137, 131
Offset: 0

Views

Author

Alex Ratushnyak, Jun 14 2012

Keywords

Crossrefs

Cf. A213541.

Programs

  • Maple
    a:= proc(n) local i, k, m, r;
          k:= 2*n+1;
          m:= k &^ k mod (2^(1+ilog2(k)));
          r:= 0;
          for i from 0 while (m>0 or k>0) do
            r:= r +2^i* irem(m, 2, 'm') *irem(k, 2, 'k')
          od; r
        end:
    seq(a(n), n=0..100);  # Alois P. Heinz, Jun 21 2012
  • Mathematica
    Table[BitAnd[n,n^n],{n,1,141,2}] (* Harvey P. Dale, Nov 26 2014 *)
  • Python
    print([k**k & k for k in range(1,222,2)])