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.

A281223 The decimal representation of the Elias omega code for n (A281193(n)).

This page as a plain text file.
%I A281223 #13 May 22 2025 10:21:45
%S A281223 0,4,6,40,42,44,46,112,114,116,118,120,122,124,126,1312,1314,1316,
%T A281223 1318,1320,1322,1324,1326,1328,1330,1332,1334,1336,1338,1340,1342,
%U A281223 2752,2754,2756,2758,2760,2762,2764,2766,2768,2770,2772,2774,2776,2778,2780,2782,2784,2786,2788,2790
%N A281223 The decimal representation of the Elias omega code for n (A281193(n)).
%H A281223 Indranil Ghosh, <a href="/A281223/b281223.txt">Table of n, a(n) for n = 1..10000</a>
%H A281223 Khalid Sayood (Editor), <a href="https://books.google.co.in/books?id=LjQiGwyabVwC&amp;pg=PA60&amp;lpg=PA60&amp;dq=bl&amp;ots=DEU6sh5UC9&amp;sig=GJcMAaVWdAH1pQ4LYNyZVaMUlRM&amp;hl=en&amp;sa=X&amp;ved=0ahUKEwjzq7ulvcfRAhVJRo8KHbNUC1QQ6AEIITAB#v=onepage&amp;q=Even%20Rodeh&amp;f=false">Lossless Compression Handbook</a>, Chapter 3 - Universal Codes, p. 59, section 3.6.
%H A281223 Wikipedia, <a href="https://en.wikipedia.org/wiki/Elias_omega_coding">Elias omega coding</a>
%e A281223 For n = 6, the Elias omega code for 6 is '101100' which is 44 in decimal. So, a(6) = 44.
%o A281223 (Python)
%o A281223 def E(n):
%o A281223     s=""
%o A281223     if n==1:
%o A281223         return "0"
%o A281223     else:
%o A281223         b=(bin(n)[2:])
%o A281223         s+=E(len(b)-1)+b
%o A281223     return s
%o A281223 def elias_omega(n):
%o A281223     return int(E(n)[1:]+"0",2)
%Y A281223 Cf. A281193, A171885 (Decimal representation of the Elias gamma code for n).
%K A281223 nonn,base
%O A281223 1,2
%A A281223 _Indranil Ghosh_, Jan 18 2017