primeQuadruplets.frink

View or download primeQuadruplets.frink in plain text format


// This program generates prime quadruplets, that is, numbers n
// such that n, n+2, n+6, n+8 are all prime.
//
// See:
// http://oeis.org/A007530

n = 2
while (n <= 1 billion)
{
   if isPrime[n+2] and isPrime[n+6] and isPrime[n+8]
      println[n]
   
   n = nextPrime[n]
}


View or download primeQuadruplets.frink in plain text format


This is a program written in the programming language Frink.
For more information, view the Frink Documentation or see More Sample Frink Programs.

Alan Eliasen was born 17780 days, 17 hours, 22 minutes ago.