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.

A244588 a(n) = n OR 6.

Original entry on oeis.org

6, 7, 6, 7, 6, 7, 6, 7, 14, 15, 14, 15, 14, 15, 14, 15, 22, 23, 22, 23, 22, 23, 22, 23, 30, 31, 30, 31, 30, 31, 30, 31, 38, 39, 38, 39, 38, 39, 38, 39, 46, 47, 46, 47, 46, 47, 46, 47, 54, 55, 54, 55, 54, 55, 54, 55, 62, 63, 62, 63, 62, 63, 62, 63, 70, 71, 70, 71
Offset: 0

Views

Author

Gary Detlefs, Jun 30 2014

Keywords

Comments

a(n) = n if n is congruent to (6, 7) mod 8.

Crossrefs

Cf. similar sequences listed in A244587.

Programs

  • Magma
    [BitwiseOr(n, 6): n in [0..80]]; // Bruno Berselli, Jul 01 2014
  • Maple
    with(Bits): seq(Or(n,6), n = 0..60);
  • Mathematica
    Table[BitOr[n, 6], {n, 0, 80}] (* Bruno Berselli, Jul 01 2014 *)

Formula

a(n) = (n+6) - (n AND 6).
a(n) = (n XOR 6) + (n AND 6).
a(n) = n + ( 6*floor((n+2)/2) mod 8 ).
Sum_{n>=0} (-1)^n/a(n) = sqrt(2)*Pi/4 - sqrt(2)*log(sqrt(2)+1)/2 - log(2)/2. - Amiram Eldar, Aug 07 2023