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.

A238643 Number of primes p <= n such that 2*pi(p) - (-1)^n and p*n +((-1)^n - 3)/2 are both prime, where pi(x) is the number of primes not exceeding x.

This page as a plain text file.
%I A238643 #8 Mar 01 2014 20:57:21
%S A238643 0,0,1,1,2,2,1,1,1,1,2,2,2,3,4,2,1,3,1,2,5,2,3,3,1,2,3,3,1,4,2,1,4,2,
%T A238643 3,5,3,1,2,2,2,3,3,4,4,2,3,2,1,2,5,1,3,4,1,2,3,1,2,4,4,2,5,4,2,5,2,1,
%U A238643 2,4,3,5,3,1,6,7,3,5,3,3
%N A238643 Number of primes p <= n such that 2*pi(p) - (-1)^n and p*n +((-1)^n - 3)/2 are both prime, where pi(x) is the number of primes not exceeding x.
%C A238643 Conjecture: (i) a(n) > 0 for all n > 2.
%C A238643 (ii) If n > 2, then 2*p*n + 1 (or 2*p*n - 1) is prime for some prime p < n.
%C A238643 Part (i) of the conjecture is a further extension of the conjecture in A238597 to cover the even case.
%H A238643 Zhi-Wei Sun, <a href="/A238643/b238643.txt">Table of n, a(n) for n = 1..10000</a>
%H A238643 Zhi-Wei Sun, <a href="http://arxiv.org/abs/1402.6641">Problems on combinatorial properties of primes</a>, arXiv:1402.6641, 2014.
%e A238643 a(9) = 1 since 5, 2*pi(5)-(-1)^9 = 2*3 + 1 = 7 and 5*9 + ((-1)^9-3)/2 = 45 - 2 = 43 are all prime.
%e A238643 a(10) = 1 since 3, 2*pi(3)-(-1)^(10) = 2*2 - 1 = 3 and 3*10 + ((-1)^(10)-3)/2 = 30 - 1 = 29 are all prime.
%e A238643 a(268) = 1 since 23, 2*pi(23) - 1`= 2*9 - 1 = 17 and 23*268 - 1 = 6163 are all prime.
%e A238643 a(389) = 1 since 71, 2*pi(71) + 1 = 2*20 + 1 = 41 and 71*389 - 2 = 27617 are all prime.
%t A238643 p[n_,k_]:=PrimeQ[2k-(-1)^n]&&PrimeQ[n*Prime[k]+((-1)^n-3)/2]
%t A238643 a[n_]:=Sum[If[p[n,k],1,0],{k,1,PrimePi[n]}]
%t A238643 Table[a[n],{n,1,80}]
%Y A238643 Cf. A000040, A000720, A238580, A238597.
%K A238643 nonn
%O A238643 1,5
%A A238643 _Zhi-Wei Sun_, Mar 01 2014