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)))
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Daniel Blam, Nov 19 2021
STATUS
approved