A233864 a(n) = |{0 < m < 2*n: m = sigma(k) for some k > 0, and 2*n - 1 - m and 2*n - 1 + m are both prime}|, where sigma(k) is the sum of all (positive) divisors of k.
0, 0, 0, 1, 1, 2, 1, 2, 3, 1, 1, 3, 3, 3, 3, 2, 4, 5, 3, 4, 4, 4, 4, 4, 3, 5, 4, 5, 4, 5, 3, 4, 7, 4, 5, 6, 4, 8, 8, 4, 4, 4, 7, 5, 6, 5, 6, 8, 4, 6, 8, 6, 7, 6, 6, 5, 5, 9, 7, 9, 7, 6, 8, 7, 7, 8, 6, 9, 9, 6, 6, 12, 9, 6, 10, 8, 9, 12, 7, 7, 11, 5, 10, 9, 9, 10, 7, 11, 8, 9, 6, 8, 14, 10, 8, 8, 10, 12, 9, 6
Offset: 1
Keywords
Examples
a(7) = 1 since sigma(5) = 6, and 2*7 - 1 - 6 = 7 and 2*7 - 1 + 6 = 19 are both prime. a(10) = 1 since sigma(6) = sigma(11) = 12, and 2*10 - 1 - 12 = 7 and 2*10 - 1 + 12 = 31 are both prime. a(11) = 1 since sigma(7) = 8, and 2*11 - 1 - 8 = 13 and 2*11 - 1 + 8 = 29 are both prime.
Links
- Zhi-Wei Sun, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
f[n_]:=Sum[If[Mod[n,d]==0,d,0],{d,1,n}] S[n_]:=Union[Table[f[j],{j,1,n}]] PQ[n_]:=n>0&&PrimeQ[n] a[n_]:=Sum[If[PQ[2n-1-Part[S[2n-1],i]]&&PQ[2n-1+Part[S[2n-1],i]],1,0],{i,1,Length[S[2n-1]]}] Table[a[n],{n,1,100}]
Comments