OFFSET
1,2
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..369
FORMULA
EXAMPLE
The binary representations of the first few terms are 1, 1010, 111111, 100100100100, 101101101101101.
MAPLE
A070939 := proc(n) max(1, ilog2(n)+1) ; end: A162473 := proc(n) local bid, a062383; bid := A070939(n) ; a062383 := 2^bid ; n*(a062383^n-1)/(a062383-1) ; end: seq(A162473(n), n=1..30) ; # R. J. Mathar, Jul 06 2009
# second Maple program:
a:= n-> Bits[Join](map(x-> x[], [Bits[Split](n)$n])):
seq(a(n), n=1..30); # Alois P. Heinz, Oct 26 2020
MATHEMATICA
Table[FromDigits[Flatten[Table[IntegerDigits[n, 2], {n}]], 2], {n, 20}] (* Harvey P. Dale, Jun 15 2021 *)
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Leroy Quet, Jul 04 2009
EXTENSIONS
More terms from R. J. Mathar, Jul 06 2009
STATUS
approved