A344825 Integers whose digit sum is prime and whose digit product is a perfect square > 0.
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
Examples
11 is a term because its digit sum is 2 (prime) and its digit product is 1 (perfect square > 0).
Links
- David A. Corneth, Table of n, a(n) for n = 1..10000
Crossrefs
Programs
-
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
-
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
Comments