A033447 Initial prime in set of 4 consecutive primes with common difference 12.
111497, 258527, 286777, 318407, 332767, 341827, 358447, 439787, 473887, 480737, 495377, 634187, 647417, 658367, 663857, 703837, 732497, 816317, 819787, 827767, 843067, 862307, 937777, 970457, 970537, 1001267, 1012147, 1032727, 1052707, 1055827, 1104307, 1117877, 1164817, 1165837
Offset: 1
Keywords
Links
Crossrefs
Programs
-
Mathematica
A033447 = Reap[For[p = 2, p < 1100000, p = NextPrime[p], p2 = NextPrime[p]; If[p2 - p == 12, p3 = NextPrime[p2]; If[p3 - p2 == 12, p4 = NextPrime[p3]; If[p4 - p3 == 12, Sow[p]]]]]][[2, 1]] (* Jean-François Alcover, Jun 28 2012 *) Transpose[Select[Partition[Prime[Range[160000]],4,1],Union[ Differences[#]] =={12}&]][[1]] (* Harvey P. Dale, Jun 17 2014 *)
-
PARI
A033447(n, p=2, show_all=1, g=12,c,o)={forprime(q=p+1,, if(p+g!=p=q, next, q!=o+2*g, c=2, c++>3, show_all&& print1(o-g", "); n--||break); o=q-g); o-g} \\ Can be used as next(p)=A033447(1, p+1) to get the next term, e.g.: p=0; A033447_vec=vector(30,i,p=A033447(1,p+1)) \\ M. F. Hasler, Oct 26 2018
Extensions
More terms from Labos Elemer, Jan 31 2000
Definition clarified by Harvey P. Dale, Jun 17 2014
Comments