cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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.

This page as a plain text file.
%I A342565 #20 Sep 05 2021 11:27:35
%S A342565 4265,7842,11265,22815,52265,160065,167662,322003,383542,393722,
%T A342565 1016815,1051677,1150182,1290842,1372803,1555498,1826015,2184065,
%U A342565 2808498,3168265,3200307,3231062,3333117,3427680,3676962,3913915,4042598,4323102,4537907,4623542,4798955
%N 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.
%F A342565 a(n) = (A123921(n+1) + 1)/6, excluding A123921(1).
%e A342565 a(1) = 4265, because the prime 25589 = 6*4265 - 1 can be written as 157*163 - 2, with 157 and 163 being consecutive primes.
%o A342565 (PARI) a342565(plim)={my(p1=5);forprime(p2=7,plim,my(p=p1*p2-2);if(isprime(p),print1((p+1)/6,", "));p1=p2)};
%o A342565 a342565(5400)
%o A342565 (Python)
%o A342565 from primesieve.numpy import n_primes
%o A342565 from numbthy import isprime
%o A342565 primesarray = numpy.array(n_primes(10000, 1))
%o A342565 for i in range (0, 9999):
%o A342565     totest = int(primesarray[i] * primesarray[i+1] - 2)
%o A342565     if (isprime(totest)) and  (((totest+1)%6) == 0):
%o A342565         print((totest+1)//6) # _Karl-Heinz Hofmann_, Jun 20 2021
%Y A342565 Cf. A123921, whose first term 13 = 3*5 - 2 cannot be written as 6*k - 1.
%Y A342565 Cf. A048880, A342564.
%K A342565 nonn,easy
%O A342565 1,1
%A A342565 _Hugo Pfoertner_, Jun 20 2021