login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

a(n) = 2^(A091090(n)) - 1.
2

%I #19 Dec 18 2019 21:52:07

%S 1,1,3,1,3,1,7,1,3,1,7,1,3,1,15,1,3,1,7,1,3,1,15,1,3,1,7,1,3,1,31,1,3,

%T 1,7,1,3,1,15,1,3,1,7,1,3,1,31,1,3,1,7,1,3,1,15,1,3,1,7,1,3,1,63,1,3,

%U 1,7,1,3,1,15,1,3,1,7,1,3,1,31,1,3,1,7,1,3,1,15,1,3,1,7,1,3,1,63,1,3,1,7,1

%N a(n) = 2^(A091090(n)) - 1.

%H Antti Karttunen, <a href="/A135521/b135521.txt">Table of n, a(n) for n = 1..65537</a>

%F G.f. A(x) satisfies: A(x) = x/(1 - x) + 2*x*A(x^2). - _Ilya Gutkovskiy_, Dec 18 2019

%e From _Omar E. Pol_, Mar 11 2011: (Start)

%e Can be written as a triangle with 2^k entries on each row:

%e 1,

%e 1,3,

%e 1,3,1,7,

%e 1,3,1,7,1,3,1,15,

%e 1,3,1,7,1,3,1,15,1,3,1,7,1,3,1,31,

%e 1,3,1,7,1,3,1,15,1,3,1,7,1,3,1,31,1,3,1,7,1,3,1,15,1,3, 1,7,1,3,1,63,

%e Last term of rows are 2^(k+1) - 1. It appears that the row sums give A001787.

%e (End)

%p GS(2,6,200); [see A135416].

%p # Input n is the number of rows.

%p A135521_list := proc(n) local i,k,NimSum;

%p NimSum := proc(a,b) option remember; local i;

%p zip((x,y)->`if`(x<>y,1,0),convert(a,base,2),convert(b,base,2),0);

%p add(`if`(%[i]=1,2^(i-1),0),i=1..nops(%)) end:

%p seq(seq(NimSum(i,i+1),i=0..2^k-1),k=0..n) end:

%p A135521_list(5); # _Peter Luschny_, May 31 2011

%t Flatten[Table[BitXor[i, i + 1], {k, 0, 10}, {i, 0, -1 + 2^k}]] (* _Peter Luschny_, May 31 2011 *)

%o (PARI)

%o A091090(n) = { my(m=valuation(n+1, 2)); if(n>>m, m+1, max(m, 1)); }; \\ From A091090

%o A135521(n) = ((2^A091090(n))-1); \\ _Antti Karttunen_, Sep 27 2018

%Y Cf. A135416, A091090.

%Y This is Guy Steele's sequence GS(2, 6) (see A135416).

%Y Cf. A000225, A001787. - _Omar E. Pol_, Mar 11 2011

%K nonn,tabf

%O 1,3

%A _N. J. A. Sloane_, based on a message from Guy Steele and _Don Knuth_, Mar 01 2008