login
A342565
Numbers k such that 6*k - 1 is a prime that can be written as p*q - 2, with p and q being consecutive primes.
2
4265, 7842, 11265, 22815, 52265, 160065, 167662, 322003, 383542, 393722, 1016815, 1051677, 1150182, 1290842, 1372803, 1555498, 1826015, 2184065, 2808498, 3168265, 3200307, 3231062, 3333117, 3427680, 3676962, 3913915, 4042598, 4323102, 4537907, 4623542, 4798955
OFFSET
1,1
FORMULA
a(n) = (A123921(n+1) + 1)/6, excluding A123921(1).
EXAMPLE
a(1) = 4265, because the prime 25589 = 6*4265 - 1 can be written as 157*163 - 2, with 157 and 163 being consecutive primes.
PROG
(PARI) a342565(plim)={my(p1=5); forprime(p2=7, plim, my(p=p1*p2-2); if(isprime(p), print1((p+1)/6, ", ")); p1=p2)};
a342565(5400)
(Python)
from primesieve.numpy import n_primes
from numbthy import isprime
primesarray = numpy.array(n_primes(10000, 1))
for i in range (0, 9999):
totest = int(primesarray[i] * primesarray[i+1] - 2)
if (isprime(totest)) and (((totest+1)%6) == 0):
print((totest+1)//6) # Karl-Heinz Hofmann, Jun 20 2021
CROSSREFS
Cf. A123921, whose first term 13 = 3*5 - 2 cannot be written as 6*k - 1.
Sequence in context: A371569 A023346 A231195 * A362877 A237459 A259951
KEYWORD
nonn,easy
AUTHOR
Hugo Pfoertner, Jun 20 2021
STATUS
approved