|
|
A256115
|
|
Zeroless numbers n whose digit product squared is equal to the digit product of n^2.
|
|
3
|
|
|
1, 2, 3, 661, 983, 2631, 2893, 9254, 9628, 9642, 11892, 12385, 12893, 13836, 14642, 14661, 16472, 18615, 27519, 29474, 35383, 36213, 36914, 38691, 43386, 46215, 49231, 49342, 56176, 72576, 75384, 76256, 83631, 87291, 92843, 94482, 99146, 99482, 99842, 113865
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
LINKS
|
|
|
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
|
|
|
STATUS
|
approved
|
|
|
|