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!)
A182508 a(0)=0, a(1)=1, a(n) = (a(n-2)+a(n-1)+n) AND n. 0
0, 1, 2, 2, 0, 5, 2, 6, 0, 9, 2, 2, 0, 13, 10, 6, 0, 17, 2, 2, 16, 5, 2, 22, 16, 25, 2, 18, 16, 29, 10, 6, 32, 1, 2, 34, 0, 5, 34, 6, 0, 41, 2, 2, 32, 13, 10, 6, 0, 49, 34, 2, 16, 5, 2, 54, 48, 25, 2, 18, 16, 29, 42, 6, 64, 1, 2, 66, 0, 5, 66, 6 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
COMMENTS
Terms with indices 4*k+1 are odd, all other terms are even.
Conjecture: sequence contains infinitely many zeros and ones, but no terms of the form 2^k-1, k>1.
LINKS
FORMULA
a(0)=0, a(1)=1, a(n) = (a(n-2)+a(n-1)+n) AND n, where AND is the bitwise AND operator.
MATHEMATICA
nxt[{n_, a_, b_}]:={n+1, b, BitAnd[a+b+n+1, n+1]}; NestList[nxt, {1, 0, 1}, 80][[All, 2]] (* Harvey P. Dale, Nov 19 2021 *)
PROG
(Python)
prpr = 0
prev = 1
for n in range(2, 99):
current = (prpr + prev + n) & n
print prpr,
prpr = prev
prev = current
CROSSREFS
Sequence in context: A291483 A181295 A166299 * A213626 A329687 A356035
KEYWORD
nonn,base,easy
AUTHOR
Alex Ratushnyak, May 03 2012
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 25 16:45 EDT 2024. Contains 371989 sequences. (Running on oeis4.)