login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A342564 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. 3
6, 13, 37, 73, 793, 3750, 5400, 8893, 9600, 10082, 12150, 12973, 15913, 16537, 26533, 27335, 29400, 32413, 39853, 54150, 63037, 69337, 82835, 113437, 126142, 134085, 185852, 277350, 290400, 370513, 432553, 478837, 531037, 585937, 667333, 768980, 837013, 889350 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
FORMULA
a(n) = (A048880(n+1) - 1)/6, excluding A048880(1).
EXAMPLE
a(1) = 6 because 6*6 + 1 = 37 can be written as 5*7 + 2.
MAPLE
alist := proc(upto) local L, q, p, n, r; L := []; q := 2;
for n from 1 to upto do
p := q; q := nextprime(p); r := p * q + 1 ;
if modp(r, 6) = 0 and isprime(r + 1) then
L := [op(L), iquo(r, 6)] fi od;
L end: alist(350); # Peter Luschny, Jun 20 2021
MATHEMATICA
(Select[6Range[10^6]+1, PrimeQ[#] && MatchQ[FactorInteger[#-2], {{p_, 1}, {q_, 1}} /; q == NextPrime[p]]&]-1)/6 (* Jean-François Alcover, Jul 07 2021 *)
PROG
(PARI) a342564(plim)={my(p1=5); forprime(p2=7, plim, my(p=p1*p2+2); if(isprime(p), print1((p-1)/6, ", ")); p1=p2)};
a342564(2400)
(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. A048880, whose first term 17 = 3*5 + 2 cannot be written as 6*k + 1.
Sequence in context: A107710 A114689 A280532 * A338267 A216508 A057451
KEYWORD
nonn,easy
AUTHOR
Hugo Pfoertner, Jun 20 2021
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 08:45 EDT 2024. Contains 371782 sequences. (Running on oeis4.)