login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A342975
Cubes composed of digits {0, 1, 3}.
1
0, 1, 1000, 1331, 1000000, 1030301, 1331000, 1000000000, 1003003001, 1030301000, 1331000000, 1000000000000, 1000300030001, 1003003001000, 1030301000000, 1331000000000, 1000000000000000, 1000030000300001, 1000300030001000, 1003003001000000, 1030301000000000, 1331000000000000
OFFSET
1,3
COMMENTS
This sequence is infinite, because if m > 0 is a term, 1000*m will also be a term.
MATHEMATICA
Select[Range[0, 110000]^3, AllTrue[IntegerDigits[#], MemberQ[{0, 1, 3}, #1] &] &] (* Amiram Eldar, Nov 19 2021 *)
PROG
(C#) public static void Main()
{
for(ulong num = 0; num < 2000000; num++)
{
ulong sq = num * num * num;
string sq1 = sq + "";
bool p = true;
string un = "2456789";
for(int a = 0; a < un.Length; a++)
{
if(sq1.Contains(un[a])) p = false;
}
if(p)
{
Console.Write(sq1 + ", ");
}
}
Console.WriteLine("done");
}
(Python)
from itertools import islice, count
def A342975(): return filter(lambda n: set(str(n)) <= {'0', '1', '3'}, (n**3 for n in count(0)))
A342975_list = list(islice(A342975(), 20)) # Chai Wah Wu, Nov 19 2021
CROSSREFS
Subsequence of A000578 and A043681.
Sequence in context: A100975 A105276 A145517 * A027662 A004265 A004266
KEYWORD
nonn,base
AUTHOR
Daniel Blam, Nov 19 2021
STATUS
approved