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.

A213543 a(n) = n AND 3^n, where AND is the bitwise AND operator.

Original entry on oeis.org

0, 1, 0, 3, 0, 1, 0, 3, 0, 1, 8, 11, 0, 1, 8, 11, 0, 1, 0, 19, 16, 17, 16, 3, 0, 1, 8, 27, 16, 17, 24, 11, 0, 1, 0, 3, 0, 33, 0, 3, 32, 33, 40, 43, 32, 1, 40, 43, 0, 1, 0, 19, 16, 49, 16, 3, 32, 33, 40, 59, 48, 17, 56, 43, 0, 1, 0, 3, 64, 65, 64, 3, 0, 65, 8, 75
Offset: 0

Views

Author

Alex Ratushnyak, Jun 14 2012

Keywords

Comments

Indices of 0's:
0, 2, 4, 6, 8, 12, 16, 18, 24, 32, 34, 36, 38, 48, 50, 64, 66, 72, 96, 98, 128, 130, 132, 144, 146, 166, 192, 194, 256, 258, 260, 262, 280, 288, 290, 292, 328, 384, 386, 388, 512, 514, ...
Indices of 1's:
1, 5, 9, 13, 17, 25, 33, 45, 49, 65, 89, 97, 129, 173, 177, 193, 257, 261, 265, 281, 353, 385, 513, 517, 521, 529, 561, 601, 685, 705, 769, 773, 777, 1025, 1029, 1037, 1049, 1057, 1073, ...
n's such that a(n)=n:
0, 1, 3, 11, 19, 27, 43, 59, 75, 83, 107, 139, 147, 155, 203, 211, 267, 275, 283, 299, 315, 395, 403, 411, 523, 531, 539, 555, 571, 587, 595, 619, 779, 787, 795, 811, 827, 1051, 1083, ...

Crossrefs

Programs

  • Maple
    a:= proc(n) local i, k, m, r;
          k:= n;
          m:= 3 &^ k mod (2^(1+ilog2(1+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 22 2012
  • Python
    print([3**n & n for n in range(99)])