A330125 Positive integers whose digit-power sum is a prime.
2, 3, 5, 7, 11, 12, 14, 16, 21, 23, 25, 27, 32, 38, 41, 45, 49, 52, 54, 56, 58, 61, 65, 72, 78, 83, 85, 87, 94, 101, 110, 111, 113, 115, 122, 124, 128, 131, 139, 142, 146, 148, 151, 155, 164, 166, 182, 184, 193, 199, 212, 214, 218, 221, 223, 227, 232, 236, 238, 241
Offset: 1
Examples
The first four terms are the single-digit primes; a(5) = 11 since 1^2 + 1^2 = 2, which is prime.
Links
- Robert Israel, Table of n, a(n) for n = 1..10000
- Math Misery, Of Probes and Primes
Programs
-
Maple
filter:= proc(n) local L,d,t; L:= convert(n,base,10); d:= nops(L); isprime(add(t^d, t=L)) end proc: select(filter, [$1..1000]); # Robert Israel, Oct 17 2023
-
Mathematica
Select[Range[250], (d = IntegerDigits[#]; PrimeQ@ Total[d^Length[d]]) &] (* Giovanni Resta, Dec 02 2019 *)
-
PARI
isok(n) = {my(d = digits(n)); isprime(sum(k=1, #d, d[k]^#d));} \\ Michel Marcus, Dec 05 2019
Extensions
More terms from Giovanni Resta, Dec 02 2019
Comments