|
|
A352598
|
|
a(n) is the product of the squares of the nonzero digits of n.
|
|
2
|
|
|
1, 4, 9, 16, 25, 36, 49, 64, 81, 1, 1, 4, 9, 16, 25, 36, 49, 64, 81, 4, 4, 16, 36, 64, 100, 144, 196, 256, 324, 9, 9, 36, 81, 144, 225, 324, 441, 576, 729, 16, 16, 64, 144, 256, 400, 576, 784, 1024, 1296, 25, 25, 100, 225, 400, 625, 900, 1225, 1600, 2025, 36, 36, 144, 324
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
|
|
LINKS
|
|
|
FORMULA
|
|
|
MATHEMATICA
|
a[n_] := (Times @@ Select[IntegerDigits[n], # > 1 &])^2; Array[a, 65] (* Amiram Eldar, Mar 22 2022 *)
|
|
PROG
|
(PARI) a(n) = vecprod(apply(x->x^2, select(x->(x>1), digits(n))));
(Python)
from math import prod
def a(n): return prod(int(d)**2 for d in str(n) if d != '0')
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|