OFFSET
1,2
COMMENTS
From Marius A. Burtea, Nov 18 2021: (Start)
The sequence is infinite because if m > 0 is a term, then 100*m is also a term.
Also, the squares of the numbers 20602, 2006002, 200060002, ..., (2*10^(2*k) + 6*10^k + 2), k >= 2, are 424442404, 4024044024004, 40024004400240004, 400024000440002400004, ... and have only the digits 0, 2 and 4 and are not divisible by 100. (End)
MATHEMATICA
Select[Range[0, 10^7, 2]^2, AllTrue[IntegerDigits[#], MemberQ[{0, 2, 4}, #1] &] &] (* Amiram Eldar, Nov 18 2021 *)
PROG
(C#)
for(ulong num = 0; num < 10000000; num++)
{
ulong sq = num * num;
string sq1 = sq + "";
bool p = true;
string un = "1356789";
for(int a = 0; a < un.Length; a++)
{
if(sq1.Contains(un[a]))
{
p = false;
}
}
if(p)
{
Console.Write(sq1 + ", ");
}
}
Console.WriteLine("done");
(Magma) [n : n in [s*s:s in [1..1500000]]|Set(Intseq(n)) subset {0, 2, 4}]; // Marius A. Burtea, Nov 18 2021
(Python)
from itertools import islice, count
def A349460(): return filter(lambda n: set(str(n)) <= {'0', '2', '4'}, (n*n for n in count(0)))
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Daniel Blam, Nov 18 2021
STATUS
approved