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.
%I A240975 #39 Sep 17 2024 15:42:36 %S A240975 0,1,2,2,2,2,3,2,3,2,4,2,3,2,3,4,2,2,3,2,3,3,4,2,4,3,3,2,4,3,4,3,2,3, %T A240975 4,4,4,2,4,3,3,3,4,3,4,4,4,3,4,2,4,3,4,2,4,4,3,4,3,3,5,2,4,4,3,3,5,3, %U A240975 3,3,4,3,3,4,3,3,3,3,5,2 %N A240975 The number of distinct prime factors of n^3-1. %H A240975 Jens Kruse Andersen, <a href="/A240975/b240975.txt">Table of n, a(n) for n = 1..10000</a> %F A240975 a(prime(n)) = A245909(n). %F A240975 a(n) = A001221(A068601(n)) for n >= 2. - _Michel Marcus_, Aug 06 2014 %e A240975 3^3-1 = 26 = 2*13, so a(3) = 2. %e A240975 0 has no prime factors, so a(1) = 0. %p A240975 A240975 := proc(n) %p A240975 A001221(n^3-1) ; %p A240975 end proc: %t A240975 a[n_] := PrimeNu[n^3-1]; a[1] = 0; Array[a, 100] (* _Amiram Eldar_, Sep 13 2024 *) %o A240975 (Python) %o A240975 from sympy import primefactors %o A240975 def A240975(n): %o A240975 return len(primefactors(n**3-1)) # _Chai Wah Wu_, Aug 06 2014 %o A240975 (PARI) a(n) = if(n<=1,0,omega(n^3-1)); \\ _Joerg Arndt_, Aug 06 2014 %Y A240975 Cf. A001221, A068601, A082863, A245909. %K A240975 nonn,easy %O A240975 1,3 %A A240975 _R. J. Mathar_, Aug 05 2014