primeQuadruplets.frink

Download or view 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]
}


Download or view 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 20139 days, 8 hours, 5 minutes ago.