cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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

Original entry on oeis.org

5, 7, 41, 47, 61, 67, 89, 103, 401, 809
Offset: 1

Views

Author

Keywords

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

Examples

			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.
		

Crossrefs

Cf. A010784.

Programs

  • 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

Extensions

a(4), a(6), a(7), a(9), and a(10) from Charles R Greathouse IV, Nov 10 2016