|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,3
|
|
COMMENTS
|
This sequence is infinite, because if m > 0 is a term, 1000*m will also be a term.
|
|
LINKS
|
|
|
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
|
|
|
STATUS
|
approved
|
|
|
|