A069903 Number of distinct prime factors of n-th triangular number.
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
Examples
A000217(11) = 11*(11+1)/2 = 66 = 2*3*11, therefore a(11) = 3.
Links
- Harvey P. Dale, Table of n, a(n) for n = 1..1000
Programs
-
Mathematica
PrimeNu[#]&/@Accumulate[Range[90]] (* Harvey P. Dale, Oct 06 2016 *)
-
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
Formula
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