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!)
A323011 a(n) = A172103(n) - A172104(n). 0

%I #40 Feb 19 2019 23:22:54

%S 0,0,0,1,1,0,0,1,2,2,1,1,0,1,2,1,1,1,2,2,1,2,2,2,2,1,0,1,2,2,2,2,2,2,

%T 1,1,0,0,1,1,1,2,3,4,4,3,3,3,4,4,3,3,4,4,3,2,2,2,3,4,3,2,1,2,3,2,3,2,

%U 2,2,2,2,1,2,3,2,2,3,3,4,3,4,3,4,5,5,5,5,5,4

%N a(n) = A172103(n) - A172104(n).

%H R. H. Hudson and A. Brauer, <a href="https://gdz.sub.uni-goettingen.de/id/PPN243919689_0291?tify=%7B%22view%22%3A%22info%22%2C%22pages%22%3A%5B27%5D%7D">On the exact number of primes in the arithmetic progressions 4n +/- 1 and 6n +/- 1</a>, J. reine angew. Math., 291 (1977), 23-29.

%e a(1) = A172103(1) - A172104(1) = 0.

%e a(2) = A172103(2) - A172104(2) = 0.

%e a(3) = A172103(3) - A172104(3) = 0.

%e a(4) = A172103(4) - A172104(4) = 1.

%p f:= proc(t) `if`(isprime(6*t-1),1,0) - `if`(isprime(6*t+1),1,0) end proc:

%p ListTools:-PartialSums(map(f, [$1..100])); # _Robert Israel_, Feb 19 2019

%t Accumulate@ Boole@ PrimeQ[6 Range@ # - 1] - Accumulate@ Boole@ PrimeQ[6 Range@ # + 1] &@ 60 (* _Michael De Vlieger_, Jan 27 2019 *)

%o (PARI)

%o isp(n) = isprime(6*n+1); \\ A167021

%o ism(n) = isprime(6*n-1); \\ A167020

%o psisp(n) = sum(k=1, n, isp(k)); \\ A172104

%o psism(n) = sum(k=1, n, ism(k)); \\ A172103

%o a(n) = psism(n) - psisp(n); \\ _Michel Marcus_, Jan 18 2019

%Y Cf. A167020, A167021, A172103, A172104.

%K sign

%O 1,9

%A _Torlach Rush_, Jan 01 2019

%E More terms from _Michel Marcus_, Feb 01 2019

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 24 13:16 EDT 2024. Contains 371950 sequences. (Running on oeis4.)