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.

A099812 Number of distinct primes dividing 2n (i.e., omega(2n)).

This page as a plain text file.
%I A099812 #21 Sep 21 2024 08:42:04
%S A099812 1,1,2,1,2,2,2,1,2,2,2,2,2,2,3,1,2,2,2,2,3,2,2,2,2,2,2,2,2,3,2,1,3,2,
%T A099812 3,2,2,2,3,2,2,3,2,2,3,2,2,2,2,2,3,2,2,2,3,2,3,2,2,3,2,2,3,1,3,3,2,2,
%U A099812 3,3,2,2,2,2,3,2,3,3,2,2,2,2,2,3,3,2,3,2,2,3,3,2,3,2,3,2,2,2,3,2,2,3,2,2,4
%N A099812 Number of distinct primes dividing 2n (i.e., omega(2n)).
%C A099812 Bisection of A001221.
%H A099812 G. C. Greubel, <a href="/A099812/b099812.txt">Table of n, a(n) for n = 1..1000</a>
%F A099812 From _Amiram Eldar_, Sep 21 2024: (Start)
%F A099812 a(n) = A001221(2*n).
%F A099812 a(n) = omega(n) + 1 if n is odd, and a(n) = omega(n) if n is even.
%F A099812 Sum_{k=1..n} a(k) = n * (log(log(n)) + B + 1/2) + O(n/log(n)), where B is Mertens's constant (A077761). (End)
%e A099812 a(6) = 2 because 12 = 2*2*3 has 2 distinct prime divisors.
%e A099812 a(15) = 3 because 30 = 2*3*5 has 3 distinct prime divisors.
%p A099812 with(numtheory): omega:=proc(n) local div,A,j: div:=divisors(n): A:={}: for j from 1 to tau(n) do if isprime(div[j])=true then A:=A union {div[j]} else A:=A fi od: nops(A) end: seq(omega(2*n),n=1..130); # _Emeric Deutsch_, Mar 10 2005
%t A099812 Table[PrimeNu[2*n], {n,1,50}] (* _G. C. Greubel_, May 21 2017 *)
%o A099812 (PARI) for(n=1,50, print1(omega(2*n), ", ")) \\ _G. C. Greubel_, May 21 2017
%o A099812 (Magma) [#PrimeDivisors(2*n): n in [1..100]]; // _Vincenzo Librandi_, Jul 26 2017
%Y A099812 Cf. A001221, A077761, A092523.
%K A099812 nonn,easy
%O A099812 1,3
%A A099812 _N. J. A. Sloane_, Nov 19 2004
%E A099812 More terms from _Emeric Deutsch_, Mar 10 2005