A237838 a(n) = |{0 < k <= n: the number of Sophie Germain primes among 1, ..., k*n is a Sophie Germain prime}|.
0, 1, 3, 2, 3, 2, 2, 2, 2, 1, 1, 2, 3, 2, 1, 1, 1, 1, 1, 1, 2, 1, 3, 3, 2, 3, 2, 1, 2, 1, 2, 1, 2, 3, 2, 2, 1, 3, 3, 4, 4, 4, 3, 4, 1, 1, 3, 3, 2, 3, 1, 1, 2, 2, 4, 1, 4, 3, 5, 4, 5, 4, 3, 4, 3, 4, 3, 2, 1, 4, 3, 4, 6, 1, 3, 3, 3, 4, 2, 3
Offset: 1
Keywords
Examples
a(20) = 1 since 11 is a Sophie Germain prime, and there are exactly 11 Sophie Germain primes among 1, ..., 6*20 (namely, they are 2, 3, 5, 11, 23, 29, 41, 53, 83, 89, 113).
Links
- Zhi-Wei Sun, Table of n, a(n) for n = 1..1000
Programs
-
Mathematica
SG[n_]:=PrimeQ[n]&&PrimeQ[2n+1] sg[n_]:=Sum[If[PrimeQ[2*Prime[k]+1],1,0],{k,1,PrimePi[n]}] a[n_]:=Sum[If[SG[sg[k*n]],1,0],{k,1,n}] Table[a[n],{n,1,80}]
Comments