A085586 n, n^2 and n^3 all use only even digits.
0, 2, 20, 200, 202, 2000, 2002, 2020, 20000, 20002, 20020, 20200, 200000, 200002, 200020, 200200, 202000, 2000000, 2000002, 2000020, 2000200, 2002000, 2020000, 20000000, 20000002, 20000020, 20000200, 20000202, 20002000, 20002002, 20020000
Offset: 1
Examples
202 is a term because 202, 202^2=4008004 and 202^3=8024024008 all use only even digits.
Crossrefs
Cf. A068690.
Programs
-
PARI
evdigs(n) = {if (n==0, return (1)); digs = digits(n); for (i = 1, #digs, if (digs[i] % 2, return (0));); return (1);} isok(n) = evdigs(n) && evdigs(n^2) && evdigs(n^3); \\ Michel Marcus, Oct 04 2013
Extensions
More terms from Michel Marcus and Jon E. Schoenfield, Oct 04 2013
Comments