A378681 a(n) = denominator(Sum_{k=1..n} 1/P_2(k)), where P_2(k) = A087040(k) is the second largest prime dividing the k-th composite number.
2, 1, 2, 6, 3, 6, 3, 3, 6, 2, 1, 3, 6, 3, 15, 30, 30, 15, 5, 10, 30, 15, 15, 15, 30, 10, 5, 15, 30, 30, 15, 30, 210, 210, 70, 35, 105, 105, 210, 210, 105, 35, 70, 210, 105, 21, 21, 42, 14, 70, 210, 105, 105, 210, 210, 210, 105, 35, 70, 210, 210, 105, 105, 210
Offset: 1
Links
- Amiram Eldar, Table of n, a(n) for n = 1..1000
Programs
-
Mathematica
p2[c_] := Module[{f = FactorInteger[c]}, If[f[[-1, 2]] > 1, f[[-1, 1]], f[[-2, 1]]]]; Denominator@ Accumulate[Table[1/p2[c], {c, Select[Range[50], CompositeQ]}]]
-
PARI
lista(nmax) = {my(s = 0); forcomposite(n = 1, nmax, f = factor(n); s += if(f[#f~, 2] > 1, 1/f[#f~, 1], 1/f[#f~ - 1, 1]); print1(denominator(s), ", "));}
Comments