login
A069903
Number of distinct prime factors of n-th triangular number.
7
0, 1, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 2, 3, 3, 2, 2, 2, 3, 4, 3, 2, 3, 3, 2, 2, 3, 3, 3, 3, 2, 3, 3, 3, 4, 3, 2, 3, 4, 3, 3, 3, 3, 4, 3, 2, 3, 3, 2, 3, 4, 3, 2, 3, 4, 4, 3, 2, 4, 4, 2, 3, 3, 3, 4, 3, 3, 4, 4, 3, 3, 3, 2, 3, 4, 4, 4, 3, 3, 3, 2, 2, 4, 5, 3, 3, 4, 3, 3, 4
OFFSET
1,3
LINKS
FORMULA
a(n) = A001221(A000217(n)).
Sum_{k=1..n} a(k) = 2 * n * (log(log(n)) + B - 1/4) + O(n/log(n)), where B is Mertens's constant (A077761). - Amiram Eldar, Sep 21 2024
EXAMPLE
A000217(11) = 11*(11+1)/2 = 66 = 2*3*11, therefore a(11) = 3.
MATHEMATICA
PrimeNu[#]&/@Accumulate[Range[90]] (* Harvey P. Dale, Oct 06 2016 *)
PROG
(PARI) a(n) = omega(n*(n+1)/2); \\ Michel Marcus, Feb 05 2021
(PARI) a(n)=onega(n/gcd(n, 2))+omega((n+1)/gcd(n+1)) \\ Charles R Greathouse IV, Sep 21 2024
KEYWORD
nonn,easy
AUTHOR
Reinhard Zumkeller, Apr 10 2002
STATUS
approved