OFFSET
1,1
COMMENTS
These are the primes of a056240-type 2(12,2); k=2 (see definition in A293652). prime(r-2) is the greatest prime factor of the smallest composite number whose prime divisors (with multiplicity) sum to prime(r).
Conjecture: Sequence has infinitely many terms. Note: p~2(12,2) is just one particular form of a prime of A056240-type k=2; there are others, e.g., 2(18,2), 2(18,4), 2(28,12), 2(24,10). All such prime sequences are also conjectured to produce infinitely many terms.
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
FORMULA
EXAMPLE
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.
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 *)
PROG
(PARI) isok(p) = isprime(p) && (pp=precprime(p-1)) && (p-pp == 12) && (ppp=precprime(pp-1)) && (pp-ppp == 2); \\ Michel Marcus, Feb 16 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
David James Sycamore, Feb 16 2018
STATUS
approved