A090955 Numbers in increasing order such that successive sum and difference both are primes: a(n) + a(n-1) and a(n) - a(n-1) both are primes.
1, 4, 7, 10, 13, 16, 21, 26, 33, 38, 41, 48, 53, 56, 75, 82, 85, 88, 91, 102, 109, 114, 119, 122, 129, 134, 137, 140, 143, 150, 157, 160, 171, 176, 183, 190, 193, 196, 201, 208, 211, 222, 227, 230, 233, 246, 253, 256, 267, 274, 297, 302, 305, 308, 311, 330, 343
Offset: 1
Keywords
Crossrefs
Cf. A090956.
Programs
-
Mathematica
a = 1; Print[a]; Do[k = a + 1; While[ !(PrimeQ[k - a] && PrimeQ[k + a]), k++ ]; a = k; Print[a], {n, 1, 100}] (* Ryan Propper, Aug 27 2005 *)
Extensions
More terms from Ryan Propper, Aug 27 2005