OFFSET
0,2
COMMENTS
A178225(a(n)) = 1. - Reinhard Zumkeller, Oct 21 2011
a(n) is divisible by 3 and it is always an odd number for n > 0. Therefore a(n) is in A016945 for n > 0. - Altug Alkan, Dec 04 2015
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 0..9999
FORMULA
a(n) = (2^(floor_log_2(n)+1))*n + Sum_{i=0..floor_log_2(n)} '(bit_i(n, i)*(2^(floor_log_2(n)-i)))'.
MATHEMATICA
Prepend[Select[Range@ 3315, Reverse@ # == # && EvenQ@ Length@ # &@ IntegerDigits[#, 2] &], 0] (* Michael De Vlieger, Dec 04 2015 *)
PROG
(Haskell)
a048701 n = foldr (\d v -> 2 * v + d) 0 (reverse bs ++ bs) where
bs = a030308_row (n)
-- Reinhard Zumkeller, Feb 19 2003, Oct 21 2011
(PARI) a048701(n) = my(f); f = length(binary(n)) - 1; 2^(f+1)*n + sum(i=0, f, bittest(n, i) * 2^(f-i)); \\ Altug Alkan, Dec 03 2015
(Python)
def A048701(n):
s = bin(n)[2:]
return int(s+s[::-1], 2) # Chai Wah Wu, Feb 26 2021
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Antti Karttunen, Mar 07 1999
EXTENSIONS
Offset corrected by Reinhard Zumkeller, Oct 21 2011
Offset changed back to 0 by Andrey Zabolotskiy, Dec 26 2022
STATUS
approved