login
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).
3

%I #36 Sep 29 2024 02:54:18

%S 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,

%T 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,

%U 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

%N 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).

%C If a(n) = 2, then n is in A006549 (Mersenne-primes, Fermat-primes-1).

%C 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

%C 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

%H G. C. Greubel, <a href="/A059957/b059957.txt">Table of n, a(n) for n = 1..10000</a>

%H James East, Jitender Kumar, James D. Mitchell, and Wilf A. Wilson, <a href="https://arxiv.org/abs/1706.04967">Maximal subsemigroups of finite transformation and partition monoids</a>, arXiv:1706.04967 [math.GR], 2017. [_Wilf A. Wilson_, Jul 21 2017]

%F a(n) = A001221(A002378(n)) = A001221(n*(n+1)) = A001221(n)+A001221(n+1) because gcd(n, n+1) = 1.

%F 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

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

%e For n = 30029, a(30029) = 1+6 = 7.

%t Table[ PrimeNu[n*(n + 1)], {n,1,100}] (* _G. C. Greubel_, May 13 2017 *)

%o (PARI) for(n=1,100, print1(omega(n*(n+1)), ", ")) \\ _G. C. Greubel_, May 13 2017

%Y Cf. A006549, A001221, A002378, A077761.

%K nonn,easy,changed

%O 1,2

%A _Labos Elemer_, Mar 02 2001

%E Name corrected by _Rick L. Shepherd_, Apr 11 2023