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!)
A182247 a(0)=0, a(n) = (a(n-1) + n) OR n. 2
0, 1, 3, 7, 15, 21, 31, 39, 47, 57, 75, 95, 111, 125, 143, 159, 191, 209, 243, 279, 319, 341, 383, 407, 447, 473, 507, 543, 575, 605, 639, 671, 703, 737, 803, 871, 943, 1013, 1087, 1127, 1199, 1273, 1323, 1407, 1455, 1533 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
LINKS
FORMULA
a(0)=0, a(n)=(a(n-1)+n) OR n, where OR is the bitwise logical inclusive-OR operator.
MATHEMATICA
nxt[{n_, a_}]:={n+1, BitOr[a+n+1, n+1]}; NestList[nxt, {0, 0}, 50][[All, 2]] (* Harvey P. Dale, Aug 16 2021 *)
PROG
(Python)
a=0
for i in range(1, 51):
print(a, end=', ')
a += i
a |= i
CROSSREFS
Sequence in context: A080550 A348943 A043725 * A121712 A175544 A139208
KEYWORD
base,nonn
AUTHOR
Alex Ratushnyak, Apr 20 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 23 08:33 EDT 2024. Contains 371905 sequences. (Running on oeis4.)