Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #25 Jul 11 2024 18:52:23
%S 1,2,3,469
%N Numbers k such that 16 + the product of the first k lesser twin primes (A097489) is prime.
%C Define twinl#(n)as the product of the first n lesser twin primes. Then if twinl#(n)+ 16 is prime, list n.
%C It is interesting from the example that the first three primes 19,31 and 181 greater than twinl#(n) + 16 are all greater twin primes. The next PRP is the 1824 digit number twinl#(469) + 16 and is not part of a twin prime pair.
%C a(5) > 2000, if it exists. - _Amiram Eldar_, Jul 07 2024
%C a(5) > 10000, if it exists. - _Michael S. Branicky_, Jul 11 2024
%e Twinl#(3) + 16 = 3*5*11+16 = 181 is prime so 3 is in the sequence.
%t next[n_] := Module[{k = n + 1}, While[! (PrimeQ[k] && PrimeQ[k + 2]), k++]; k]; seq[kmax_] := Module[{r = 1, p = 1, s = {}}, Do[p = next[p]; r *= p; If[PrimeQ[r + 16], AppendTo[s, k]], {k, 1, kmax}]; s]; seq[500] (* _Amiram Eldar_, Jul 07 2024 *)
%o (PARI)
%o twinl(n) = { local(c,x); c=0; x=1; while(c<n, if(isprime(prime(x)+2),c++); x++; ); return(prime(x-1)) } \\ The n-th lower twin prime.
%o twiprimesl2(n,a) = { local(pr,x,y,j); for(a=0,n, for(j=1,n, pr=1; for(x=1,j, pr*=twinl(x); ); y=pr+2^a; if(ispseudoprime(y), print1(y","); break ) ) ) } \\ _Cino Hilliard_, May 08 2007
%o (PARI) lista(nn) = { for(n=1, nn, if (ispseudoprime(16+prod(i=1, n, twinl(i))), print1(n, ", ")));} \\ _Michel Marcus_, Feb 10 2014
%Y Cf. A097489.
%K nonn,more
%O 1,2
%A _Cino Hilliard_, May 08 2007
%E Partially edited by _Michel Marcus_, Feb 10 2014