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
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, 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, 2, 2, 2, 2, 1, 2, 3, 2, 2, 3, 3, 4, 3, 4, 3, 4, 5, 5, 5, 5, 5, 4 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,9
LINKS
R. H. Hudson and A. Brauer, On the exact number of primes in the arithmetic progressions 4n +/- 1 and 6n +/- 1, J. reine angew. Math., 291 (1977), 23-29.
EXAMPLE
a(1) = A172103(1) - A172104(1) = 0.
a(2) = A172103(2) - A172104(2) = 0.
a(3) = A172103(3) - A172104(3) = 0.
a(4) = A172103(4) - A172104(4) = 1.
MAPLE
f:= proc(t) `if`(isprime(6*t-1), 1, 0) - `if`(isprime(6*t+1), 1, 0) end proc:
ListTools:-PartialSums(map(f, [$1..100])); # Robert Israel, Feb 19 2019
MATHEMATICA
Accumulate@ Boole@ PrimeQ[6 Range@ # - 1] - Accumulate@ Boole@ PrimeQ[6 Range@ # + 1] &@ 60 (* Michael De Vlieger, Jan 27 2019 *)
PROG
(PARI)
isp(n) = isprime(6*n+1); \\ A167021
ism(n) = isprime(6*n-1); \\ A167020
psisp(n) = sum(k=1, n, isp(k)); \\ A172104
psism(n) = sum(k=1, n, ism(k)); \\ A172103
a(n) = psism(n) - psisp(n); \\ Michel Marcus, Jan 18 2019
CROSSREFS
Sequence in context: A099860 A317950 A255212 * A327747 A282750 A265890
KEYWORD
sign
AUTHOR
Torlach Rush, Jan 01 2019
EXTENSIONS
More terms from Michel Marcus, Feb 01 2019
STATUS
approved

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 August 17 11:08 EDT 2024. Contains 375209 sequences. (Running on oeis4.)