|
|
A020330
|
|
Numbers whose base-2 representation is the juxtaposition of two identical strings.
|
|
38
|
|
|
3, 10, 15, 36, 45, 54, 63, 136, 153, 170, 187, 204, 221, 238, 255, 528, 561, 594, 627, 660, 693, 726, 759, 792, 825, 858, 891, 924, 957, 990, 1023, 2080, 2145, 2210, 2275, 2340, 2405, 2470, 2535, 2600, 2665, 2730, 2795, 2860, 2925, 2990, 3055, 3120, 3185, 3250
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
|
|
LINKS
|
|
|
FORMULA
|
a(n) = n + 2*n*2^floor(log_2(n)). - Ralf Stephan, Dec 07 2004
|
|
EXAMPLE
|
36 is a term because 36 = 100100_2, which is 100 followed by 100.
|
|
MATHEMATICA
|
Table[n + 2 n 2^Floor[Log[2, n]], {n, 50}] (* T. D. Noe, Dec 10 2013 *)
|
|
PROG
|
(Haskell)
a020330 n = foldr (\d v -> 2 * v + d) 0 (bs ++ bs) where
bs = a030308_row n
(Python)
def a(n): return int(bin(n)[2:]*2, 2)
(Python)
|
|
CROSSREFS
|
|
|
KEYWORD
|
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|