A237706 Number of primes p < n with pi(n-p) a square, where pi(.) is given by A000720.
0, 0, 1, 2, 1, 1, 1, 1, 2, 2, 2, 4, 3, 3, 3, 1, 1, 2, 2, 3, 3, 1, 1, 2, 3, 4, 4, 4, 4, 6, 5, 4, 4, 2, 2, 3, 3, 5, 5, 3, 3, 3, 3, 4, 4, 3, 3, 3, 3, 3, 3, 2, 2, 4, 5, 5, 5, 4, 4, 7, 6, 5, 5, 4, 4, 5, 5, 7, 7, 5
Offset: 1
Keywords
Examples
a(8) = 1 since 7 is prime with pi(8-7) = 0^2. a(16) = 1 since 7 is prime with pi(16-7) = 2^2. a(149) = 1 since 139 is prime with pi(149-139) = pi(10) = 2^2. a(637) = 2 since 409 is prime with pi(637-409) = pi(228) = 7^2, and 613 is prime with pi(637-613) = pi(24) = 3^2.
Links
- Zhi-Wei Sun, Table of n, a(n) for n = 1..10000
- Z.-W. Sun, Problems on combinatorial properties of primes, arXiv:1402.6641, 2014
Crossrefs
Programs
-
Mathematica
SQ[n_]:=IntegerQ[Sqrt[n]] q[n_]:=SQ[PrimePi[n]] a[n_]:=Sum[If[q[n-Prime[k]],1,0],{k,1,PrimePi[n-1]}] Table[a[n],{n,1,70}]
Comments