cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A008468 a(n) = n OR n^3 (applied to binary expansions).

This page as a plain text file.
%I A008468 #27 Sep 08 2022 08:44:35
%S A008468 1,10,27,68,125,222,343,520,729,1002,1339,1740,2205,2750,3375,4112,
%T A008468 4913,5850,6875,8020,9277,10654,12183,13848,15641,17594,19707,21980,
%U A008468 24413,27006,29791,32800,35937,39338,42875,46692,50685,54910,59319,64040
%N A008468 a(n) = n OR n^3 (applied to binary expansions).
%H A008468 Alois P. Heinz, <a href="/A008468/b008468.txt">Table of n, a(n) for n = 1..10000</a>
%p A008468 a:= n-> Bits[Or](n, n^3):
%p A008468 seq(a(n), n=1..100);  # _Alois P. Heinz_, Mar 29 2018
%t A008468 (* program should not be used to extend this sequence *)
%t A008468 d=16; Mb=Array[ 2^(d-#)&, d ]; Map[ Plus@@(Mb*#)&, Array[ IntegerDigits[ #, 2, d ]+IntegerDigits[ #^3, 2, d ]&, 40 ]/. (2->1) ]
%t A008468 f[n_]:=BitOr[n, n^3]; Array[f, 10000, 1] (* _Vincenzo Librandi_, Mar 30 2018 *)
%o A008468 (PARI) a(n) = bitor(n, n^3); \\ _Michel Marcus_, Mar 30 2018
%o A008468 (Magma) [BitwiseOr(n,n^3): n in [1..40]]; // _Bruno Berselli_, Mar 30 2018
%Y A008468 Cf. A007745, A008467, A008469.
%K A008468 base,nonn,easy
%O A008468 1,2
%A A008468 _Olivier Gérard_