The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A182251 a(0) = 0, a(n) = (a(n-1) OR n) * n. 2
0, 1, 6, 21, 84, 425, 2586, 18137, 145096, 1305873, 13058830, 143647141, 1723765788, 22408955257, 313725373682, 4705880605425, 75294089686800, 1279999524675617, 23039991444161430, 437759837439067189, 8755196748781343780, 183859131724408219737, 4044900897936980834346 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
LINKS
FORMULA
a(0) = 0, a(n) = (a(n-1) OR n) * n, where OR is the bitwise logical inclusive-OR operator.
MATHEMATICA
a[0]=0; a[n_]:=n BitOr[a[n-1], n]; Array[a, 23, 0] (* Stefano Spezia, Apr 15 2022 *)
nxt[{n_, a_}]:={n+1, BitOr[a, n+1](n+1)}; NestList[nxt, {0, 0}, 30][[All, 2]] (* Harvey P. Dale, Feb 08 2023 *)
PROG
(Python)
a=0
for i in range(1, 51):
print(a)
a |= i
a *= i
(PARI) a(n) = if (n==0, 0, n*bitor(a(n-1), n)); \\ Michel Marcus, Apr 16 2022
CROSSREFS
Cf. A080098.
Sequence in context: A199115 A320649 A219596 * A191597 A088556 A316105
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 May 20 14:08 EDT 2024. Contains 372717 sequences. (Running on oeis4.)