login
A263448
Primes that can be expressed as a sum of primes where no digit appears more than once.
1
5, 7, 41, 47, 61, 67, 89, 103, 401, 809
OFFSET
1,1
COMMENTS
This sequence is finite because if n has more than 5 digits then any sum of positive integers adding up to n will have more than 5 digits, forcing some digit to repeat. The last term is a(10) = 809. - Charles R Greathouse IV, Nov 10 2016
EXAMPLE
a(1) = 5 = 2 + 3.
a(2) = 7 = 2 + 5.
a(3) = 41 = 5 + 7 + 29.
a(4) = 47 = 5 + 13 + 29.
a(5) = 61 = 2 + 59.
a(6) = 67 = 5 + 19 + 43.
a(7) = 89 = 5 + 23 + 61.
a(8) = 103 = 2 + 5 + 7 + 89.
a(9) = 401 = 5 + 7 + 389.
a(10) = 809 = 5 + 43 + 761.
PROG
(PARI) has(n, v, start=2)=my(d=digits(n), s=Set(d)); if(#d==#s && isprime(n) && #setintersect(s, v)==#s, return(1)); forprime(p=start, n\2, s=Set(d=digits(p)); if(#s==#d && #setintersect(s, v)==#s && has(n-p, setminus(v, s), p+1), return(1))); 0
is(n)=my(d=digits(n), s=Set(d)); #d==#s && isprime(n) && has(n, setminus([0..9], s)) \\ Charles R Greathouse IV, Nov 10 2016
CROSSREFS
Cf. A010784.
Sequence in context: A257745 A153376 A235139 * A235365 A189241 A167205
KEYWORD
base,nonn,fini,full
AUTHOR
EXTENSIONS
a(4), a(6), a(7), a(9), and a(10) from Charles R Greathouse IV, Nov 10 2016
STATUS
approved