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!)
A145988 Ending prime: n-th prime in the first occurrence of n consecutive primes of the form 4k + 3. 7

%I #13 Jun 17 2022 11:30:38

%S 3,11,223,227,491,499,503,36607,39703,183283,241727,241739,241771,

%T 9177607,9177611,95949631,105639463,341118731,727335359,727335379,

%U 1786054619,1786054631,22964264759,54870713999,79263248759

%N Ending prime: n-th prime in the first occurrence of n consecutive primes of the form 4k + 3.

%C a(1)=3 is the same as A055624(1) because 3 is a single-digit number.

%D Enoch Haga, Exploring Primes on Your PC and the Internet, 1994-2007, pp. 30-31. ISBN 978-1-885794-24-6

%e a(2)=11 because this is the 2nd prime in the first run of 2 primes where p == 3 mod 4.

%t Prime[#]&/@Flatten[Table[SequencePosition[If[Mod[#,4]==3,1,0]&/@Prime[ Range[ 615000]],PadRight[{},n,1],1],{n,15}],1][[All,2]] (* The program generates the first 15 terms of the sequence. *) (* _Harvey P. Dale_, Jun 17 2022 *)

%o (UBASIC) 10 'cluster primes 20 C=1 30 input "end #";L 40 for N=3 to L step 2 50 S=int(sqrt(N)) 60 for A=3 to S step 2 70 B=N/A 80 if int(B)*A=N then cancel for:goto 170 90 next A 100 C=C+1 110 E=N/4:E=int(E):R=N-(4*E) 120 if R=1 then print N;:C1=C1+1:T1=T1+1:print T1 130 if R=3 then T1=0 140 if R=3 then print " ";N;:C3=C3+1:T2=T2+1:print T2 150 if R=1 then T2=0 160 if T1>10 or T2>10 then stop 170 next 180 print "Total primes=";C;:print "Type A";C1;"Type B";C3

%o (PARI) r=0; c=0; forprime(p=2, 4e9, if(p%4==3, if(c++>r, r=c; print1(p", ")), c=0)) \\ _Charles R Greathouse IV_, Mar 22 2011

%Y Cf. A055623, A054624, A145986, A145989, A145990, A145991, A145992, A145993, A145994.

%K nonn

%O 1,1

%A _Enoch Haga_, Oct 26 2008

%E Entry rewritten by, and a(14)-a(25) from, _Charles R Greathouse IV_, Mar 22 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 23 02:53 EDT 2024. Contains 371906 sequences. (Running on oeis4.)