login
A344825
Integers whose digit sum is prime and whose digit product is a perfect square > 0.
2
11, 14, 41, 49, 94, 111, 119, 122, 128, 133, 155, 166, 182, 188, 191, 199, 212, 218, 221, 229, 236, 263, 281, 289, 292, 298, 313, 326, 331, 362, 368, 386, 449, 494, 515, 551, 559, 595, 616, 623, 632, 638, 661, 683, 779, 797, 812, 818, 821, 829, 836, 863, 881
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
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
Intersection of A028834 and A050626.
Subsequence of A052382.
A031974 is a subsequence of this sequence.
Sequence in context: A326916 A305010 A195818 * A371072 A371073 A344842
KEYWORD
nonn,base
AUTHOR
Ryan Bresler, May 29 2021
STATUS
approved