OFFSET
1,2
LINKS
FORMULA
EXAMPLE
a(4) = (4 3 2 1) -> (100 11 10 1) -> 10011101 -> 157.
MATHEMATICA
Table[FromDigits[Flatten[IntegerDigits[#, 2]&/@Reverse[Range[n]]], 2], {n, 20}] (* Harvey P. Dale, Sep 10 2019 *)
PROG
(Python)
def A098780(n):
....s=""
....for i in range(n, 0, -1):
........s+=bin(i)[2:]
....return int(s, 2) # Indranil Ghosh, Jan 28 2017
(Python)
from functools import reduce
def A098780(n): return reduce(lambda i, j:(i<<j.bit_length())+j, range(n, 0, -1)) # Chai Wah Wu, Feb 26 2023
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Reinhard Zumkeller, Oct 04 2004
EXTENSIONS
Typo in data corrected by D. S. McNeil, Aug 20 2010
STATUS
approved