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!)
A195465 The first a(n) n-gap primes are lessers of twin primes, a(n) maximal. 1

%I #20 Nov 21 2020 16:14:54

%S 0,5,5,17,5,6,14,6,24,75,2,4,27,11,48,50,46,9,21,7,16,137,4,55,85,14,

%T 111,24,102,291,67,89,155,180,137,330,127,413,250,241,332,619,139,234,

%U 453,929,94,160,169,22,131,434

%N The first a(n) n-gap primes are lessers of twin primes, a(n) maximal.

%C For definition of n-gap primes, see comment to A195270.

%C Conjecture: a(n)>0 for n>1. This conjecture is equivalent to the conjecture that all terms of A195325 are lessers of twin primes.

%p a:= proc(n) local i, p, q;

%p p, q:= 2, 3;

%p for i from 0 do

%p while nextprime(n*p) < (n*q) do

%p p, q:= q, nextprime(q)

%p od;

%p if not isprime(p+2) then return i fi;

%p p, q:= q, nextprime(q)

%p od

%p end:

%p seq(a(n), n=1..20); # _Alois P. Heinz_, Sep 20 2011

%t a[n_] := a[n] = Module[{i, p = 2, q = 3}, For[i = 0, True, i++, While[NextPrime[n p] < n q, p = q; q = NextPrime[q]]; If[!PrimeQ[p+2], Return[i]]; p = q; q = NextPrime[q]]];

%t Array[a, 20] (* _Jean-François Alcover_, Nov 21 2020, after _Alois P. Heinz_ *)

%Y Cf. A195325, A080192, A195270, A195271, A164368, A194658, A164294.

%K nonn

%O 1,2

%A _Vladimir Shevelev_, Sep 19 2011

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 25 04:42 EDT 2024. Contains 371964 sequences. (Running on oeis4.)