cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A059957 Sum of number of distinct prime factors of n and n+1, or number of distinct prime factors of n(n+1) or of lcm(n,n+1).

Original entry on oeis.org

1, 2, 2, 2, 3, 3, 2, 2, 3, 3, 3, 3, 3, 4, 3, 2, 3, 3, 3, 4, 4, 3, 3, 3, 3, 3, 3, 3, 4, 4, 2, 3, 4, 4, 4, 3, 3, 4, 4, 3, 4, 4, 3, 4, 4, 3, 3, 3, 3, 4, 4, 3, 3, 4, 4, 4, 4, 3, 4, 4, 3, 4, 3, 3, 5, 4, 3, 4, 5, 4, 3, 3, 3, 4, 4, 4, 5, 4, 3, 3, 3, 3, 4, 5, 4, 4, 4, 3, 4, 5, 4, 4, 4, 4, 4, 3, 3, 4, 4, 3, 4, 4, 3, 5, 5
Offset: 1

Views

Author

Labos Elemer, Mar 02 2001

Keywords

Comments

If a(n) = 2, then n is in A006549 (Mersenne-primes, Fermat-primes-1).
If a(n) = 2, then n is in A006549, being either a Mersenne prime, a Fermat prime minus one, or n=8, corresponding to the unique solution to Catalan's equation, 3^2 = 2^3 + 1. - Gene Ward Smith, Sep 07 2006
a(n-1), n > 2, is the number of maximal subsemigroups of the monoid of orientation-preserving partial injective mappings on a set with n elements. - Wilf A. Wilson, Jul 21 2017

Examples

			For n = 30030, n has 6 prime factors, 30031 = 59*509 so a(30030) = 6+2 = 8.
For n = 30029, a(30029) = 1+6 = 7.
		

Crossrefs

Programs

  • Mathematica
    Table[ PrimeNu[n*(n + 1)], {n,1,100}] (* G. C. Greubel, May 13 2017 *)
  • PARI
    for(n=1,100, print1(omega(n*(n+1)), ", ")) \\ G. C. Greubel, May 13 2017

Formula

a(n) = A001221(A002378(n)) = A001221(n*(n+1)) = A001221(n)+A001221(n+1) because gcd(n, n+1) = 1.
Sum_{k=1..n} a(k) = 2*n * (log(log(n)) + B) + O(n/log(n)), where B is Mertens's constant (A077761). - Amiram Eldar, Sep 29 2024

Extensions

Name corrected by Rick L. Shepherd, Apr 11 2023