A244588 a(n) = n OR 6.
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
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
Comments