login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Primes that can be expressed as a sum of primes where no digit appears more than once.
1

%I #41 Jan 07 2018 08:36:34

%S 5,7,41,47,61,67,89,103,401,809

%N Primes that can be expressed as a sum of primes where no digit appears more than once.

%C 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

%e a(1) = 5 = 2 + 3.

%e a(2) = 7 = 2 + 5.

%e a(3) = 41 = 5 + 7 + 29.

%e a(4) = 47 = 5 + 13 + 29.

%e a(5) = 61 = 2 + 59.

%e a(6) = 67 = 5 + 19 + 43.

%e a(7) = 89 = 5 + 23 + 61.

%e a(8) = 103 = 2 + 5 + 7 + 89.

%e a(9) = 401 = 5 + 7 + 389.

%e a(10) = 809 = 5 + 43 + 761.

%o (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

%o 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

%Y Cf. A010784.

%K base,nonn,fini,full

%O 1,1

%A _José de Jesús Camacho Medina_, Nov 09 2016

%E a(4), a(6), a(7), a(9), and a(10) from _Charles R Greathouse IV_, Nov 10 2016