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!)
A239430 Number of ways to write n = k + m with k > 0 and m > 0 such that pi(2*k) - pi(k) is prime and pi(2*m) - pi(m) is a square, where pi(x) denotes the number of primes not exceeding x. 2

%I #14 Mar 20 2014 13:41:36

%S 0,0,0,0,1,1,2,2,4,3,3,3,2,4,2,5,3,4,5,1,5,3,6,7,5,9,3,7,5,4,7,5,9,5,

%T 5,4,2,4,2,5,4,6,7,5,9,6,9,8,7,10,8,10,6,7,6,6,7,6,5,6,7,5,5,6,7,8,7,

%U 10,11,12,11,7,6,9,10,8,7,6,7,5

%N Number of ways to write n = k + m with k > 0 and m > 0 such that pi(2*k) - pi(k) is prime and pi(2*m) - pi(m) is a square, where pi(x) denotes the number of primes not exceeding x.

%C Conjecture: a(n) > 0 for all n > 4, and a(n) = 1 only for n = 5, 6, 20.

%H Zhi-Wei Sun, <a href="/A239430/b239430.txt">Table of n, a(n) for n = 1..10000</a>

%H Zhi-Wei Sun, <a href="http://arxiv.org/abs/1402.6641">Problems on combinatorial properties of primes</a>, preprint, arXiv:1402.6641, 2014.

%e a(5) = 1 since 5 = 4 + 1 with pi(2*4) - pi(4) = 4 - 2 = 2 prime and pi(2*1) - pi(1) = 1^2.

%e a(20) = 1 since 20 = 8 + 12 with pi(2*8) - pi(8) = 6 - 4 = 2 prime and pi(2*12) - pi(12) = 9 - 5 = 2^2.

%t SQ[n_]:=IntegerQ[Sqrt[n]]

%t s[n_]:=SQ[PrimePi[2n]-PrimePi[n]]

%t p[n_]:=PrimeQ[PrimePi[2n]-PrimePi[n]]

%t a[n_]:=Sum[If[p[k]&&s[n-k],1,0],{k,1,n-1}]

%t Table[a[n],{n,1,80}]

%Y Cf. A000040, A000290, A000720, A239428.

%K nonn

%O 1,7

%A _Zhi-Wei Sun_, Mar 20 2014

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 19 19:02 EDT 2024. Contains 371798 sequences. (Running on oeis4.)