cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A323011 a(n) = A172103(n) - A172104(n).

This page as a plain text file.
%I A323011 #40 Feb 19 2019 23:22:54
%S A323011 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 A323011 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 A323011 2,2,2,2,1,2,3,2,2,3,3,4,3,4,3,4,5,5,5,5,5,4
%N A323011 a(n) = A172103(n) - A172104(n).
%H A323011 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 A323011 a(1) = A172103(1) - A172104(1) = 0.
%e A323011 a(2) = A172103(2) - A172104(2) = 0.
%e A323011 a(3) = A172103(3) - A172104(3) = 0.
%e A323011 a(4) = A172103(4) - A172104(4) = 1.
%p A323011 f:= proc(t) `if`(isprime(6*t-1),1,0) - `if`(isprime(6*t+1),1,0) end proc:
%p A323011 ListTools:-PartialSums(map(f, [$1..100])); # _Robert Israel_, Feb 19 2019
%t A323011 Accumulate@ Boole@ PrimeQ[6 Range@ # - 1] - Accumulate@ Boole@ PrimeQ[6 Range@ # + 1] &@ 60 (* _Michael De Vlieger_, Jan 27 2019 *)
%o A323011 (PARI)
%o A323011 isp(n) = isprime(6*n+1); \\ A167021
%o A323011 ism(n) = isprime(6*n-1); \\ A167020
%o A323011 psisp(n) = sum(k=1, n, isp(k)); \\ A172104
%o A323011 psism(n) = sum(k=1, n, ism(k)); \\ A172103
%o A323011 a(n) = psism(n) - psisp(n); \\ _Michel Marcus_, Jan 18 2019
%Y A323011 Cf. A167020, A167021, A172103, A172104.
%K A323011 sign
%O A323011 1,9
%A A323011 _Torlach Rush_, Jan 01 2019
%E A323011 More terms from _Michel Marcus_, Feb 01 2019