A078574 Number of divisors of the average of n-th twin prime pair.
3, 4, 6, 6, 8, 8, 12, 12, 8, 12, 8, 12, 18, 14, 12, 12, 20, 16, 8, 16, 12, 24, 20, 16, 12, 16, 24, 8, 8, 24, 20, 8, 18, 16, 18, 24, 16, 24, 12, 24, 24, 16, 12, 16, 16, 32, 24, 18, 16, 20, 16, 30, 12, 8, 16, 12, 30, 8, 24, 24, 16, 18, 8, 24, 28, 16, 24, 8, 30, 32, 36, 8, 24, 30, 8
Offset: 1
Keywords
Examples
4th twin prime pair = (A001359(4), A006512(4)) = (17,19), hence A014574(4) = 18 with divisors = {1,2,3,6,9,18} therefore a(4) = 6.
Links
- Amiram Eldar, Table of n, a(n) for n = 1..10000
- Brian Hayes, Does having prime neighbors make you more composite?, Bit-Player Article, Nov 04 2021
Programs
-
Mathematica
midQ[n_] := PrimeQ[n-1] && PrimeQ[n+1]; DivisorSigma[0, Select[Range[3000], midQ]] (* Amiram Eldar, Nov 03 2019 *) DivisorSigma[0,#]&/@(Mean/@Select[Partition[Prime[Range[500]],2,1],#[[2]]- #[[1]] == 2&]) (* Harvey P. Dale, Nov 07 2022 *)