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.

A227190 a(n) = n minus (product of run lengths in binary representation of n).

This page as a plain text file.
%I A227190 #18 Jun 03 2025 11:27:59
%S A227190 0,1,1,2,4,4,4,5,7,9,9,8,11,11,11,12,14,16,15,18,20,20,20,18,21,24,23,
%T A227190 22,26,26,26,27,29,31,29,32,35,34,33,37,39,41,41,40,43,43,43,40,43,46,
%U A227190 43,48,51,50,49,47,51,55,53,52,57,57,57,58,60,62,59,62
%N A227190 a(n) = n minus (product of run lengths in binary representation of n).
%H A227190 Antti Karttunen, <a href="/A227190/b227190.txt">Table of n, a(n) for n = 1..4096</a>
%F A227190 a(n) = n - A167489(n).
%e A227190 For 8, "1000" in binary, the run lengths are 1 and 3, 1*3=3, and 8-3 = 5, thus a(8)=5. For 24, "11000" in binary, the run lengths are 2 and 3, 2*3=6, and 24-6 = 18, thus a(24)=18.
%t A227190 Table[n-Times@@(Length/@Split[IntegerDigits[n,2]]),{n,70}] (* _Harvey P. Dale_, Aug 02 2013 *)
%o A227190 (Scheme) (define (A227190 n) (- n (A167489 n))) ;; The Scheme-program for A167489 is found under that entry.
%o A227190 (Haskell)
%o A227190 a227190 n = n - a167489 n  -- _Reinhard Zumkeller_, Jul 05 2013
%Y A227190 Cf. A227191, A000975, A084639.
%K A227190 nonn,base
%O A227190 1,4
%A A227190 _Antti Karttunen_, Jul 04 2013