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.

A330272 a(n) is the least nonnegative integer k such that n OR k is a cube (where OR denotes the bitwise OR operator).

This page as a plain text file.
%I A330272 #14 Feb 20 2024 04:20:06
%S A330272 0,0,25,24,121,120,337,336,0,18,17,16,113,112,3361,3360,11,10,9,8,105,
%T A330272 104,321,320,3,2,1,0,97,96,29761,29760,93,92,1297,1296,89,88,3337,
%U A330272 3336,85,84,3333,3332,81,80,3329,3328,77,76,1281,1280,73,72,59265,59264
%N A330272 a(n) is the least nonnegative integer k such that n OR k is a cube (where OR denotes the bitwise OR operator).
%C A330272 The sequence is well defined:
%C A330272 - for any k >= 0, the binary expansion of m = A000225(k)^3 has k trailing 1's,
%C A330272 - hence for any n < 2^k, n OR m = m, which is a cube, QED.
%H A330272 Rémy Sigrist, <a href="/A330272/b330272.txt">Table of n, a(n) for n = 0..8192</a>
%H A330272 Rémy Sigrist, <a href="/A330272/a330272.gp.txt">PARI program for A330272</a>
%H A330272 Rémy Sigrist, <a href="/A330272/a330272.png">Scatterplot of (x, y) such that x OR y is a cube, 0 <= x, y <= 1023</a>
%F A330272 a(n) = 0 iff n is a cube.
%F A330272 a(n) AND n = 0 (where AND denotes the bitwise AND operator).
%t A330272 A330272[n_] := Module[{k = -1}, While[!IntegerQ[CubeRoot[BitOr[n, ++k]]]]; k];
%t A330272 Array[A330272, 60, 0] (* _Paolo Xausa_, Feb 20 2024 *)
%o A330272 (PARI) See Links section.
%Y A330272 See A330271 for the XOR variant.
%Y A330272 Cf. A000225, A000578, A003986.
%K A330272 nonn,base
%O A330272 0,3
%A A330272 _Rémy Sigrist_, Dec 08 2019