OFFSET
1,1
COMMENTS
If k is in the sequence then all anagrams of k are in the sequence. - David A. Corneth, May 29 2021
Trivially, this sequence has infinite elements. A031974 is an infinite sequence that is found in this sequence - Ryan Bresler, May 30 2021
LINKS
David A. Corneth, Table of n, a(n) for n = 1..10000
EXAMPLE
11 is a term because its digit sum is 2 (prime) and its digit product is 1 (perfect square > 0).
MAPLE
q:= n-> (l-> not 0 in l and isprime(add(i, i=l)) and
issqr(mul(i, i=l)))(convert(n, base, 10)):
select(q, [$0..999])[]; # Alois P. Heinz, May 29 2021
PROG
(Python)
from math import prod
from sympy import isprime, integer_nthroot
def ok(n):
d = list(map(int, str(n)))
return 0 not in d and isprime(sum(d)) and integer_nthroot(prod(d), 2)[1]
print(list(filter(ok, range(1000)))) # Michael S. Branicky, May 29 2021
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Ryan Bresler, May 29 2021
STATUS
approved