OFFSET
1,3
COMMENTS
2^k is always a term in this sequence.
It appears that all solutions are either a power of 2 or approximately sqrt(2) * a power of 2. - Andrew Howroyd, Dec 24 2019
LINKS
Andrew Howroyd, Table of n, a(n) for n = 1..1000
EXAMPLE
23 is a term of this sequence because its cube written in base 2 (10111110000111) starts with its representation in base 2 (10111).
MATHEMATICA
SetBeginSet[set1_, set2_] :=
Do[For[i = 1, i <= Length[set1], i++, If[! set1[[i]] == set2[[i]], Return[False]]]; Return[True], {1}];
For[k = 0; set = {}, k <= 100000, k++, If[SetBeginSet[IntegerDigits[k, 2], IntegerDigits[k^3, 2]], Print[k]]]
PROG
(PARI) ok(n)={my(t=n^3); t == 0 || t>>(logint(t, 2)-logint(n, 2))==n} \\ Andrew Howroyd, Dec 23 2019
(PARI) \\ for larger values
viable(b, k)={my(p=b^3, q=(b+2^k-1)^3, s=logint(q, 2), t=s-logint(b, 2)+k); (p>>s)==0 || ((p>>t)<=(b>>k) && (b>>k)<=(q>>t))}
upto(n)={
local(L=List([0]));
my(recurse(b, k)=; if(b <= n && viable(b, k), k--; if(k<0, listput(L, b), self()(b, k); self()(b+2^k, k))));
for(k=0, logint(n, 2), recurse(2^k, k));
Vec(L);
} \\ Andrew Howroyd, Dec 24 2019
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Dhilan Lahoti, Aug 30 2015
EXTENSIONS
Terms a(31) and beyond from Andrew Howroyd, Dec 23 2019
STATUS
approved