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 A293460 #60 Dec 25 2024 17:29:04 %S A293460 0,1,1,1,1,2,1,1,1,2,1,2,1,2,2,1,1,2,1,2,2,2,1,2,1,2,1,2,1,2,1,1,2,2, %T A293460 2,2,1,2,2,2,1,2,1,2,2,2,1,2,1,2,2,2,1,2,2,2,2,2,1,2,1,2,2,1,2,3,2,3, %U A293460 3,4,3,4,3,4,4,4,4,5,4,5,4,5,4,5,4,4,4 %N A293460 a(n) = Sum_{k=1..n} sign(omega(n+1) - omega(n)) (where omega(m) = A001221(m), the number of distinct primes dividing m). %C A293460 The sign function is defined by: %C A293460 - sign(0) = 0, %C A293460 - sign(n) = +1 for any n > 0, %C A293460 - sign(n) = -1 for any n < 0. %C A293460 a(n) corresponds to the number of integers up to n in A294277 minus the number of integers up to n in A294278. %C A293460 The first negative value occurs at a(178) = -1. %C A293460 Will this sequence change sign indefinitely? %H A293460 Georg Fischer, <a href="/A293460/b293460.txt">Table of n, a(n) for n = 0..1000</a> %H A293460 Rémy Sigrist, <a href="/A293460/a293460.png">Line graph of the first 10000 terms</a> %H A293460 Rémy Sigrist, <a href="/A293460/a293460_1.png">Line graph of the first 100000000 terms</a> %H A293460 Rémy Sigrist, <a href="/A293460/a293460_2.png">Line graph of the first 1000000000 terms</a> %H A293460 Rémy Sigrist, <a href="/A293460/a293460_3.png">Line graph of the first 10000000000 terms</a> %F A293460 a(0) = 0, and for any n > 0: %F A293460 - a(A294277(n)) = a(A294277(n)-1) + 1, %F A293460 - a(A006049(n)) = a(A006049(n)-1), %F A293460 - a(A294278(n)) = a(A294278(n)-1) - 1. %F A293460 Also: a(n) = #{ k / A294277(k) <= n } - #{ k / A294278(k) <= n }. %e A293460 The following table shows the first terms of the sequence, alongside sign(omega(n+1)-omega(n)), omega(n+1) and omega(n): %e A293460 n a(n) sign w(n+1) w(n) %e A293460 - ---- ---- ------ ---- %e A293460 0 0 %e A293460 1 1 1 1 0 %e A293460 2 1 0 1 1 %e A293460 3 1 0 1 1 %e A293460 4 1 0 1 1 %e A293460 5 2 1 2 1 %e A293460 6 1 -1 1 2 %e A293460 7 1 0 1 1 %e A293460 8 1 0 1 1 %e A293460 9 2 1 2 1 %e A293460 10 1 -1 1 2 %e A293460 11 2 1 2 1 %e A293460 12 1 -1 1 2 %e A293460 13 2 1 2 1 %e A293460 14 2 0 2 2 %e A293460 15 1 -1 1 2 %e A293460 16 1 0 1 1 %e A293460 17 2 1 2 1 %e A293460 18 1 -1 1 2 %e A293460 19 2 1 2 1 %e A293460 20 2 0 2 2 %t A293460 Accumulate[Join[{0},Sign[Differences[PrimeNu[Range[90]]]]]] (* _Harvey P. Dale_, Dec 25 2024 *) %o A293460 (PARI) s = 0; for (n=1, 87, print1 (s ", "); s += sign(omega(n+1)-omega(n))) %Y A293460 Cf. A001221, A006049, A294277, A294278. %K A293460 sign %O A293460 0,6 %A A293460 _Rémy Sigrist_, Oct 26 2017