A182481 a(n) is the least k such that 6*k*n-1 and 6*k*n+1 are twin primes, and a(n)=0, if such k does not exist.
1, 1, 1, 3, 1, 2, 1, 4, 2, 1, 3, 1, 4, 5, 2, 2, 1, 1, 2, 2, 7, 5, 1, 3, 1, 2, 5, 16, 2, 1, 7, 1, 1, 5, 2, 2, 9, 1, 8, 1, 5, 9, 4, 5, 1, 3, 1, 4, 3, 2, 7, 1, 20, 5, 2, 8, 14, 1, 3, 21, 43, 4, 6, 3, 5, 8, 4, 9, 2, 1, 3, 1, 14, 15, 9, 30, 1, 4, 22, 7, 20, 21, 9
Offset: 1
Keywords
Links
- Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
Table[k = 0; While[! (PrimeQ[6*k*n - 1] && PrimeQ[6*k*n + 1]), k++]; k, {n, 100}] (* T. D. Noe, May 02 2012 *)
-
PARI
a(n)=my(k);n*=6;until(isprime(n*k++-1)&&isprime(n*k+1),);k \\ Charles R Greathouse IV, May 01 2012
Comments