OFFSET
1,2
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..10000
MAPLE
a:= n-> Bits[Or](n, n^3):
seq(a(n), n=1..100); # Alois P. Heinz, Mar 29 2018
MATHEMATICA
(* program should not be used to extend this sequence *)
d=16; Mb=Array[ 2^(d-#)&, d ]; Map[ Plus@@(Mb*#)&, Array[ IntegerDigits[ #, 2, d ]+IntegerDigits[ #^3, 2, d ]&, 40 ]/. (2->1) ]
f[n_]:=BitOr[n, n^3]; Array[f, 10000, 1] (* Vincenzo Librandi, Mar 30 2018 *)
PROG
(PARI) a(n) = bitor(n, n^3); \\ Michel Marcus, Mar 30 2018
(Magma) [BitwiseOr(n, n^3): n in [1..40]]; // Bruno Berselli, Mar 30 2018
CROSSREFS
KEYWORD
base,nonn,easy
AUTHOR
STATUS
approved