A237453 Number of primes p < n with p*n + pi(p) prime, where pi(.) is given by A000720.
0, 0, 1, 0, 2, 1, 1, 2, 3, 1, 1, 1, 1, 2, 3, 2, 2, 2, 2, 3, 2, 1, 2, 1, 2, 3, 3, 2, 3, 1, 1, 1, 3, 2, 4, 3, 3, 3, 2, 1, 2, 1, 1, 3, 3, 1, 2, 3, 3, 3, 4, 3, 3, 2, 2, 6, 4, 3, 5, 3, 2, 3, 2, 4, 4, 3, 1, 3, 5, 2, 5, 3, 1, 2, 3, 2, 4, 2, 3, 2
Offset: 1
Keywords
Examples
a(3) = 1 since 2 and 2*3 + pi(2) = 6 + 1 = 7 are both prime. a(10) = 1 since 5 and 5*10 + pi(5) = 50 + 3 = 53 are both prime. a(107) = 1 since 89 and 89*107 + pi(89) = 9523 + 24 = 9547 are both prime. a(144) = 1 since 59 and 59*144 + pi(59) = 8496 + 17 = 8513 are both prime.
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
Programs
-
Mathematica
a[n_]:=Sum[If[PrimeQ[Prime[k]*n+k],1,0],{k,1,PrimePi[n-1]}] Table[a[n],{n,1,80}]
-
PARI
vector(100, n, sum(k=1, primepi(n-1), isprime(prime(k)*n+k))) \\ Colin Barker, Feb 08 2014
Comments