login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A353342 Numbers k such that k and k^3 use only even digits. 0
0, 2, 4, 20, 40, 200, 202, 400, 2000, 2002, 2020, 4000, 20000, 20002, 20020, 20200, 40000, 200000, 200002, 200020, 200200, 202000, 400000, 2000000, 2000002, 2000020, 2000200, 2002000, 2020000, 4000000, 20000000, 20000002, 20000020, 20000200, 20000202, 20002000, 20002002, 20020000, 20200000 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
Numbers k such that k^3 has only even digits are in A052004.
LINKS
MATHEMATICA
seq[ndigmax_] := Module[{nums = Tuples[{0, 2, 4, 6, 8}, ndigmax]}, Select[FromDigits /@ nums, AllTrue[IntegerDigits[#^3], EvenQ] &]]; seq[8] (* Amiram Eldar, May 06 2022 *)
PROG
(Python)
from itertools import count, islice, product
def agen(): # generator of terms
for digits in count(1):
for p in product("02468", repeat=digits):
if len(p) > 1 and p[0] == "0": continue
k = int("".join(p))
if set(str(k**3)) <= set("02468"):
yield k
print(list(islice(agen(), 40))) # Michael S. Branicky, May 06 2022
CROSSREFS
Cf. A085597 (similar, but with odd digits).
Intersection of A014263 and A052004.
Sequence in context: A294230 A332626 A052004 * A027741 A137697 A192380
KEYWORD
nonn,base
AUTHOR
Bernard Schott, May 06 2022
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 14 10:34 EDT 2024. Contains 375921 sequences. (Running on oeis4.)