OFFSET
0,1
COMMENTS
Terms of A004767 repeated four times. [Bruno Berselli, Jul 01 2014]
FORMULA
a(n) = (n+3)- (n AND 3).
a(n) = (n XOR 3) + (n AND 3).
a(n) = n + ((3*n+3) mod 4).
a(n) = 4*floor((n+4)/4)-1.
G.f.: (3 + x^4)/(1 - x - x^4 + x^5). [Bruno Berselli, Jul 01 2014]
MAPLE
with(Bits): seq(Or(n, 3), n = 1..60);
PROG
(Magma) [BitwiseOr(n, 3): n in [0..70]]; // Bruno Berselli, Jul 01 2014
(Python)
def A244584(n): return n|3 # Chai Wah Wu, Jan 18 2023
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Gary Detlefs, Jun 30 2014
STATUS
approved