|
|
A163617
|
|
a(2*n) = 2*a(n), a(2*n + 1) = 2*a(n) + 2 + (-1)^n, for all n in Z.
|
|
16
|
|
|
0, 3, 6, 7, 12, 15, 14, 15, 24, 27, 30, 31, 28, 31, 30, 31, 48, 51, 54, 55, 60, 63, 62, 63, 56, 59, 62, 63, 60, 63, 62, 63, 96, 99, 102, 103, 108, 111, 110, 111, 120, 123, 126, 127, 124, 127, 126, 127, 112, 115, 118, 119, 124, 127, 126, 127, 120, 123, 126, 127, 124, 127, 126
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,2
|
|
COMMENTS
|
Fibbinary numbers (A003714) give all integers n >= 0 for which a(n) = 3*n.
Fibbinary numbers also give all integers n >= 0 for which a(n) = A048724(n).
Note that there are also other multiples of three in the sequence, for example, A163617(99) = 231 ("11100111" in binary) = 3*77, while 77 ("1001101" in binary) is not included in A003714. Note that 99 is "1100011" in binary.
(End)
|
|
LINKS
|
|
|
FORMULA
|
a(n) = -A163618(-n) for all n in ZZ.
|
|
EXAMPLE
|
G.f. = 3*x + 6*x^2 + 7*x^3 + 12*x^4 + 15*x^5 + 14*x^6 + 15*x^7 + 24*x^8 + 27*x^9 + ...
|
|
MAPLE
|
|
|
MATHEMATICA
|
|
|
PROG
|
(PARI) {a(n) = bitor(n, n<<1)};
(PARI) {a(n) = if( n==0 || n==-1, n, 2 * a(n \ 2) + (n%2) * (2 + (-1)^(n \ 2)))};
(Haskell)
import Data.Bits ((.|.), shiftL)
a163617 n = n .|. shiftL n 1 :: Integer
(Scheme) (define (A163617 n) (A003986bi n (+ n n))) ;; Here A003986bi implements dyadic bitwise-OR operation (see A003986) - Antti Karttunen, Feb 21 2016
(Julia)
using IntegerSequences
A163617List(len) = [Bits("OR", n, n<<1) for n in 0:len]
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|