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.

A092754 a(1)=1, a(2n)=2a(n)+1, a(2n+1)=2a(n)+2.

This page as a plain text file.
%I A092754 #26 Jun 19 2021 12:40:42
%S A092754 1,3,4,7,8,9,10,15,16,17,18,19,20,21,22,31,32,33,34,35,36,37,38,39,40,
%T A092754 41,42,43,44,45,46,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,
%U A092754 80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,127,128,129,130,131,132
%N A092754 a(1)=1, a(2n)=2a(n)+1, a(2n+1)=2a(n)+2.
%C A092754 More generally the sequence b(1)=1, b(2n)=2b(n)+x, b(2n+1)=2b(n)+y is given by the formula b(n)=A053644(n)+x*(n-A053644(n))+y*(A053644(n)-1).
%H A092754 Reinhard Zumkeller, <a href="/A092754/b092754.txt">Table of n, a(n) for n = 1..10000</a>
%F A092754 a(n) = 2^floor(log(n)/log(2)) + n - 1.
%F A092754 a(n) = A004754(n) - 1. - _Rémy Sigrist_, May 05 2019
%o A092754 (PARI) a(n)=if(n<2,1,if(n%2,a(n-1)+1,a(n/2)*2+1))
%o A092754 (PARI) a(n) = n + 1<<logint(n,2) - 1; \\ _Kevin Ryde_, Jun 19 2021
%o A092754 (Haskell)
%o A092754 a092754 n = if n < 2 then n else 2 * a092754 n' + m + 1
%o A092754             where (n',m) = divMod n 2
%o A092754 a092754_list = map a092754 [1..]
%o A092754 -- _Reinhard Zumkeller_, May 07 2012
%Y A092754 Cf. A053644 (x=y=0), A054429(x=-1, y=+1), A062050(x=+1, y=-1).
%Y A092754 Cf. A206332 (complement).
%Y A092754 Cf. A004754.
%K A092754 easy,nonn
%O A092754 1,2
%A A092754 _Benoit Cloitre_, Apr 13 2004