A072525 a(0) = 1; a(n+1) is smallest composite number > a(n) such that a(n) + a(n+1) is prime.
1, 4, 9, 10, 21, 22, 25, 28, 33, 34, 39, 40, 49, 52, 55, 58, 69, 70, 81, 82, 85, 88, 91, 100, 111, 112, 115, 118, 121, 130, 133, 136, 141, 142, 165, 166, 171, 176, 177, 182, 185, 188, 195, 202, 207, 212, 219, 220, 237, 242, 245, 246, 253, 256, 265, 276, 287, 290
Offset: 0
Keywords
Examples
34 is the next term after 33 since 34 is composite and 33 + 34 = 67 is prime.
Programs
-
Mathematica
a=4;lst={a};Do[b=a+1;While[ !PrimeQ[a+b]&&PrimeQ[b],b++ ];AppendTo[lst,b];a=b,{n,5!}];lst (* Vladimir Joseph Stephan Orlovsky, Feb 07 2010 *)
-
PARI
{print1(a=1,","); while(a<290,b=a+1; while(isprime(b)||!isprime(a+b),b++); print1(b,","); a=b)}
Extensions
Edited and extended by Klaus Brockhaus, Aug 01 2002
Comments