%I #23 Dec 29 2022 12:12:54
%S 1,0,0,0,1,-1,0,0,1,-1,1,-1,1,0,-1,0,1,-1,1,0,0,-1,1,-1,1,-1,1,-1,2,
%T -2,0,1,0,0,0,-1,1,0,0,-1,2,-2,1,0,0,-1,1,-1,1,0,0,-1,1,0,0,0,0,-1,2,
%U -2,1,0,-1,1,1,-2,1,0,1,-2,1,-1,1,0,0,0,1,-2,1
%N First differences of omega(n), the number of distinct prime factors function (A001221).
%C First instance of abs(a(n)) > 2 is for n = 210. - _Alonso del Arte_, Oct 05 2014
%H Eric M. Schmidt, <a href="/A248211/b248211.txt">Table of n, a(n) for n = 1..10000</a>
%H Paul Erdős, Carl Pomerance and András Sárközy, <a href="https://math.dartmouth.edu/~carlp/PDF/58.pdf">On locally repeated values of certain arithmetic functions. II</a>, Acta Math. Hungar. 49 (1987), 251-259.
%F a(n) = omega(n+1) - omega(n) = A001221(n+1) - A001221(n).
%F G.f.: (1 - x)*Sum_{k>=1} x^(prime(k)-1)/(1 - x^prime(k)). - _Ilya Gutkovskiy_, Mar 15 2017
%p with(numtheory): A248211:=n->nops(factorset(n+1))-nops(factorset(n)): seq(A248211(n), n=1..100);
%t Table[PrimeNu[n + 1] - PrimeNu[n], {n, 100}] (* Hurt *)
%t Differences[PrimeNu[Range[100]]] (* _Alonso del Arte_, Oct 04 2014 *)
%o (PARI) a(n) = omega(n+1) - omega(n); \\ _Michel Marcus_, Dec 29 2022
%Y Cf. A001221 (omega).
%Y Cf. A053222: first differences of sigma(n) = A000203.
%Y Cf. A076191: first differences of bigomega(n) = A001222.
%Y Cf. A127440: first differences of mobius(n) = A008683.
%K sign,easy
%O 1,29
%A _Wesley Ivan Hurt_, Oct 04 2014