login
A322358
Number of distinct twin prime pairs p, p+2 such that both of them divide n.
6
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2
OFFSET
1,105
LINKS
FORMULA
a(n) = A001221(A322356(n)) = A001222(A322356(n)).
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = A209328 = 0.107983... . - Amiram Eldar, Jan 01 2024
EXAMPLE
For n = 45 = 3^2 * 5, there exists one twin prime pair (3,5) whose both members divide 45, thus a(45) = 1.
For n = 105 = 3 * 5 * 7, there exists two twin prime pairs, (3,5) and (5,7) whose both members divide 105, thus a(105) = 2.
MATHEMATICA
f[p_, n_] := If[PrimeQ[p + 2] && Divisible[n, p*(p + 2)], 1, 0]; a[n_] := Plus @@ (f[#, n] & /@ FactorInteger[n][[;; , 1]]); Array[a, 105] (* Amiram Eldar, Dec 16 2018 *)
PROG
(PARI) A322358(n) = { my(ps=factor(n)[, 1]~); sum(i=1, #ps, isprime(ps[i]+2)*!(n%(ps[i]+2))); };
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Dec 16 2018
STATUS
approved