cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A098780 First n numbers in binary representation concatenated in reverse order.

This page as a plain text file.
%I A098780 #25 May 22 2025 10:21:35
%S A098780 1,5,29,157,1437,13725,128413,1176989,20051357,355595677,6261175709,
%T A098780 109340390813,1896046785949,32682372363677,560447953696157,
%U A098780 9567647208437149,315812421869630877,10692105963331253661
%N A098780 First n numbers in binary representation concatenated in reverse order.
%H A098780 Indranil Ghosh, <a href="/A098780/b098780.txt">Table of n, a(n) for n = 1..412</a>
%H A098780 <a href="/index/Mo#MWP">Index entries for sequences related to Most Wanted Primes video</a>
%F A098780 a(n) = n*A000079(A070939(a(n-1))) + a(n-1); a(1) = 1.
%F A098780 a(n) = n*2^(1 + floor(log_2(a(n-1)))) + a(n-1); a(1) = 1.
%e A098780 a(4) = (4 3 2 1) -> (100 11 10 1) -> 10011101 -> 157.
%t A098780 Table[FromDigits[Flatten[IntegerDigits[#,2]&/@Reverse[Range[n]]],2],{n,20}] (* _Harvey P. Dale_, Sep 10 2019 *)
%o A098780 (Python)
%o A098780 def A098780(n):
%o A098780     s=""
%o A098780     for i in range(n,0,-1):
%o A098780         s+=bin(i)[2:]
%o A098780     return int(s,2) # _Indranil Ghosh_, Jan 28 2017
%o A098780 (Python)
%o A098780 from functools import reduce
%o A098780 def A098780(n): return reduce(lambda i,j:(i<<j.bit_length())+j,range(n,0,-1)) # _Chai Wah Wu_, Feb 26 2023
%Y A098780 Cf. A007088, A047778.
%K A098780 nonn,base
%O A098780 1,2
%A A098780 _Reinhard Zumkeller_, Oct 04 2004
%E A098780 Typo in data corrected by _D. S. McNeil_, Aug 20 2010