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!)
A182202 Fibonacci-type sequence based on bitwise inclusive-or: a(0) = 0, a(1) = 1 and a(n) = a(n-1) + (a(n-1) or a(n-2)). 0
0, 1, 2, 5, 12, 25, 54, 117, 236, 489, 982, 2005, 4012, 8105, 16214, 32597, 65196, 130729, 261462, 523605, 1047212, 2095785, 4191574, 8385877, 16771756, 33548969, 67097942, 134206805, 268413612, 536849065, 1073698134, 2147439957, 4294879916, 8589847209 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
LINKS
FORMULA
From Chai Wah Wu, Oct 12 2023: (Start)
a(n) = a(n-1) + 3*a(n-2) - a(n-3) - 2*a(n-5) - 4*a(n-6) for n > 7.
G.f.: x*(8*x^6 + 2*x^3 + x + 1)/(4*x^6 + 2*x^5 + x^3 - 3*x^2 - x + 1). (End)
EXAMPLE
a(2) = 1 + (1 or 0) = 2, a(3) = 2 + (2 or 1) = 5.
MATHEMATICA
t = {0, 1}; Do[AppendTo[t, t[[-1]] + BitOr[t[[-1]], t[[-2]]]], {n, 2, 50}]; t (* T. D. Noe, Apr 18 2012 *)
PROG
(Python)
def A182202_gen(): # generator of terms
a, b = 0, 1
yield a
while True:
yield b
a, b = b, b+(a|b)
A182202_list = list(islice(A182202_gen(), 30)) # Chai Wah Wu, Oct 12 2023
CROSSREFS
Sequence in context: A262667 A122439 A063807 * A116715 A117177 A287141
KEYWORD
nonn,base
AUTHOR
Alex Ratushnyak, Apr 17 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 19 21:09 EDT 2024. Contains 371798 sequences. (Running on oeis4.)