This site is supported by donations to The OEIS Foundation. Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A048700 Binary palindromes of odd length (written in base 10). 5
 1, 5, 7, 17, 21, 27, 31, 65, 73, 85, 93, 99, 107, 119, 127, 257, 273, 297, 313, 325, 341, 365, 381, 387, 403, 427, 443, 455, 471, 495, 511, 1025, 1057, 1105, 1137, 1161, 1193, 1241, 1273, 1285, 1317, 1365, 1397, 1421, 1453, 1501, 1533, 1539, 1571, 1619, 1651 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,2 COMMENTS Note: you get A006995 (all binary palindromes) if you take (after zero) alternatively 2^n (starting from 2^0 = 1) terms from A048700 and as many from A048701 and then each time, twice as many from both. A178225(a(n)) = 1. - Reinhard Zumkeller, Oct 21 2011 Comment from Altug Alkan, Dec 03 2015: (Start) a(6*k) is divisible by 9 for k > 0. a(3*k+(-1)^k-2) is divisible by 3 for k > 1. The minimum value of a(n+1) - a(n) occurs when n = 2. A014551(n) appears in this sequence for n > 0. (End) LINKS Reinhard Zumkeller, Table of n, a(n) for n = 1..10000 FORMULA a(n) = (2^(floor_log_2(n)))*n + sum('(bit_i(n, i)*(2^(floor_log_2(n)-i)))', 'i'=1..floor_log_2(n)); a(A047264(n)) mod 3 = 0, for n > 1. - Altug Alkan, Dec 03 2015 MAPLE bit_i := (x, i) -> `mod`(floor(x/(2^i)), 2); floor_log_2 := proc(n) local nn, i: nn := n; for i from -1 to n do if(0 = nn) then RETURN(i); fi: nn := floor(nn/2); od: end: MATHEMATICA Select[Range@ 1651, # == Reverse@ # && OddQ@ Length@ # &@ IntegerDigits[#, 2] &] (* Michael De Vlieger, Dec 03 2015 *) PROG (PARI) {a(n) = local(f); if( n<1, 0, f = length(binary(n)) - 1; 2^f*n + sum(i=1, f, bittest(n, i) * 2^(f-i)))}; /* Michael Somos, Nov 27 2002 */ (Haskell) import Data.Set (singleton, deleteFindMin, insert) import Data.List (unfoldr) a048700 n = a048700_list !! (n-1) a048700_list = f 1 \$ singleton 1 where    f z s = m : f (z+1) (insert (c 0) (insert (c 1) s')) where      c d = foldl (\v d -> 2 * v + d) 0 \$ (reverse b) ++ [d] ++ b      b = unfoldr          (\x -> if x == 0 then Nothing else Just \$ swap \$ divMod x 2) z      (m, s') = deleteFindMin s -- Reinhard Zumkeller, Oct 21 2011 CROSSREFS Cf. A048701 (binary palindromes of even length), A002113 (decimal palindromes), A006995 (all binary palindromes). Cf. also A178225. Sequence in context: A023517 A128491 A146949 * A164120 A043879 A044966 Adjacent sequences:  A048697 A048698 A048699 * A048701 A048702 A048703 KEYWORD nonn,base AUTHOR Antti Karttunen, Mar 07 1999 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified October 22 22:34 EDT 2019. Contains 328335 sequences. (Running on oeis4.)