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”).

A135561
a(n) = 2^A135560(n) - 1.
3
3, 7, 1, 15, 1, 3, 1, 31, 1, 3, 1, 7, 1, 3, 1, 63, 1, 3, 1, 7, 1, 3, 1, 15, 1, 3, 1, 7, 1, 3, 1, 127, 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, 255, 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, 1, 3
OFFSET
1,1
LINKS
FORMULA
a(2^k) = 2^(k+2) - 1; a(2^k + 2^(k-1)) = 2^k - 1. - Reinhard Zumkeller, Mar 02 2008
MATHEMATICA
f[n_] := 1 + IntegerExponent[n, 2] + Sum[(-1)^(n - k - 1)*Binomial[n - 1, k]* Sum[Binomial[k, 2^j - 1], {j, 0, k}], {k, 0, n - 1}]; Table[2^f[k] - 1, {k, 1, 20}] (* G. C. Greubel, Oct 17 2016 *)
PROG
(Python)
def A135561(n): return (1<<(m:=(~n & n-1)).bit_length()+int(m==n-1)+1)-1 # Chai Wah Wu, Jul 06 2022
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, Mar 01 2008
EXTENSIONS
More terms from Reinhard Zumkeller, Mar 02 2008
STATUS
approved