OFFSET
1,2
COMMENTS
a(n) = 1 iff n is a term > 0 of A007088. - Bernard Schott, Mar 24 2022
FORMULA
a(n) = A051801(n)^2.
a(10*n) = a(n). - Bernard Schott, Mar 24 2022
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')
print([a(n) for n in range(1, 64)]) # Michael S. Branicky, Mar 22 2022
(Python)
from math import prod
def A352598(n): return prod(map(lambda x:(0, 1, 4, 9, 16, 25, 36, 49, 64, 81)[int(x)], filter(lambda x:x>'1', str(n)))) # Chai Wah Wu, Sep 17 2024
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Michel Marcus, Mar 22 2022
STATUS
approved