A235728 a(n) = |{0 < k < n - 2: 2*m + 1, m*(m+1) - prime(m) and m*(m+1) + prime(m) are all prime with m = phi(k) + phi(n-k)/2}|, where phi(.) is Euler's totient function.
0, 0, 0, 0, 0, 2, 3, 2, 4, 4, 4, 4, 4, 5, 3, 6, 4, 7, 4, 3, 6, 5, 6, 4, 7, 4, 7, 3, 5, 5, 5, 6, 6, 6, 3, 6, 3, 4, 2, 2, 4, 3, 4, 5, 4, 3, 6, 4, 2, 4, 2, 4, 3, 3, 6, 4, 2, 6, 8, 6, 10, 4, 6, 7, 4, 6, 6, 8, 6, 6, 2, 9, 5, 9, 10, 12, 4, 10, 6, 10, 6, 9, 5, 11, 10, 7, 10, 10, 6, 9, 11, 7, 8, 8, 13, 6, 5, 5, 6, 9
Offset: 1
Keywords
Examples
a(6) = 2 since phi(1) + phi(5)/2 = phi(3) + phi(3)/2 = 3 with 2*3 + 1 = 7, 3*4 - prime(3) = 7 and 3*4 + prime(3) = 17 all prime. a(191) = 1 since phi(153) + phi(38)/2 = 105 with 2*105 + 1 = 211, 105*106 - prime(105) = 11130 - 571 = 10559 and 105*106 + prime(105) = 11130 + 571 = 11701 all prime.
Links
- Zhi-Wei Sun, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
q[n_]:=PrimeQ[2n+1]&&PrimeQ[n(n+1)-Prime[n]]&&PrimeQ[n(n+1)+Prime[n]] f[n_,k_]:=EulerPhi[k]+EulerPhi[n-k]/2 a[n_]:=Sum[If[q[f[n,k]],1,0],{k,1,n-3}] Table[a[n],{n,1,100}]
Comments