A299110 Prime(r) for r such that prime(r) - prime(r-1) = 12 and prime(r-1) - prime(r-2) = 2.
211, 631, 673, 1801, 3181, 3271, 3343, 3571, 3943, 4561, 4813, 5431, 6673, 6883, 7321, 7573, 7603, 7963, 8443, 8641, 9643, 9733, 9781, 9871, 10513, 10723, 10903, 11083, 11131, 11731, 11953, 12391, 13411, 14401, 14461, 15373, 15661, 15901, 16843, 17203, 17431, 17761, 17851, 17971, 18301, 18553, 20161, 20521, 20563, 20731
Offset: 1
Keywords
Examples
a(1)=211=prime(47), the first prime of type k=2. prime(46)=199 and prime(45)=197; 211-199=12 and 199-197=2.
Links
- Robert Israel, Table of n, a(n) for n = 1..10000
Programs
-
Maple
N:=21000: for X from 2 to N do if isprime(X) then A:=prevprime(X); B:=prevprime(A); a:=X-A; b:=A-B; if a=12 and b=2 then print(X); end if end if end if end do # alternative: P:= select(isprime, {seq(i,i=3..10^6,2)}): Q:= P intersect map(t -> t-12, P) intersect map(t -> t+2, P): Q:= remove(t -> ormap(isprime, [seq(t+i,i=2..10,2)]), Q): map(t -> t+12, Q); # Robert Israel, Feb 16 2018
-
Mathematica
Select[Partition[Prime[Range[2500]],3,1],Differences[#]=={2,12}&][[All,3]] (* Harvey P. Dale, Feb 29 2020 *)
-
PARI
isok(p) = isprime(p) && (pp=precprime(p-1)) && (p-pp == 12) && (ppp=precprime(pp-1)) && (pp-ppp == 2); \\ Michel Marcus, Feb 16 2018
Comments