OFFSET
1,2
LINKS
David A. Corneth, Table of n, a(n) for n = 1..10000
MATHEMATICA
fQ[n_] := Block[{d = Times @@ IntegerDigits@ n}, And[d != 0, d^2 == Times @@ IntegerDigits[n^2]]]; Select[Range@ 120000, fQ] (* Michael De Vlieger, Apr 22 2015 *)
PROG
(Python)
def product_digits(n):
results = 1
while n > 0:
remainder = n % 10
results *= remainder
n = (n-remainder)/10
return results
L = []
for a in range(1, 100000):
if product_digits(a*a) == (product_digits(a))*(product_digits(a)) and (product_digits(a) > 0):
L.append(a)
print(L)
(Sage)
[x for x in [1..50000] if (0 not in x.digits()) and prod(x.digits())^2==prod((x^2).digits())] # Tom Edgar, Apr 03 2015
CROSSREFS
KEYWORD
nonn,easy,base
AUTHOR
Reiner Moewald, Mar 15 2015
STATUS
approved