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.

A087275 Write n in binary: 1ab..yz, then a(n) = 1b..yz + ... + 1yz + 1z + 1.

This page as a plain text file.
%I A087275 #9 Jun 27 2021 07:53:32
%S A087275 0,1,1,3,4,3,4,7,9,9,11,7,9,9,11,15,18,19,22,19,22,23,26,15,18,19,22,
%T A087275 19,22,23,26,31,35,37,41,39,43,45,49,39,43,45,49,47,51,53,57,31,35,37,
%U A087275 41,39,43,45,49,39,43,45,49,47,51,53,57,63,68,71,76
%N A087275 Write n in binary: 1ab..yz, then a(n) = 1b..yz + ... + 1yz + 1z + 1.
%C A087275 a(n) = A087276(n) - n.
%F A087275 a(1) = 0, a(2n) = 2*a(n) + 1, a(2n+1) = 2*a(n) + floor(log_2(n)) + 1.
%o A087275 (PARI) a(n)=local(v, s, l); v=binary(n); l=length(v); s=0; for(k=2, l, s=s+2^(l-k)+sum(m=k+1, l, v[m]*2^(l-m))); s
%Y A087275 Cf. A005187, A059893, A059894.
%K A087275 nonn,easy
%O A087275 1,4
%A A087275 _Ralf Stephan_, Aug 27 2003