login
A008468
a(n) = n OR n^3 (applied to binary expansions).
3
1, 10, 27, 68, 125, 222, 343, 520, 729, 1002, 1339, 1740, 2205, 2750, 3375, 4112, 4913, 5850, 6875, 8020, 9277, 10654, 12183, 13848, 15641, 17594, 19707, 21980, 24413, 27006, 29791, 32800, 35937, 39338, 42875, 46692, 50685, 54910, 59319, 64040
OFFSET
1,2
LINKS
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
STATUS
approved