login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A135481 a(n) = 2^A007814(n+1) - 1. 11
0, 1, 0, 3, 0, 1, 0, 7, 0, 1, 0, 3, 0, 1, 0, 15, 0, 1, 0, 3, 0, 1, 0, 7, 0, 1, 0, 3, 0, 1, 0, 31, 0, 1, 0, 3, 0, 1, 0, 7, 0, 1, 0, 3, 0, 1, 0, 15, 0, 1, 0, 3, 0, 1, 0, 7, 0, 1, 0, 3, 0, 1, 0, 63, 0, 1, 0, 3, 0, 1, 0, 7, 0, 1, 0, 3, 0, 1, 0, 15, 0, 1, 0, 3, 0, 1, 0, 7, 0, 1, 0, 3, 0, 1, 0, 31, 0, 1, 0, 3, 0, 1, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,4
COMMENTS
This is Guy Steele's sequence GS(1, 6) (see A135416).
LINKS
FORMULA
a(n) = A006519(n+1) - 1. - R. J. Mathar, Feb 10 2016
MAPLE
GS(1, 6, 200); # see A135416
MATHEMATICA
Table[BitAnd[i, BitNot[i+1]], {i, 0, 200}] (* Peter Luschny, Jun 01 2011 *)
PROG
(PARI) a(n) = 2^valuation(n+1, 2)-1; \\ Michel Marcus, Nov 19 2017
(PARI) a(n) = bitand(bitneg(n+1), n); \\ Ruud H.G. van Tol, Apr 05 2023
(Julia)
using IntegerSequences
A135481List(len) = [Bits("CNIMP", n+1, n) for n in 0:len]
println(A135481List(100)) # Peter Luschny, Sep 25 2021
(Python)
def A135481(n): return ~(n+1)&n # Chai Wah Wu, Jul 06 2022
CROSSREFS
Cf. A006519, A007814, A135416, A140670, A136013 (partial sums).
Sequence in context: A242451 A363978 A262964 * A180049 A244454 A238123
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, based on a message from Guy Steele and Don Knuth, Mar 01 2008
EXTENSIONS
a(0) = 0 prepended by Andrey Zabolotskiy, Oct 08 2019, based on Lothar Esser's contribution
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 30 03:55 EDT 2024. Contains 372118 sequences. (Running on oeis4.)