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!)
A160591 Indices of primes congruent to 5 modulo 12. 8

%I #23 Mar 18 2023 16:32:59

%S 3,7,10,13,16,24,26,30,33,35,40,45,51,55,57,60,62,66,71,77,79,87,89,

%T 97,98,102,104,108,113,116,119,123,126,135,137,139,140,142,148,152,

%U 158,160,162,165,170,176,178,184,186,194,196,199,201,206,209,212,218,220,223

%N Indices of primes congruent to 5 modulo 12.

%C The asymptotic density of this sequence is 1/4 (by Dirichlet's theorem). - _Amiram Eldar_, Mar 02 2021

%H Robert Israel, <a href="/A160591/b160591.txt">Table of n, a(n) for n = 1..10000</a>

%F a(n) = A000720(A040117(n)).

%e a(1) = 3 since the 3rd prime, A000040(3) = 5, is the first one to be equal to 5 (mod 12).

%e a(2) = 7 since the 7th prime, A000040(7) = 17, is the second one to be equal to 5 (mod 12).

%p res:= NULL: p:= 2:

%p for m from 2 to 1000 do

%p p:= nextprime(p);

%p if p mod 12 = 5 then res:= res, m fi;

%p od:

%p res; # _Robert Israel_, Dec 26 2016

%t Select[{#, Prime[#]}& /@ Range[500], Mod[#[[2]], 12] == 5&] [[All, 1]] (* _Jean-François Alcover_, Mar 23 2019 *)

%t Select[Range[300],Mod[Prime[#],12]==5&] (* _Harvey P. Dale_, Mar 18 2023 *)

%o (PARI) for(n=1,999, prime(n)%12==5 & print1(n","))

%Y A116602 lists the even terms of this sequence, divided by 2.

%Y Cf. A000720, A040117.

%K nonn

%O 1,1

%A _M. F. Hasler_, May 21 2009

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 30 07:52 EDT 2024. Contains 372127 sequences. (Running on oeis4.)